diff --git a/editor-elements/$w/RichContentViewer.service.json b/editor-elements/$w/RichContentViewer.service.json index 7ee3e60222..5f43f6d050 100644 --- a/editor-elements/$w/RichContentViewer.service.json +++ b/editor-elements/$w/RichContentViewer.service.json @@ -2,9 +2,8 @@ "memberOf": "$w", "mixes": [ "$w.Element", - "$w.HiddenCollapsedElement" ], - "labels": - [ "changed" ], + "$w.HiddenCollapsedMixin" ], + "labels": [], "location": { "lineno": 1, "filename": "RichContent.js" }, @@ -25,8 +24,7 @@ { } }, "properties": [ { "name": "content", - "labels": - [ "changed" ], + "labels": [], "get": true, "set": true, "type": diff --git a/editor-elements/$w/WixFormsV2.service.json b/editor-elements/$w/WixFormsV2.service.json new file mode 100644 index 0000000000..2683c22932 --- /dev/null +++ b/editor-elements/$w/WixFormsV2.service.json @@ -0,0 +1,602 @@ +{ "name": "WixFormsV2", + "memberOf": "$w", + "mixes": + [ "$w.Element", + "$w.HiddenCollapsedMixin" ], + "labels": + [ "changed" ], + "location": + { "lineno": 1, + "filename": "WixForms.js" }, + "docs": + { "summary": "A `WixFormsV2` element displays customizable forms, collects all the info that a site visitor entered into the form fields, and lets you track all form submissions in the dashboard.", + "description": + [ "> **Note:**", + "> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "", + "The Wix Forms app lets site visitors enter values for fields in a Wix Form and then submit it. With this app you can:", + "", + "* Create your own customized form from scratch.", + "", + "* Define conditional rules to change fields based on site visitor’s answers. For example, if in some field a site visitor selects \"Yes\" as an answer, more fields will appear.", + "", + "* Add steps to your form. You can make it easier for site visitors to complete long forms by breaking them up into pages.", + "", + "", + "### Setting up the `WixFormsV2` element", + "", + "You can create a form in the following ways: ", + "", + "* To work with a `WixFormsV2` element from a template: [add and set up](https://support.wix.com/en/article/wix-forms-adding-and-setting-up-a-form-on-your-site) the Wix Form app on your site.", + "", + "* To work with a `WixFormsV2` element when creating a form from scratch:", + "", + " 1. Click **Add Elements** on the left side of the Editor.", + "", + " 1. Click **Contact & Forms**.", + "", + " 1. Click **Create New Form**.", + "", + " 1. In the pop-up window create the form how you like by drag and dropping various fields and the submit button. ", + "", + " 1. Click **Save**.", + "", + "> **Note:** ", + "> Depending on the form you choose, a [Wix app starter collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-starter-collections)", + "> is added to your site. You can see it in the sidebar in Content Collections in the Databases section. Every time a site visitor creates a submission, ", + "> this submission is automatically added into the collection. You can't add fields into the collection, but you can select which fields to hide/display in a submission. To do this, click on a submission,", + "> and then **Manage Fields**.", + "", + "### Working with the `WixFormsV2` element", + "", + "Note the following when working with the `WixFormsV2` element:", + "", + "* The ID number that is shown when you hover over the form is actually a widget ID. You can change the widget ID in the Properties & Events tab. Example of a widget ID: `#371Ee199389C4A93849Ee35B8A15B7Ca2`. ", + "", + "* To get the form ID, call [`querySubmissionsByNamespace()`](https://www.wix.com/velo/reference/wix-forms-v2/submissions/querysubmissionsbynamespace). Example of a form ID: `21bcb6c7-02b3-4ed1-b6db-7856094fac03`.", + "", + "* If you have several widgets with the same form (for example, you copy-pasted a form on the same site), the functions applied to a form ID will run on all widgets.", + "", + "* You can only use the default field name keys in the Velo code. To check the key name, click on the form field in the form edit mode and then the **Advanced** tab.", + "", + "* You need at least a [Standard Premium](https://support.wix.com/en/article/choosing-a-premium-plan) plan to be able to upload files in your form. Also, different premium plans allow you to have different quantity of fields, rules, and pages you can add.", + "", + "* You can see the submissions both in the form dashboard and Wix Forms collection. The collection is read-only. You can manage submissions only in the form dashboard.", + "", + "", + "### Event Handling", + "", + "Use the `WixFormsV2` APIs to handle events and submit data to the server for processing.", + "", + "When a visitor clicks the **Submit** button:", + "", + "1. The `submit()` function performs built-in, general validations (such as checking that all email fields contain valid email addresses).", + "", + "1. [`onSubmit()`](#onSubmit) runs a callback", + " when a site visitor submits a Wix Form yet before the Wix Form is actually sent to the server.", + "", + "1. If form validation is successful, the form is sent to the server.", + "", + " * If the Wix Form submission succeeds, the [`onSubmitSuccess()`](#onSubmitSuccess) callback runs.", + "", + " Use this callback to handle client side operations, such as displaying a message", + " indicating the successful submission.", + "", + " * If the Wix Form submission fails, the [`onSubmitFailure()`](#onSubmitFailure) callback is fired.", + "", + " Use this callback to define client side operations for failed submits,", + " such as displaying a message requesting the visitor try again later." ], + "links": [], + "examples": [], + "extra": + { } }, + "properties": [], + "operations": + [ { "name": "getFieldValues", + "labels": [], + "nameParams": [], + "params": [], + "ret": + { "type": "$w.WixFormsV2.FormValues" }, + "locations": + [ { "lineno": 100, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Gets Wix Form field values.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Get the form fields and values", + "body": + [ "const formFieldValues = $w('#form').getFieldValues();", + "", + "/* Resolves to:", + " *", + " * {", + " * \"first_name\": \"John\"", + " * \"last_name\": \"Doe\",", + " * \"email\": \"john.doe@mail.com\"", + " * }", + " * ", + "*/" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "getStepCount", + "labels": [], + "nameParams": [], + "params": [], + "ret": + { "type": "number" }, + "locations": + [ { "lineno": 187, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Gets the total number of steps in a Wix Form.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Get the total number of steps", + "body": + [ "const totalSteps = $w('#form').getStepCount(); // Resolves to: 2" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "getStepNumber", + "labels": [], + "nameParams": [], + "params": [], + "ret": + { "type": "number" }, + "locations": + [ { "lineno": 197, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Gets the current step number of a Wix Form. Counting starts from 1.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Get the current step number", + "body": + [ "const currentStepNumber = $w('#form').getStepNumber(); // Resolves to: 8" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "navigateToStep", + "labels": [], + "nameParams": [], + "params": + [ { "name": "stepNumber", + "type": "number", + "doc": "Form step number. Counting starts from 1." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 207, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Navigates to the given Wix Form step. If an invalid number is passed, `navigateToStep()` doesn't run.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Navigate to the given step number", + "body": + [ "$w('#form').navigateToStep(5);" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "onFieldValueChange", + "labels": [], + "nameParams": [], + "params": + [ { "name": "callback", + "type": "$w.WixFormsV2.OnFieldValueChangeCallback", + "doc": "Callback for the form field values change." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 110, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Runs a callback when a site visitor changes Wix Form field values. \n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Get the new field values", + "body": + [ "const change = $w('#form').onFieldValueChange((newValues) => {", + " console.log('New form values: ', newValues);", + "});", + "", + "/* Resolves to:", + " *", + " * New form values:", + " * {", + " * \"first_name\": \"John\"", + " * }", + " * ", + "*/" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "onStepNumberChange", + "labels": [], + "nameParams": [], + "params": + [ { "name": "callback", + "type": "$w.WixFormsV2.OnStepNumberChangeCallback", + "doc": "Callback for the changed form step number." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 218, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Runs a callback when a Wix Form navigates to another step.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Get which step the form has navigated to", + "body": + [ "$w('#form').onStepNumberChange((currentStepNumber) => {", + " console.log('Step number changed to: ', currentStepNumber);", + "});" ], + "extra": + { } }, + { "title": "Display a text message with step numbers", + "body": + [ "// Display a text message showing which form step the site visitor is currently on ", + "// and how many steps are in total.", + "", + "$w.onReady(function () {", + " const firstStep = $w('#form').getStepNumber(); // Get the first step number", + " const totalSteps = $w('#form').getStepsCount(); // Get the total number of steps", + " $w('#text').text = `Step ${firstStep} out of ${totalSteps}` // Display step numbers on the first step.", + " $w('#form').onStepNumberChange((currentStepNumber) => {", + " $w('#text').text = `Step ${currentStepNumber} out of ${totalSteps}` // Each time the step number changes, update the text message with the current step.", + " });", + "});" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "onSubmit", + "labels": [], + "nameParams": [], + "params": + [ { "name": "callback", + "type": "$w.WixFormsV2.OnSubmitCallback", + "doc": "Callback for the form submission." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 121, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Runs a callback when a site visitor starts to submit a Wix Form yet before the form is actually submitted and sent to the server.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Getting the form submission values while attempting to submit", + "body": + [ "const submit = $w('#form').onSubmit((values) => {", + " console.log('Trying to submit the form with the following values: ', values);", + "});", + "", + "/* Resolves to:", + " *", + " * Trying to submit the form with the following values:", + " * {", + " * \"first_name\": \"John\"", + " * \"last_name\": \"Doe\",", + " * \"email\": \"john.doe@mail.com\"", + " * }", + " * ", + "*/" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "onSubmitFailure", + "labels": [], + "nameParams": [], + "params": + [ { "name": "callback", + "type": "$w.WixFormsV2.OnSubmitFailureCallback", + "doc": "Callback for the failed form submission." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 143, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Runs a callback when a site visitor is not able to successfully submit a Wix Form to the server.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "description": + [ "If a Wix Form has not been successfully submitted by the site visitor, the received `SubmissionError` object contains error information about why the Wix Form could not be submitted. ", + "", + "", + "**Error Codes and descriptions**", + "* INVALID_CAPTCHA - A CAPTCHA request was not verified.", + "* VALIDATION_FAILED - Form field values are invalid.", + "* SERVER_UNAVAILABLE - The server is currently unavailable.", + "* UNKNOWN_ERROR - An unknown error occurred." ], + "links": [], + "examples": + [ { "title": "Log the error when the submission has failed", + "body": + [ "const submit = $w('#form').onSubmitFailure((error) => {", + " console.log('Form submission failed with an error:', error);", + "});", + "", + "/* Resolves to:", + " *", + " * Form submission failed with an error:", + " * SUBMISSION_ERROR.VALIDATION_FAILED", + " *", + "*/" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "onSubmitSuccess", + "labels": [], + "nameParams": [], + "params": + [ { "name": "callback", + "type": "$w.WixFormsV2.OnSubmitSuccessCallback", + "doc": "Callback for the successful form submission." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 132, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Runs a callback when a site visitor submits a Wix Form and it is successfully received by the server.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Log the message when the submission is successful", + "body": + [ "const submit = $w('#form').onSubmitSuccess(() => {", + " console.log('Form submitted successfully!');", + "});" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "setFieldValues", + "labels": [], + "nameParams": [], + "params": + [ { "name": "values", + "type": "$w.WixFormsV2.FormValues", + "doc": "Field names and values of a form." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 88, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Sets Wix Form field values. \nSetting the invalid field values fires the `onFieldValuesChange()` callback. The callback returns fields with the valid values previously set.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "links": [], + "examples": + [ { "title": "Set a form field value", + "body": + [ "$w('#form').setFieldValues({", + " first_name: \"John\",", + "});" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "submit", + "labels": [], + "nameParams": [], + "params": [], + "ret": + { "type": + { "name": "Promise", + "typeParams": + [ "$w.WixFormsV2.FormValues" ] }, + "doc": "Fulfilled - When submission is successful.\nRejected - Error message." }, + "locations": + [ { "lineno": 163, + "filename": "WixForms.js" } ], + "docs": + { "summary": "Submits a Wix Form.\n> **Note:**\n> The `WixFormsV2` element is only available in Wix Studio and Editor X.", + "description": + [ "The `submit()` function does the following: ", + "1. Performs built-in, general validations (such as checking that all email fields contain valid email addresses).", + "1. Calls `onSubmit()`. If the form fields do not pass validation, the `submit()` function returns the `SUBMISSION_ERROR.VALIDATION_FAILED` error and the submission of the Wix Form data to the server is aborted.", + "1. Sends a request to the server to create a submission. ", + " If the request is successful:", + " 1. Calls `onSubmitSuccess()`.", + " 1. Resets form field values. ", + " 1. The `submit()` function returns an object with the submitted values.", + " If the request fails:", + " 1. Calls `onSubmitFailure()`.", + " 1. The `submit()` function returns an error." ], + "links": [], + "examples": + [ { "title": "Submit a form", + "body": + [ "$w('#submitButton').onClick(async () => {", + " try {", + " const formValues = await $w('#form').submit();", + " console.log('Form is submitted with the following values', formValues);", + " } catch (error) {", + " console.log('Submission failed with an error:', error);", + " }", + " })", + "", + "/* Promise resolves to:", + " *", + " * Form is submitted with the following values", + " * {", + " * \"first_name\": \"John\"", + " * \"last_name\": \"Doe\",", + " * \"email\": \"john.doe@mail.com\"", + " * } ", + " *", + "*/" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } } ], + "callbacks": + [ { "name": "OnFieldValueChangeCallback", + "labels": [], + "nameParams": [], + "params": + [ { "name": "newValues", + "type": "$w.WixFormsV2.FormValues", + "doc": "Field names and values of a form." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 230, + "filename": "WixForms.js" } ], + "docs": + { "summary": "A callback for a form field value change.", + "links": [], + "examples": [], + "extra": + { } }, + "extra": + { } }, + { "name": "OnStepNumberChangeCallback", + "labels": [], + "nameParams": [], + "params": + [ { "name": "currentStepNumber", + "type": "number", + "doc": "The current step number which form navigated to." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 261, + "filename": "WixForms.js" } ], + "docs": + { "summary": "A callback for a changed form step number.", + "links": [], + "examples": [], + "extra": + { } }, + "extra": + { } }, + { "name": "OnSubmitCallback", + "labels": [], + "nameParams": [], + "params": + [ { "name": "values", + "type": "$w.WixFormsV2.FormValues", + "doc": "Field names and values of a form." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 238, + "filename": "WixForms.js" } ], + "docs": + { "summary": "A callback for a form submission.", + "links": [], + "examples": [], + "extra": + { } }, + "extra": + { } }, + { "name": "OnSubmitFailureCallback", + "labels": [], + "nameParams": [], + "params": + [ { "name": "error", + "type": "$w.WixFormsV2.SubmissionError", + "doc": "Submission error." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 253, + "filename": "WixForms.js" } ], + "docs": + { "summary": "A callback for a failed form submission.", + "links": [], + "examples": [], + "extra": + { } }, + "extra": + { } }, + { "name": "OnSubmitSuccessCallback", + "labels": [], + "nameParams": [], + "params": [], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 246, + "filename": "WixForms.js" } ], + "docs": + { "summary": "A callback for a successful form submission.", + "links": [], + "examples": [], + "extra": + { } }, + "extra": + { } } ], + "messages": + [ { "name": "FormValues", + "locations": + [ { "lineno": 269, + "filename": "WixForms.js" } ], + "docs": + { "summary": "An object containing information about an input field in a form.", + "links": [], + "examples": [], + "extra": + { } }, + "members": + [ { "name": "key:value", + "type": "string", + "doc": "Key is the form field name, and value is the data submitted for the given field." } ], + "extra": + { }, + "labels": [] }, + { "name": "SubmissionError", + "locations": + [ { "lineno": 275, + "filename": "WixForms.js" } ], + "docs": + { "summary": "An object containing information about the error.", + "links": [], + "examples": [], + "extra": + { } }, + "members": + [ { "name": "code", + "type": "string", + "doc": "Error code." }, + { "name": "message", + "type": "string", + "doc": "Error message." } ], + "extra": + { }, + "labels": [] } ], + "extra": + { } } \ No newline at end of file diff --git a/guides/guides.json b/guides/guides.json index 89b27f04cd..27dbadc78b 100644 --- a/guides/guides.json +++ b/guides/guides.json @@ -207,11 +207,6 @@ "name": "Hello World", "url": "../tutorials/hello-world.md", "isMdFile": true - }, - { - "name": "Currency Converter", - "url": "../tutorials/currency-converter.md", - "isMdFile": true } ] }, diff --git a/guides/overview-apps.md b/guides/overview-apps.md index 7470c3e1d6..d482dfa6c3 100644 --- a/guides/overview-apps.md +++ b/guides/overview-apps.md @@ -1,3 +1,28 @@ -# Apps Made by Wix +# About Apps Made by Wix -Wix offers a range of powerful business solutions that extend the functionalities of its existing products or add new capabilities. Apps made by Wix are web apps created by Wix that site owners can use to enhance their sites. A site owner can install one or more apps made by Wix to manage specific data on their site. Each app is identified by a unique `appId`. See a complete list [here](https://dev.wix.com/docs/develop-websites/articles/wix-apps/about-apps-made-by-wix). \ No newline at end of file +Wix offers a range of powerful business solutions that extend the functionalities of its existing products or add new capabilities. Apps made by Wix are web apps created by Wix that site owners can use to enhance their sites. A site owner can install one or more apps made by Wix to manage specific data on their site. + +You may want to access site data that is managed by an app made by Wix. When making function calls to access Wix site data, some function calls require a reference to the specific app made by Wix. For example, to add a comment with the [`createComment()`](https://www.wix.com/velo/reference/wix-comments-v2/comments/createcomment) function, pass an `appId` to specify where to create the comment, such as in Wix Blogs. + +Other function calls may return a reference to the app made by Wix. For example, calling the [`getCoupon()`](https://www.wix.com/velo/reference/wix-marketing-v2/coupons/getcoupon) function returns a coupon object with an `appId` referring to the ID of the Wix app that created the coupon, such as Wix Bookings or Wix Events. + +See the following apps made by Wix and their corresponding IDs. Regardless of the function call, each app always has the same `app ID`. + +| **App made by Wix** | **App ID** | +|------------------------|--------------------------------------| +| Wix Bookings | 13d21c63-b5ec-5912-8397-c3a5ddb27a97 | +| Wix Blog | 14bcded7-0066-7c35-14d7-466cb3f09103 | +| Wix eCommerce | 1380b703-ce81-ff05-f115-39571d94dfcd | +| Wix Events | 140603ad-af8d-84a5-2c80-a0f60cb47351 | +| Wix Forms | 14ce1214-b278-a7e4-1373-00cebd1bef7c | +| Wix Hotels | 135aad86-9125-6074-7346-29dc6a3c9bcf | +| Wix Inbox | 141fbfae-511e-6817-c9f0-48993a7547d1 | +| Wix Invoices | 13ee94c1-b635-8505-3391-97919052c16f | +| Wix Music | 13bb5d67-1add-e770-a71f-001277e17c57 | +| Wix Online Programs | 2936472a-a1ed-4ae5-9f71-614313a9f4e7 | +| Wix Pay Button | 3575d251-42c3-4992-adff-170b2af90a2c | +| Wix Pricing Plans | 1522827f-c56c-a5c9-2ac9-00f9e6ae12d3 | +| Wix Restaurants Orders | 13e8d036-5516-6104-b456-c8466db39542 | +| Wix Stores | 215238eb-22a5-4c36-9e7b-e7c08025e04e | +| Wix Subscriptions | 8725b255-2aa2-4a53-b76d-7d3c363aaeea | +| Wix Video | 14409595-f076-4753-8303-9a86f9f71469 | diff --git a/guides/release-notes.md b/guides/release-notes.md index 2ab3673ea5..bec7a6bdbf 100644 --- a/guides/release-notes.md +++ b/guides/release-notes.md @@ -7,6 +7,110 @@ We love hearing your feedback! You can help us improve the docs by reporting any ![Was this helpful, yes/no buttons](../media/feedback.png) --- +### New SPI: Velo Action + +The new [Velo Action SPI](https://www.wix.com/velo/reference/spis/wix-automations) lets you create your own custom action to use in your site's automations. You can create and test code directly in your site dashboard when creating or editing an automation. + +(February 14, 2024) + +### Updated API: Tasks V2 + +`wix-crm-v2` + +We've updated the [Tasks API](/wix-crm-v2/tasks), which allows you to create and manage tasks on your site. Functionality includes: +- [Create](/wix-crm-v2/tasks/createtask), [update](/wix-crm-v2/tasks/updatetask), and [delete](/wix-crm-v2/tasks/deletetask) tasks. +- [Get](/wix-crm-v2/tasks/gettask) and [query](/wix-crm-v2/tasks/querytasks) tasks. +- [Count](/wix-crm-v2/tasks/counttasks) tasks. +- [Move](/wix-crm-v2/tasks/movetaskafter) a task's position in the display. + +(February 13, 2024) + +### New APIs: Dashboard + +The [Dashboard API](https://www.wix.com/velo/reference/wix-dashboard) has two new functions: ++ [`observeState()`](https://www.wix.com/velo/reference/wix-dashboard/observestate) allows you to react to changes in a dashboard page's environment. ++ [`getPageUrl()`](https://www.wix.com/velo/reference/wix-dashboard/getpageurl) allows you to retrieve the full URL for any dashboard page. + +(February 12, 2024) + + +### New API: WixFormsV2 Element + +`Wix Editor Elements ($w)` + +The new WixFormsV2 Element displays customizable forms, collects all the info that a site visitor entered into the form fields, and lets you track all form submissions in the dashboard. + +(February 7, 2024) + +### Deprecated: Workflows API + +`wix-crm-backend` + +The Workflows product and APIs are being discontinued and will stop working on June 30, 2024. There will not be a direct replacement for this API. However, our team is working to provide alternatives. We understand that this change may pose challenges, and we appreciate your patience and understanding. + +(February 6, 2024) + +### Updated API: Pricing Plans v2 + +`wix-pricing-plans.v2` + +We've updated the [`wix-pricing-plans.v2`](https://www.wix.com/velo/reference/wix-pricing-plans-v2) module, which is currently released as a developer preview. Note that the changes break existing code that uses the following functions, which requires updates to your code: + +- [`Orders`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders): + - [`createOfflineOrder()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/createofflineorder): `memberId` has been taken out of the `options` parameter, and is now the second required parameter after `planId`. + - [`getOfflineOrderPreview()`](https://www.wix.com/velo/reference/wix-pricing-plans-v2/orders/getofflineorderpreview): `memberId` has been taken out of the `options` parameter, and is now the second required parameter after `planId`. + + (February 6, 2024) + +## New Release: More eCommerce APIs + +`wix-ecom-backend` + +[Wix eCommerce](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) introduces new functionality to the [Orders](https://www.wix.com/velo/reference/wix-ecom-backend/orders/introduction), [Order Transactions](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/introduction), and [Order Invoices](https://www.wix.com/velo/reference/wix-ecom-backend/orderinvoices/introduction) APIs that provide developers with a growing set of services for customizing eCommerce functionality on Wix sites. The APIs include the following endpoints and webhooks: + ++ [Get](https://www.wix.com/velo/reference/wix-ecom-backend/orders/getorder), [create](https://www.wix.com/velo/reference/wix-ecom-backend/orders/createorder), and [update](https://www.wix.com/velo/reference/wix-ecom-backend/orders/updateorder) orders. ++ [Add payment](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/addpayments) records to an order. ++ [Update a payment status](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/updatepaymentstatus) or [bulk update multiple payment statuses](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/bulkupdatepaymentstatuses). ++ [List invoices for multiple orders](https://www.wix.com/velo/reference/wix-ecom-backend/orderinvoices/listinvoicesformultipleorders). ++ Events that trigger when an order is [created](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordercreated), [updated](https://www.wix.com/velo/reference/wix-ecom-backend/events/onorderupdated), [approved](https://www.wix.com/velo/reference/wix-ecom-backend/events/onorderapproved), or [canceled](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordercanceled). ++ Events that trigger when [payment or refund details are added to an order](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordertransactionsupdated), or when an order's [payment status is updated](https://www.wix.com/velo/reference/wix-ecom-backend/events/onorderpaymentstatusupdated). + +As part of this release, several [wix-stores-backend](https://www.wix.com/velo/reference/wix-stores-backend) functions and events have been deprecated and will be removed on June 30, 2024. + +**Note:** This module is in [Developer Preview](./developer-preview.md). + +(February 4, 2024) + +### New API: Checkout Templates + +`wix-ecom-backend` + +The new [Checkout Templates API](/wix-ecom-backend/checkouttemplates) allows you to manage templates to share pre-populated checkouts with customers. When customers then create checkouts from these templates, the new checkouts already include information such as predefined line items, coupons, or other customizations. Functionality includes: + ++ [Creating](/wix-ecom-backend/checkouttemplates/createcheckouttemplate), [updating](/wix-ecom-backend/checkouttemplates/updatecheckouttemplate), or [deleting](/wix-ecom-backend/checkouttemplates/deletecheckouttemplate) checkout templates. ++ [Creating a new checkout](/wix-ecom-backend/checkouttemplates/createcheckoutfromtemplate) from a checkout template. ++ [Getting](/wix-ecom-backend/checkouttemplates/getcheckouttemplate) or [querying](/wix-ecom-backend/checkouttemplates/querycheckouttemplates) checkout templates. ++ Events that trigger when a template is [created](/wix-ecom-backend/events/oncheckouttemplatecreated), [updated](/wix-ecom-backend/events/oncheckouttemplateupdated), [deleted](/wix-ecom-backend/events/oncheckouttemplatedeleted), or when a [template is used to create a checkout](/wix-ecom-backend/events/oncheckouttemplateused). + +**Note:** This module is in [Developer Preview](./developer-preview.md). + +(January 31, 2024) + +### New APIs: Wix Bookings V2 Services Functions and Events + +`wix-bookings.v2` + +We added new APIs in the [Wix Bookings Services V2](/wix-bookings-v2/services) module that: + ++ [Create a service](/wix-bookings-v2/services/createservice) ++ [Update a service](/wix-bookings-v2/services/updateservice) ++ [Delete a service](/wix-bookings-v2/services/deleteservice) ++ Trigger events when a service is [created](/wix-bookings-v2/events/onservicecreated), [updated](/wix-bookings-v2/events/onserviceupdated), and [deleted](/wix-bookings-v2/events/onservicedeleted) + + +(January 29, 2024) + + ### New API: Rich Content Viewer Element `Wix Editor Elements ($w)` @@ -108,7 +212,7 @@ We've updated the [`wix-inbox.v2`](https://www.wix.com/velo/reference/wix-inbox- - [`listMessages()`](https://www.wix.com/velo/reference/wix-inbox-v2/messages/listmessages): `visibility` has been removed from the `options` parameter and is now the required second parameter after `conversationId`. - [`sendMessage()`](https://www.wix.com/velo/reference/wix-inbox-v2/messages/sendmessage): `message` has been removed from the `options` parameter and is now the required second parameter after `conversationId`. -(Novemeber 29, 2023) +(November 29, 2023) ### New Developer Preview API: Reviews diff --git a/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar/guides/Supported Filters and Sorting.md b/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar/guides/Supported Filters and Sorting.md index e95e53df1f..93e034f8e3 100644 --- a/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar/guides/Supported Filters and Sorting.md +++ b/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar/guides/Supported Filters and Sorting.md @@ -26,26 +26,24 @@ Specify the `filter` object in the following format: The following table shows field support for filtering with the `slotAvailability` object: -| Field | Required | Filterable | Sortable | Notes | -| -------------------- | ------------ | ------------- | -------- | ----- | -| `slot` | | Not filterable | | | -| `slot.startDate` | Required | Not filterable | Sortable | Returns slots that start at, or after, this date. If `timezone` is specified, the `slot.startDate` for the query is according to the local date and time, which means that the timezone offset in the format is ignored. | -| `slot.endDate` | Required | | | Returns slots that end at, or before, this date. If the `timezone` is specified, the `slot.endDate` for the query is according to the local date and time, which means that the timezone offset in the format is ignored. | -| `slot.serviceId` | | | | Supports multiple values. Returned if `slot` is provided. | -| `slot.resourceId` | | | | | -| `slot.scheduleId` | | Not filterable | | Returned if `slot` is provided. | -| `slot.sessionId` | | Not filterable | | | -| `slot.timezone` | | Not filterable | | | -| `slot.resource` | | Not filterable | | | -| `slot.location` | | Not filterable | | | -| `bookable` | | | | When filtered by `true`, returns only available slots. Otherwise, returns both available and non-available slots. This field is always returned. | -| `bookingPolicyViolations.tooEarlyToBook` | | | | -| `bookingPolicyViolations.tooLateToBook` | | | | -| `location.businessLocation.id` | | | Supports multiple values. | -| `openSpots` | | | Returns slots with at least this number of open spots. | -| `totalSpots` | | Not filterable | | | -| `waitingList` | | Not filterable | | | -| `bookingPolicyViolations` | | Not filterable | | | +| Field | Required | Filterable | Sortable | Notes | +| -------------------------------------- | -------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `startDate` | Required | Not filterable | Sortable | Returns slots that start at, or after, this date. If `timezone` is specified, the `startDate` for the query is according to the local date and time, which means that the timezone offset in the format is ignored. | +| `endDate` | Required | | | Returns slots that end at, or before, this date. If the `timezone` is specified, the `endDate` for the query is according to the local date and time, which means that the timezone offset in the format is ignored. | +| `serviceId` | | | | Supports multiple values, returned if slot is provided. | +| `resourceId` | | | | | +| `scheduleId` | | Not filterable | | Returned if `slot` is provided. | +| `sessionId` | | Not filterable | | | +| `timezone` | | Not filterable | | | +| `resource` | | Not filterable | | | +| `bookable` | | | | When filtered by `true`, returns only available slots. Otherwise, returns both available and non-available slots. This field is always returned. | +| `bookingPolicyViolations.tooEarlyToBook` | | | | | +| `bookingPolicyViolations.tooLateToBook` | | | | | +| `location.businessLocation.id` | | | | Supports multiple values. | +| `openSpots` | | | | Returns slots with at least this number of open spots. | +| `totalSpots` | | Not filterable | | | +| `waitingList` | | Not filterable | | | +| `bookingPolicyViolations` | | Not filterable | | | ## Sorting diff --git a/wix-bookings-v2/wix-bookings-v2/Bookings.service.json b/wix-bookings-v2/wix-bookings-v2/Bookings.service.json index a3f1d8ccf1..6b01e1c33d 100644 --- a/wix-bookings-v2/wix-bookings-v2/Bookings.service.json +++ b/wix-bookings-v2/wix-bookings-v2/Bookings.service.json @@ -386,7 +386,7 @@ "docs": { "summary": "Creates a booking.", "description": [ - "To create a booking for an appointment or a session of a class, pass a booking with the relevant `slot`.\n\nTo create a booking for the entire course, pass a booking with the relevant `schedule`.\nYou can use the [Query Availability](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability) endpoint to check the availability beforehand.\n\nIf you create a booking for an existing session, we recommend that you only pass `slot.sessionId`.\nThen, any specified slot details are calculated.\n\nIf you create a booking for a new session, we recommend to call\n[Query Availability](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability)\nfirst.\nThen, pass the retrieved `availability.slot` object as the BookedEntity.Slot of the booking in the request.\n\nBookings are created with a status of `CREATED`.\n`CREATED` bookings don't appear on the business calendar and don't affect a related schedule's availability.\n\nTo create a booking with a given status, pass a booking with the wanted status.\nThis is only permitted for site Owners.\n\nYou can pass a `participantNotification.message` to notify the customer of the booking with a message.\nIt's also necessary to pass `participantNotification.notifyParticipants`as `true` to send the message.\n\nYou can pass `sendSmsReminder` as `true`, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.\n\nWhen creating a booking you must pass either `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`, all the\nprovided choices must exist for the service, otherwise the call returns an `INVALID_SERVICE_CHOICES` error.\n\nWhen creating a booking, you can pass `selectedPaymentOption`.\nThis specifies which payment method the customer plans to use.\nBut it's possible for them to later use another supported payment method.\n\nYou can skip the checkout and payment flow if you call [Confirm Or Decline Booking ](https://dev.wix.com/api/rest/wix-bookings/confirmation/confirm-or-decline-booking) otherwise, after you create the booking, you can use the\nWix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout." + "To create a booking for an appointment or a session of a class, pass a booking with the relevant `slot`.\n\nTo create a booking for the entire course, pass a booking with the relevant `schedule`.\nYou can use the Query Availability endpoint to check the availability beforehand.\n\nIf you create a booking for an existing session, we recommend that you only pass `slot.sessionId`.\nThen, any specified slot details are calculated.\n\nIf you create a booking for a new session, we recommend to call Query Availability first.\nThen, pass the retrieved `availability.slot` object as the BookedEntity.Slot of the booking in the request.\n\nBookings are created with a status of `CREATED`.\n`CREATED` bookings don't appear on the business calendar and don't affect a related schedule's availability.\n\nTo create a booking with a given status, pass a booking with the wanted status.\nThis is only permitted for site Owners.\n\nYou can pass a `participantNotification.message` to notify the customer of the booking with a message.\nIt's also necessary to pass `participantNotification.notifyParticipants`as `true` to send the message.\n\nYou can pass `sendSmsReminder` as `true`, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.\n\nWhen creating a booking you must pass either `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`, all the\nprovided choices must exist for the service, otherwise the call returns an `INVALID_SERVICE_CHOICES` error.\n\nWhen creating a booking, you can pass `selectedPaymentOption`.\nThis specifies which payment method the customer plans to use.\nBut it's possible for them to later use another supported payment method.\n\nYou can skip the checkout and payment flow if you call Confirm Or Decline Booking otherwise, after you create the booking, you can use the\nWix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout." ], "examples": [ { diff --git a/wix-bookings-v2/wix-bookings-v2/Events.service.json b/wix-bookings-v2/wix-bookings-v2/Events.service.json index bee35e4362..ae4c13a9dc 100644 --- a/wix-bookings-v2/wix-bookings-v2/Events.service.json +++ b/wix-bookings-v2/wix-bookings-v2/Events.service.json @@ -20,7 +20,7 @@ "displayName": "BookingCanceledEvent" } ], - "doc": "", + "doc": "Information about the booking that was canceled and metadata for the event.\n", "required": false } ], @@ -34,8 +34,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is canceled.", - "description": [], + "summary": "An event that's triggered when a booking is canceled.", + "description": [ + "The `onBookingCanceled()` event handler runs when a booking is canceled. The received `BookingCanceledEvent` object contains information about the booking that was canceled and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingCanceled example", @@ -70,7 +72,7 @@ "displayName": "BookingConfirmedEvent" } ], - "doc": "", + "doc": "Information about the booking that was confirmed and metadata for the event.\n", "required": false } ], @@ -84,8 +86,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is confirmed.", - "description": [], + "summary": "An event that's triggered when a booking is confirmed.", + "description": [ + "The `onBookingConfirmed()` event handler runs when a booking is confirmed. The received `BookingConfirmedEvent` object contains information about the booking that was confirmed and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingConfirmed example", @@ -120,7 +124,7 @@ "displayName": "BookingCreated" } ], - "doc": "", + "doc": "Information about the booking that was created and metadata for the event.\n", "required": false } ], @@ -134,8 +138,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is created.", - "description": [], + "summary": "An event that's triggered when a booking is created.", + "description": [ + "The `onBookingCreated()` event handler runs when a booking is created. The received `BookingCreatedEvent` object contains information about the booking that was created and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingCreated example", @@ -170,7 +176,7 @@ "displayName": "BookingDeclinedEvent" } ], - "doc": "", + "doc": "Information about the booking that was declined and metadata for the event.\n", "required": false } ], @@ -184,8 +190,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is declined.", - "description": [], + "summary": "An event that's triggered when a booking is declined.", + "description": [ + "The `onBookingDeclined()` event handler runs when a booking is declined. The received `BookingDeclinedEvent` object contains information about the booking that was declined and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingDeclined example", @@ -220,7 +228,7 @@ "displayName": "BookingNumberOfParticipantsUpdated" } ], - "doc": "", + "doc": "Information about the booking whose number of participants was updated and metadata for the event.\n", "required": false } ], @@ -234,8 +242,10 @@ "doc": null }, "docs": { - "summary": "Triggered when the number of participants is updated.", - "description": [], + "summary": "An event that's triggered when the number of participants for a booking is updated.", + "description": [ + "The `onBookingNumberOfParticipantsUpdated()` event handler runs when the number of participants for a booking is updated. The received `BookingNumberOfParticipantsUpdatedEvent` object contains information about the booking whose number of participants were updated and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingNumberOfParticipantsUpdated example", @@ -270,7 +280,7 @@ "displayName": "BookingRescheduledEvent" } ], - "doc": "", + "doc": "Information about the booking that was rescheduled and metadata for the event.\n", "required": false } ], @@ -284,8 +294,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is rescheduled.", - "description": [], + "summary": "An event that's triggered when a booking is rescheduled.", + "description": [ + "The `onBookingRescheduled()` event handler runs when a booking is rescheduled. The received `BookingRescheduledEvent` object contains information about the booking that was rescheduled and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingRescheduled example", @@ -309,6 +321,104 @@ ], "syntaxName": "wixBookings_onBookingRescheduled" }, + { + "name": "onServiceCreated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceServiceCreated", + "displayName": "ServiceCreated" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onServiceCreated example", + "body": [ + "", + " export function wixBookingsServices_onServiceCreated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsServices_onServiceCreated" + }, + { + "name": "onServiceDeleted", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceServiceDeleted", + "displayName": "ServiceDeleted" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onServiceDeleted example", + "body": [ + "", + " export function wixBookingsServices_onServiceDeleted(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsServices_onServiceDeleted" + }, { "name": "onServiceOptionsAndVariantsCreated", "params": [ @@ -334,7 +444,7 @@ "doc": null }, "docs": { - "summary": "Triggered when a `serviceOptionsAndVariants` object is created.", + "summary": "Triggered when a `serviceOptionsAndVariants` object is created by cloning from the source object.", "description": [], "examples": [ { @@ -458,9 +568,78 @@ } ], "syntaxName": "wixBookingsCatalog_onServiceOptionsAndVariantsUpdated" + }, + { + "name": "onServiceUpdated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceServiceUpdated", + "displayName": "ServiceUpdated" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onServiceUpdated example", + "body": [ + "", + " export function wixBookingsServices_onServiceUpdated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsServices_onServiceUpdated" } ], "messages": [ + { + "name": "bookingsCalendarV2SessionViewActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "bookingsCalendarV2SessionViewAddress", "members": [ @@ -1106,198 +1285,146 @@ } }, { - "name": "bookingsCalendarV2SessionViewEmpty", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewExtendSessionViewRequest", + "name": "bookingsCalendarV2SessionViewDomainEvent", "members": [ { - "name": "futureDurationInDays", + "name": "_id", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The number of days the view lasts into the future.\nMust be greater than the current value." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewExtendSessionViewResponse", - "members": [ + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, { - "name": "sessionView", + "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionView", - "displayName": "SessionView" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewActionEvent", + "displayName": "ActionEvent" } ], - "doc": "The updated sessions view." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewExternalCalendarInfo", - "members": [ + "doc": "" + }, { - "name": "calendarType", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityCreatedEvent", + "displayName": "EntityCreatedEvent" } ], - "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewExternalCalendarOverrides", - "members": [ + "doc": "" + }, { - "name": "description", + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Synced description of the external calendar event." + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." }, { - "name": "title", + "name": "entityFqdn", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Synced title of the external calendar event." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewFeedEvent", - "members": [ + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, { - "name": "sessionAddedOrUpdated", + "name": "entityId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", - "displayName": "SessionAddedOrUpdated" + "nativeType": "string" } ], - "doc": "Session has been added or updated within the feed window." + "doc": "ID of the entity associated with the event." }, { - "name": "sessionRemoved", + "name": "eventTime", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", - "displayName": "SessionRemoved" + "nativeType": "Date" } ], - "doc": "Session has been removed from the feed." + "doc": "Event timestamp." }, { - "name": "windowExtended", + "name": "originatedFrom", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindowExtended", - "displayName": "WindowExtended" + "nativeType": "string" } ], - "doc": "The feed window has been extended." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfFeedEventTypeOneOf", - "members": [ - "sessionAddedOrUpdated", - "sessionRemoved", - "windowExtended", - "windowMoved" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewFeedEventTypeOneOf", - "members": [ + "doc": "If present, indicates the action that triggered the event." + }, { - "name": "sessionAddedOrUpdated", + "name": "slug", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", - "displayName": "SessionAddedOrUpdated" + "nativeType": "string" } ], - "doc": "Session has been added or updated within the feed window." + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" }, { - "name": "sessionRemoved", + "name": "triggeredByAnonymizeRequest", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", - "displayName": "SessionRemoved" + "nativeType": "boolean" } ], - "doc": "Session has been removed from the feed." + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { - "name": "windowExtended", + "name": "updatedEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindowExtended", - "displayName": "WindowExtended" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" } ], - "doc": "The feed window has been extended." + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, "docs": { "description": [ "" @@ -1305,52 +1432,62 @@ } }, { - "name": "bookingsCalendarV2SessionViewFeedReplayEvent", + "name": "bookingsCalendarV2SessionViewDomainEventBodyOneOf", "members": [ { - "name": "replayCompleted", + "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReplayCompleted", - "displayName": "ReplayCompleted" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewActionEvent", + "displayName": "ActionEvent" } ], - "doc": "Sessions replay completed." + "doc": "" }, { - "name": "replayId", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityCreatedEvent", + "displayName": "EntityCreatedEvent" } ], "doc": "" }, { - "name": "sessionAdded", + "name": "deletedEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAdded", - "displayName": "SessionAdded" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityDeletedEvent", + "displayName": "EntityDeletedEvent" } ], - "doc": "Session has been added within the feed window." + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfFeedReplayEventTypeOneOf", - "members": [ - "replayCompleted", - "sessionAdded" - ] - } + "docs": { + "description": [ + "" ] - }, + } + }, + { + "name": "bookingsCalendarV2SessionViewEmpty", + "members": [], "docs": { "description": [ "" @@ -1358,29 +1495,17 @@ } }, { - "name": "bookingsCalendarV2SessionViewFeedReplayEventTypeOneOf", + "name": "bookingsCalendarV2SessionViewEntityCreatedEvent", "members": [ { - "name": "replayCompleted", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReplayCompleted", - "displayName": "ReplayCompleted" - } - ], - "doc": "Sessions replay completed." - }, - { - "name": "sessionAdded", + "name": "entityAsJson", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAdded", - "displayName": "SessionAdded" + "nativeType": "string" } ], - "doc": "Session has been added within the feed window." + "doc": "" } ], "docs": { @@ -1390,17 +1515,26 @@ } }, { - "name": "bookingsCalendarV2SessionViewFrequency", + "name": "bookingsCalendarV2SessionViewEntityDeletedEvent", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewEntityUpdatedEvent", "members": [ { - "name": "repetition", + "name": "currentEntityAsJson", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], "docs": { @@ -1410,8 +1544,19 @@ } }, { - "name": "bookingsCalendarV2SessionViewGetSessionViewRequest", - "members": [], + "name": "bookingsCalendarV2SessionViewExtendSessionViewRequest", + "members": [ + { + "name": "futureDurationInDays", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of days the view lasts into the future.\nMust be greater than the current value." + } + ], "docs": { "description": [ "" @@ -1419,7 +1564,7 @@ } }, { - "name": "bookingsCalendarV2SessionViewGetSessionViewResponse", + "name": "bookingsCalendarV2SessionViewExtendSessionViewResponse", "members": [ { "name": "sessionView", @@ -1430,7 +1575,7 @@ "displayName": "SessionView" } ], - "doc": "The sessions view." + "doc": "The updated sessions view." } ], "docs": { @@ -1440,47 +1585,47 @@ } }, { - "name": "bookingsCalendarV2SessionViewInterval", + "name": "bookingsCalendarV2SessionViewExternalCalendarInfo", "members": [ { - "name": "daysOfWeek", + "name": "calendarType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." - }, - { - "name": "duration", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation. minimum: 1, maximum: 86400." - }, + "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewExternalCalendarOverrides", + "members": [ { - "name": "hourOfDay", + "name": "description", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23." + "doc": "Synced description of the external calendar event." }, { - "name": "minuteOfHour", + "name": "title", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59." + "doc": "Synced title of the external calendar event." } ], "docs": { @@ -1490,57 +1635,55 @@ } }, { - "name": "bookingsCalendarV2SessionViewIntervalSplit", + "name": "bookingsCalendarV2SessionViewFeedEvent", "members": [ { - "name": "intervals", + "name": "sessionAddedOrUpdated", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringInterval", - "displayName": "RecurringInterval" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", + "displayName": "SessionAddedOrUpdated" } ], - "doc": "" + "doc": "Session has been added or updated within the feed window." }, { - "name": "newScheduleVersion", + "name": "sessionRemoved", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", + "displayName": "SessionRemoved" } ], - "doc": "" + "doc": "Session has been removed from the feed." }, { - "name": "oldScheduleVersion", + "name": "windowExtended", "optional": true, "type": [ { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "scheduleId", - "optional": true, - "type": [ - { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindowExtended", + "displayName": "WindowExtended" } ], - "doc": "" + "doc": "The feed window has been extended." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFeedEventTypeOneOf", + "members": [ + "sessionAddedOrUpdated", + "sessionRemoved", + "windowExtended", + "windowMoved" + ] + } + ] + }, "docs": { "description": [ "" @@ -1548,38 +1691,40 @@ } }, { - "name": "bookingsCalendarV2SessionViewLinkedSchedule", + "name": "bookingsCalendarV2SessionViewFeedEventTypeOneOf", "members": [ { - "name": "scheduleId", + "name": "sessionAddedOrUpdated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", + "displayName": "SessionAddedOrUpdated" } ], - "doc": "Schedule ID." + "doc": "Session has been added or updated within the feed window." }, { - "name": "scheduleOwnerId", - "readOnly": true, + "name": "sessionRemoved", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", + "displayName": "SessionRemoved" } ], - "doc": "Owner ID, of the linked schedule." + "doc": "Session has been removed from the feed." }, { - "name": "transparency", + "name": "windowExtended", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindowExtended", + "displayName": "WindowExtended" } ], - "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\n\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions.\n\n\n\n" + "doc": "The feed window has been extended." } ], "docs": { @@ -1589,59 +1734,52 @@ } }, { - "name": "bookingsCalendarV2SessionViewLocalDateTime", + "name": "bookingsCalendarV2SessionViewFeedReplayEvent", "members": [ { - "name": "dayOfMonth", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Day of the month, from 1-31." - }, - { - "name": "hourOfDay", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Hour of the day in 24-hour format, from 0-23." - }, - { - "name": "minutesOfHour", + "name": "replayCompleted", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReplayCompleted", + "displayName": "ReplayCompleted" } ], - "doc": "Minute, from 0-59." + "doc": "Sessions replay completed." }, { - "name": "monthOfYear", + "name": "replayId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Month number, from 1-12." + "doc": "" }, { - "name": "year", + "name": "sessionAdded", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAdded", + "displayName": "SessionAdded" } ], - "doc": "Year. 4-digit format." + "doc": "Session has been added within the feed window." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFeedReplayEventTypeOneOf", + "members": [ + "replayCompleted", + "sessionAdded" + ] + } + ] + }, "docs": { "description": [ "" @@ -1649,38 +1787,49 @@ } }, { - "name": "bookingsCalendarV2SessionViewLocation", + "name": "bookingsCalendarV2SessionViewFeedReplayEventTypeOneOf", "members": [ { - "name": "address", + "name": "replayCompleted", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReplayCompleted", + "displayName": "ReplayCompleted" } ], - "doc": "Free text address used when locationType is `OWNER_CUSTOM`." + "doc": "Sessions replay completed." }, { - "name": "customAddress", + "name": "sessionAdded", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAddress", - "displayName": "Address" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAdded", + "displayName": "SessionAdded" } ], - "doc": "Custom address, used when locationType is `\"OWNER_CUSTOM\"`. Might be used when locationType is `\"CUSTOM\"` in case the owner sets a custom address for the session which is different from the default." - }, + "doc": "Session has been added within the feed window." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewFrequency", + "members": [ { - "name": "locationType", + "name": "repetition", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Location type.\nOne of:\n- `\"OWNER_BUSINESS\"` The business address as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"` The address as set when creating the service.\n- `\"CUSTOM\"` The address set for the individual session." + "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." } ], "docs": { @@ -1690,58 +1839,77 @@ } }, { - "name": "bookingsCalendarV2SessionViewLocationsAddress", + "name": "bookingsCalendarV2SessionViewGetSessionViewRequest", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewGetSessionViewResponse", "members": [ { - "name": "city", + "name": "sessionView", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionView", + "displayName": "SessionView" } ], - "doc": "City name." - }, + "doc": "The sessions view." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewInterval", + "members": [ { - "name": "country", + "name": "daysOfWeek", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." }, { - "name": "postalCode", + "name": "duration", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Postal or zip code." + "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation. minimum: 1, maximum: 86400." }, { - "name": "streetAddress", + "name": "hourOfDay", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsStreetAddress", - "displayName": "LocationsStreetAddress" + "nativeType": "number" } ], - "doc": "Street address. Includes street name, number, and apartment number in separate fields." + "doc": "The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23." }, { - "name": "subdivision", + "name": "minuteOfHour", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." + "doc": "The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59." } ], "docs": { @@ -1751,260 +1919,279 @@ } }, { - "name": "bookingsCalendarV2SessionViewLocationsAddressLocation", + "name": "bookingsCalendarV2SessionViewIntervalSplit", "members": [ { - "name": "latitude", + "name": "intervals", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringInterval", + "displayName": "RecurringInterval" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "newScheduleVersion", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Latitude of the location. Must be between -90 and 90." + "doc": "" }, { - "name": "longitude", + "name": "oldScheduleVersion", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Longitude of the location. Must be between -180 and 180." + "doc": "" + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" } ], "docs": { "description": [ - "Address Geolocation" + "" ] } }, { - "name": "bookingsCalendarV2SessionViewLocationsLocation", + "name": "bookingsCalendarV2SessionViewLinkedSchedule", "members": [ { - "name": "_id", - "readOnly": true, + "name": "scheduleId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location ID." + "doc": "Schedule ID." }, { - "name": "address", + "name": "scheduleOwnerId", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsAddress", - "displayName": "LocationsAddress" + "nativeType": "string" } ], - "doc": "Address." + "doc": "Owner ID, of the linked schedule." }, { - "name": "archived", - "readOnly": true, + "name": "transparency", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the location is archived. Archived locations can't be updated.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect its `status`." - }, - { - "name": "businessSchedule", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewBusinessSchedule", - "displayName": "BusinessSchedule" - } - ], - "doc": "Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n\n__Note:__ Not supported by Wix Bookings.\n" - }, + "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\n\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions.\n\n\n\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewLocalDateTime", + "members": [ { - "name": "default", - "readOnly": true, + "name": "dayOfMonth", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether this is the default location. There can only be one default location per site. The default location can't be archived." + "doc": "Day of the month, from 1-31." }, { - "name": "description", + "name": "hourOfDay", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Location description." + "doc": "Hour of the day in 24-hour format, from 0-23." }, { - "name": "email", + "name": "minutesOfHour", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Email address." + "doc": "Minute, from 0-59." }, { - "name": "fax", + "name": "monthOfYear", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Fax number." + "doc": "Month number, from 1-12." }, { - "name": "locationType", + "name": "year", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Location type. **Note:** Currently not supported." - }, + "doc": "Year. 4-digit format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewLocation", + "members": [ { - "name": "name", + "name": "address", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location name." + "doc": "Free text address used when locationType is `OWNER_CUSTOM`." }, { - "name": "phone", + "name": "customAddress", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAddress", + "displayName": "Address" } ], - "doc": "Phone number." + "doc": "Custom address, used when locationType is `\"OWNER_CUSTOM\"`. Might be used when locationType is `\"CUSTOM\"` in case the owner sets a custom address for the session which is different from the default." }, { - "name": "revision", + "name": "locationType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the location is updated.\nTo prevent conflicting changes, the existing revision must be used when updating a location." - }, + "doc": "Location type.\nOne of:\n- `\"OWNER_BUSINESS\"` The business address as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"` The address as set when creating the service.\n- `\"CUSTOM\"` The address set for the individual session." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewLocationsAddress", + "members": [ { - "name": "status", + "name": "city", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location status. Defaults to `ACTIVE`.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status. `INACTIVE` is currently not supported." + "doc": "City name." }, { - "name": "timeZone", + "name": "country", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Timezone in `America/New_York` format." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewLocationsStreetAddress", - "members": [ + "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + }, { - "name": "apt", + "name": "formatted", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Apartment number." + "doc": "Full address of the location." }, { - "name": "name", + "name": "location", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsAddressLocation", + "displayName": "LocationsAddressLocation" } ], - "doc": "Street name." + "doc": "Geographic coordinates of location." }, { - "name": "number", + "name": "postalCode", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Street number." - } - ], - "docs": { - "description": [ - "Street address. Includes street name, number, and apartment number in separate fields." - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewMigrationData", - "members": [ + "doc": "Postal or zip code." + }, { - "name": "businessId", + "name": "streetAddress", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsStreetAddress", + "displayName": "LocationsStreetAddress" } ], - "doc": "" + "doc": "Street address. Includes street name, number, and apartment number in separate fields." }, { - "name": "staffs", + "name": "subdivision", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewStaffData", - "displayName": "StaffData" - } - ] - } + "nativeType": "string" } ], - "doc": "" + "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." } ], "docs": { @@ -2014,99 +2201,84 @@ } }, { - "name": "bookingsCalendarV2SessionViewMigrationEvent", + "name": "bookingsCalendarV2SessionViewLocationsAddressLocation", "members": [ { - "name": "migrationData", + "name": "latitude", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMigrationData", - "displayName": "MigrationData" + "nativeType": "number" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewMultipleSessionsCreated", - "members": [ + "doc": "Latitude of the location. Must be between -90 and 90." + }, { - "name": "schedulesWithSessions", + "name": "longitude", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleWithSessions", - "displayName": "ScheduleWithSessions" - } - ] - } + "nativeType": "number" } ], - "doc": "" + "doc": "Longitude of the location. Must be between -180 and 180." } ], "docs": { "description": [ - "" + "Address Geolocation" ] } }, { - "name": "bookingsCalendarV2SessionViewParticipant", + "name": "bookingsCalendarV2SessionViewLocationsLocation", "members": [ { "name": "_id", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Participant ID. Currently represents the booking.id." + "doc": "Location ID." }, { - "name": "approvalStatus", + "name": "address", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsAddress", + "displayName": "LocationsAddress" } ], - "doc": "Approval status for the participant.\n\n" + "doc": "Address." }, { - "name": "contactId", + "name": "archived", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Contact ID." + "doc": "Whether the location is archived. Archived locations can't be updated.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect its `status`." }, { - "name": "email", + "name": "businessSchedule", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewBusinessSchedule", + "displayName": "BusinessSchedule" } ], - "doc": "Participant's email address." + "doc": "Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n\n__Note:__ Not supported by Wix Bookings.\n" }, { - "name": "inherited", + "name": "default", "readOnly": true, "optional": true, "type": [ @@ -2114,148 +2286,114 @@ "nativeType": "boolean" } ], - "doc": "Whether the participant was inherited from the schedule, as opposed to being booked directly to the session." + "doc": "Whether this is the default location. There can only be one default location per site. The default location can't be archived." }, { - "name": "name", + "name": "description", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Participant's name." + "doc": "Location description." }, { - "name": "partySize", + "name": "email", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Group or party size. The number of people attending. Defaults to 0. Maximum is 250." + "doc": "Email address." }, { - "name": "phone", + "name": "fax", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Participant's phone number." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewParticipantNotification", - "members": [ + "doc": "Fax number." + }, { - "name": "message", + "name": "locationType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Custom message to send to the participants about the changes to the booking." + "doc": "Location type.\n\n**Note:** Currently not supported.\n" }, { - "name": "notifyParticipants", + "name": "locationTypes", "optional": true, "type": [ { - "nativeType": "boolean" - } - ], - "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewPrice", - "members": [ + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Location types." + }, { - "name": "amount", + "name": "name", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Required payment amount." + "doc": "Location name." }, { - "name": "currency", + "name": "phone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Currency in which the amount is quoted." + "doc": "Phone number." }, { - "name": "downPayAmount", + "name": "revision", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Amount of a down payment or deposit as part of the transaction." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewRate", - "members": [ + "doc": "Revision number, which increments by 1 each time the location is updated.\nTo prevent conflicting changes, the existing revision must be used when updating a location." + }, { - "name": "labeledPriceOptions", + "name": "status", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewPrice", - "displayName": "Price" - } - ] - } + "nativeType": "string" } ], - "doc": "Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + "doc": "Location status. Defaults to `ACTIVE`.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status. `INACTIVE` is currently not supported." }, { - "name": "priceText", + "name": "timeZone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + "doc": "Timezone in `America/New_York` format." } ], "docs": { @@ -2265,121 +2403,60 @@ } }, { - "name": "bookingsCalendarV2SessionViewRecurringInterval", + "name": "bookingsCalendarV2SessionViewLocationsStreetAddress", "members": [ { - "name": "_id", - "readOnly": true, + "name": "apt", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The recurring interval identifier." - }, - { - "name": "affectedSchedules", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLinkedSchedule", - "displayName": "LinkedSchedule" - } - ] - } - } - ], - "doc": "Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval." - }, - { - "name": "end", - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "The end time of the recurring interval. Optional. Empty value indicates that there is no end time." - }, - { - "name": "frequency", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewFrequency", - "displayName": "Frequency" - } - ], - "doc": "The frequency of the interval. Optional. The default is frequency with the default repetition." - }, - { - "name": "interval", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewInterval", - "displayName": "Interval" - } - ], - "doc": "The interval rules. The day, hour and minutes the interval is recurring." + "doc": "Apartment number." }, { - "name": "intervalType", + "name": "name", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The type of recurring interval.\n" + "doc": "Street name." }, { - "name": "start", + "name": "number", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The start time of the recurring interval. Required." + "doc": "Street number." } ], "docs": { "description": [ - "" + "Street address. Includes street name, number, and apartment number in separate fields." ] } }, { - "name": "bookingsCalendarV2SessionViewRecurringSessionSplit", + "name": "bookingsCalendarV2SessionViewMigrationData", "members": [ { - "name": "newScheduleVersion", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "oldScheduleVersion", + "name": "businessId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], "doc": "" }, { - "name": "recurringSessions", + "name": "staffs", "optional": true, "type": [ { @@ -2387,21 +2464,32 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewStaffData", + "displayName": "StaffData" } ] } } ], "doc": "" - }, + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewMigrationEvent", + "members": [ { - "name": "scheduleId", + "name": "migrationData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMigrationData", + "displayName": "MigrationData" } ], "doc": "" @@ -2414,28 +2502,10 @@ } }, { - "name": "bookingsCalendarV2SessionViewRecurringSessionsUpdated", + "name": "bookingsCalendarV2SessionViewMultipleSessionsCreated", "members": [ { - "name": "newRecurringSessions", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" - } - ] - } - } - ], - "doc": "New schedule's recurring session list." - }, - { - "name": "oldRecurringSessions", + "name": "schedulesWithSessions", "optional": true, "type": [ { @@ -2443,14 +2513,14 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleWithSessions", + "displayName": "ScheduleWithSessions" } ] } } ], - "doc": "Old schedule's recurring session list." + "doc": "" } ], "docs": { @@ -2460,106 +2530,88 @@ } }, { - "name": "bookingsCalendarV2SessionViewReplayCompleted", + "name": "bookingsCalendarV2SessionViewParticipant", "members": [ { - "name": "totalSessions", + "name": "_id", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The (minimum) number of sessions that were replayed." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewReplayRequest", - "members": [ + "doc": "Participant ID. Currently represents the booking.id." + }, { - "name": "affectedScheduleId", + "name": "approvalStatus", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Filter by either `session.schedule_id` or `session.affectedSchedules[*].scheduleId`. Optional." + "doc": "Approval status for the participant.\n\n" }, { - "name": "from", + "name": "contactId", + "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The date to replay sessions from. Required." + "doc": "Contact ID." }, { - "name": "replayId", + "name": "email", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The replay id. Required." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewReplayResponse", - "members": [ + "doc": "Participant's email address." + }, { - "name": "window", + "name": "inherited", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindow", - "displayName": "Window" + "nativeType": "boolean" } ], - "doc": "The feed window." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewReschedule", - "members": [ + "doc": "Whether the participant was inherited from the schedule, as opposed to being booked directly to the session." + }, { - "name": "executeAt", + "name": "name", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "" + "doc": "Participant's name." }, { - "name": "payload", + "name": "partySize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Group or party size. The number of people attending. Defaults to 0. Maximum is 250." + }, + { + "name": "phone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Participant's phone number." } ], "docs": { @@ -2569,133 +2621,132 @@ } }, { - "name": "bookingsCalendarV2SessionViewSchedule", + "name": "bookingsCalendarV2SessionViewParticipantNotification", "members": [ { - "name": "_id", + "name": "message", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Schedule ID." - }, - { - "name": "availability", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailability", - "displayName": "Availability" - } - ], - "doc": "Deprecated and will be removed soon." - }, - { - "name": "calendarConference", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarConference", - "displayName": "CalendarConference" - } - ], - "doc": "A conference created for the schedule. This is used when a participant is added to a schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." + "doc": "Custom message to send to the participants about the changes to the booking." }, { - "name": "capacity", + "name": "notifyParticipants", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Maximum number of participants that can be added to the schedule's sessions.\nMust be at most `1` for schedule whose availability is affected by another schedule. E.g, appointment schedules of the Wix Bookings app." - }, + "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewPrice", + "members": [ { - "name": "conferenceProvider", + "name": "amount", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewConferenceProvider", - "displayName": "ConferenceProvider" + "nativeType": "string" } ], - "doc": "Deprecated and will be removed soon." + "doc": "Required payment amount." }, { - "name": "created", - "readOnly": true, + "name": "currency", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "Schedule creation date." + "doc": "Currency in which the amount is quoted." }, { - "name": "externalCalendarOverrides", + "name": "downPayAmount", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewExternalCalendarOverrides", - "displayName": "ExternalCalendarOverrides" + "nativeType": "string" } ], - "doc": "Deprecated and will be removed soon." - }, + "doc": "Amount of a down payment or deposit as part of the transaction." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewRate", + "members": [ { - "name": "inheritedFields", - "readOnly": true, + "name": "labeledPriceOptions", "optional": true, "type": [ { "complexType": { - "nativeType": "Array", + "nativeType": "Record", "typeParams": [ { "nativeType": "string" + }, + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewPrice", + "displayName": "Price" } ] } } ], - "doc": "Fields which were inherited from the Business Info page under Settings in the Dashboard." + "doc": "Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." }, { - "name": "intervals", + "name": "priceText", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringInterval", - "displayName": "RecurringInterval" - } - ] - } + "nativeType": "string" } ], - "doc": "Deprecated. Please use the [Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/session) instead." - }, + "doc": "Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewRecurringInterval", + "members": [ { - "name": "location", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocation", - "displayName": "Location" + "nativeType": "string" } ], - "doc": "Default location for the schedule's sessions." + "doc": "The recurring interval identifier." }, { - "name": "participants", - "readOnly": true, + "name": "affectedSchedules", "optional": true, "type": [ { @@ -2703,117 +2754,124 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipant", - "displayName": "Participant" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLinkedSchedule", + "displayName": "LinkedSchedule" } ] } } ], - "doc": "*Partial list** of participants which are registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule.\nTo retrieve the full list of schedule participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." + "doc": "Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval." }, { - "name": "rate", + "name": "end", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRate", - "displayName": "Rate" + "nativeType": "Date" } ], - "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." + "doc": "The end time of the recurring interval. Optional. Empty value indicates that there is no end time." }, { - "name": "scheduleOwnerId", + "name": "frequency", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewFrequency", + "displayName": "Frequency" } ], - "doc": "ID of the schedule's owner entity. This may be a resource ID or a service ID." + "doc": "The frequency of the interval. Optional. The default is frequency with the default repetition." }, { - "name": "status", - "readOnly": true, + "name": "interval", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewInterval", + "displayName": "Interval" } ], - "doc": "Schedule status." + "doc": "The interval rules. The day, hour and minutes the interval is recurring." }, { - "name": "tags", + "name": "intervalType", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Tags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." + "doc": "The type of recurring interval.\n" }, { - "name": "timeZone", - "readOnly": true, + "name": "start", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Schedule's time zone in [Area/Location](https://en.wikipedia.org/wiki/Tz_database) format. Read-only.\nDerived from the Wix Business time zone." - }, + "doc": "The start time of the recurring interval. Required." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewRecurringSessionSplit", + "members": [ { - "name": "title", + "name": "newScheduleVersion", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Default title for the schedule's sessions. Maximum length: 6000 characters." + "doc": "" }, { - "name": "totalNumberOfParticipants", - "readOnly": true, + "name": "oldScheduleVersion", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Number of participants registered to sessions in this schedule, calculated as the sum of the party sizes." + "doc": "" }, { - "name": "updated", - "readOnly": true, + "name": "recurringSessions", "optional": true, "type": [ { - "nativeType": "Date" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" + } + ] + } } ], - "doc": "Schedule last update date." + "doc": "" }, { - "name": "version", - "readOnly": true, + "name": "scheduleId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Schedule version number, updated each time the schedule is updated." + "doc": "" } ], "docs": { @@ -2823,40 +2881,63 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleCancelled", + "name": "bookingsCalendarV2SessionViewRecurringSessionsUpdated", "members": [ { - "name": "oldSchedule", + "name": "newRecurringSessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" + } + ] + } } ], - "doc": "" + "doc": "New schedule's recurring session list." }, { - "name": "participantNotification", + "name": "oldRecurringSessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", - "displayName": "ParticipantNotification" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" + } + ] + } } ], - "doc": "Whether to notify participants about the change and an optional custom message" - }, + "doc": "Old schedule's recurring session list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewReplayCompleted", + "members": [ { - "name": "schedule", + "name": "totalSessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "nativeType": "number" } ], - "doc": "" + "doc": "The (minimum) number of sessions that were replayed." } ], "docs": { @@ -2866,18 +2947,35 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleCreated", + "name": "bookingsCalendarV2SessionViewReplayRequest", "members": [ { - "name": "schedule", + "name": "affectedScheduleId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "nativeType": "string" } ], - "doc": "" + "doc": "Filter by either `session.schedule_id` or `session.affectedSchedules[*].scheduleId`. Optional." + }, + { + "name": "from", + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The date to replay sessions from. Required." + }, + { + "name": "replayId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The replay id. Required." } ], "docs": { @@ -2887,21 +2985,41 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleNotification", + "name": "bookingsCalendarV2SessionViewReplayResponse", "members": [ { - "name": "availabilityPolicyUpdated", + "name": "window", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailabilityPolicyUpdated", - "displayName": "AvailabilityPolicyUpdated" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindow", + "displayName": "Window" + } + ], + "doc": "The feed window." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewReschedule", + "members": [ + { + "name": "executeAt", + "optional": true, + "type": [ + { + "nativeType": "Date" } ], "doc": "" }, { - "name": "instanceId", + "name": "payload", "optional": true, "type": [ { @@ -2909,181 +3027,305 @@ } ], "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewSchedule", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID." }, { - "name": "intervalSplit", + "name": "availability", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewIntervalSplit", - "displayName": "IntervalSplit" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailability", + "displayName": "Availability" } ], - "doc": "" + "doc": "__Deprecated.__" }, { - "name": "migrationEvent", + "name": "calendarConference", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMigrationEvent", - "displayName": "MigrationEvent" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarConference", + "displayName": "CalendarConference" } ], - "doc": "supported only for schedule migration apis." + "doc": "A conference created for the schedule. This is used when a participant is added to a schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." }, { - "name": "multipleSessionsCreated", + "name": "capacity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMultipleSessionsCreated", - "displayName": "MultipleSessionsCreated" + "nativeType": "number" } ], - "doc": "supported only for schedule migration apis." + "doc": "Maximum number of participants that can be added to the schedule's sessions.\nMust be at most `1` for schedule whose availability is affected by another schedule. E.g, appointment schedules of the Wix Bookings app." }, { - "name": "notifyParticipants", + "name": "conferenceProvider", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewConferenceProvider", + "displayName": "ConferenceProvider" } ], - "doc": "Whether to notify participants about changed sessions. deprecated, use participant_notification" + "doc": "__Deprecated.__" }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "created", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "Date" } ], - "doc": "" + "doc": "Schedule creation date." }, { - "name": "recurringSessionSplit", + "name": "externalCalendarOverrides", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionSplit", - "displayName": "RecurringSessionSplit" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewExternalCalendarOverrides", + "displayName": "ExternalCalendarOverrides" } ], - "doc": "" + "doc": "__Deprecated.__" }, { - "name": "scheduleCancelled", + "name": "inheritedFields", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCancelled", - "displayName": "ScheduleCancelled" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "" + "doc": "Fields which were inherited from the Business Info page under Settings in the Dashboard." }, { - "name": "scheduleCreated", + "name": "intervals", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCreated", - "displayName": "ScheduleCreated" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringInterval", + "displayName": "RecurringInterval" + } + ] + } } ], - "doc": "" + "doc": "Deprecated. Please use the [Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/session) instead." }, { - "name": "scheduleUnassignedFromUser", + "name": "location", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUnassignedFromUser", - "displayName": "ScheduleUnassignedFromUser" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocation", + "displayName": "Location" } ], - "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." + "doc": "Default location for the schedule's sessions." }, { - "name": "scheduleUpdated", + "name": "participants", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUpdated", - "displayName": "ScheduleUpdated" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipant", + "displayName": "Participant" + } + ] + } } ], - "doc": "" + "doc": "*Partial list** of participants which are registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule.\nTo retrieve the full list of schedule participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." }, { - "name": "sessionCancelled", + "name": "rate", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCancelled", - "displayName": "SessionCancelled" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRate", + "displayName": "Rate" } ], - "doc": "" + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." }, { - "name": "sessionCreated", + "name": "scheduleOwnerId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCreated", - "displayName": "SessionCreated" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of the schedule's owner entity. This may be a resource ID or a service ID." }, { - "name": "sessionUpdated", + "name": "status", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionUpdated", - "displayName": "SessionUpdated" + "nativeType": "string" } ], - "doc": "" + "doc": "Schedule status." }, { - "name": "siteProperties", + "name": "tags", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSitePropertiesOnScheduleCreation", - "displayName": "SitePropertiesOnScheduleCreation" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "site properties. Optional. Given in create schedule notification." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfScheduleNotificationEventOneOf", - "members": [ - "availabilityPolicyUpdated", - "intervalSplit", - "migrationEvent", - "multipleSessionsCreated", - "recurringSessionSplit", - "scheduleCancelled", - "scheduleCreated", - "scheduleUnassignedFromUser", - "scheduleUpdated", - "sessionCancelled", - "sessionCreated", - "sessionUpdated" - ] - } + "doc": "__Deprecated.__\nTags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." + }, + { + "name": "timeZone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule's time zone in [Area/Location](https://en.wikipedia.org/wiki/Tz_database) format. Read-only.\nDerived from the Wix Business time zone." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default title for the schedule's sessions. Maximum length: 6000 characters." + }, + { + "name": "totalNumberOfParticipants", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of participants registered to sessions in this schedule, calculated as the sum of the party sizes." + }, + { + "name": "updated", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Schedule last update date." + }, + { + "name": "version", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Schedule version number, updated each time the schedule is updated." + } + ], + "docs": { + "description": [ + "" ] - }, + } + }, + { + "name": "bookingsCalendarV2SessionViewScheduleCancelled", + "members": [ + { + "name": "oldSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + } + ], "docs": { "description": [ "" @@ -3091,7 +3333,28 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleNotificationEventOneOf", + "name": "bookingsCalendarV2SessionViewScheduleCreated", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewScheduleNotification", "members": [ { "name": "availabilityPolicyUpdated", @@ -3104,6 +3367,16 @@ ], "doc": "" }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, { "name": "intervalSplit", "optional": true, @@ -3116,26 +3389,24 @@ "doc": "" }, { - "name": "migrationEvent", + "name": "notifyParticipants", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMigrationEvent", - "displayName": "MigrationEvent" + "nativeType": "boolean" } ], - "doc": "supported only for schedule migration apis." + "doc": "Whether to notify participants about changed sessions. deprecated, use participant_notification" }, { - "name": "multipleSessionsCreated", + "name": "preserveFutureSessionsWithParticipants", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMultipleSessionsCreated", - "displayName": "MultipleSessionsCreated" + "nativeType": "boolean" } ], - "doc": "supported only for schedule migration apis." + "doc": "" }, { "name": "recurringSessionSplit", @@ -3224,8 +3495,40 @@ } ], "doc": "" + }, + { + "name": "siteProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSitePropertiesOnScheduleCreation", + "displayName": "SitePropertiesOnScheduleCreation" + } + ], + "doc": "site properties. Optional. Given in create schedule notification." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfScheduleNotificationEventOneOf", + "members": [ + "availabilityPolicyUpdated", + "intervalSplit", + "migrationEvent", + "multipleSessionsCreated", + "recurringSessionSplit", + "scheduleCancelled", + "scheduleCreated", + "scheduleUnassignedFromUser", + "scheduleUpdated", + "sessionCancelled", + "sessionCreated", + "sessionUpdated" + ] + } + ] + }, "docs": { "description": [ "" @@ -3233,100 +3536,220 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleUnassignedFromUser", + "name": "bookingsCalendarV2SessionViewScheduleNotificationEventOneOf", "members": [ { - "name": "schedule", + "name": "availabilityPolicyUpdated", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailabilityPolicyUpdated", + "displayName": "AvailabilityPolicyUpdated" } ], - "doc": "The schedule that was unassigned from the user." + "doc": "" }, { - "name": "userId", + "name": "intervalSplit", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewIntervalSplit", + "displayName": "IntervalSplit" } ], - "doc": "The Wix user id." - } - ], - "docs": { - "description": [ - "Schedule unassigned from user." - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewScheduleUpdated", - "members": [ + "doc": "" + }, { - "name": "newSchedule", + "name": "recurringSessionSplit", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionSplit", + "displayName": "RecurringSessionSplit" } ], - "doc": "The new schedule after the update." + "doc": "" }, { - "name": "oldSchedule", + "name": "scheduleCancelled", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCancelled", + "displayName": "ScheduleCancelled" } ], - "doc": "The old schedule before the update." + "doc": "" }, { - "name": "participantNotification", + "name": "scheduleCreated", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", - "displayName": "ParticipantNotification" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCreated", + "displayName": "ScheduleCreated" } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "" }, { - "name": "recurringSessions", + "name": "scheduleUnassignedFromUser", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionsUpdated", - "displayName": "RecurringSessionsUpdated" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUnassignedFromUser", + "displayName": "ScheduleUnassignedFromUser" } ], - "doc": "Recurring sessions updated event. If this field is given, the reason for the schedule updated event was\nupdating at least one of the given schedule's recurring sessions.\nThis event is triggered by create/update/delete recurring session apis." + "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." }, { - "name": "triggeredByAnonymizeRequest", + "name": "scheduleUpdated", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUpdated", + "displayName": "ScheduleUpdated" } ], - "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" - } - ], - "docs": { - "description": [ - "" - ] - } - }, + "doc": "" + }, + { + "name": "sessionCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCancelled", + "displayName": "SessionCancelled" + } + ], + "doc": "" + }, + { + "name": "sessionCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCreated", + "displayName": "SessionCreated" + } + ], + "doc": "" + }, + { + "name": "sessionUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionUpdated", + "displayName": "SessionUpdated" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewScheduleUnassignedFromUser", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" + } + ], + "doc": "The schedule that was unassigned from the user." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The Wix user id." + } + ], + "docs": { + "description": [ + "Schedule unassigned from user." + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewScheduleUpdated", + "members": [ + { + "name": "newSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" + } + ], + "doc": "The new schedule after the update." + }, + { + "name": "oldSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" + } + ], + "doc": "The old schedule before the update." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "recurringSessions", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionsUpdated", + "displayName": "RecurringSessionsUpdated" + } + ], + "doc": "Recurring sessions updated event. If this field is given, the reason for the schedule updated event was\nupdating at least one of the given schedule's recurring sessions.\nThis event is triggered by create/update/delete recurring session apis." + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "bookingsCalendarV2SessionViewScheduleWithSessions", "members": [ @@ -3450,7 +3873,7 @@ "displayName": "ExternalCalendarOverrides" } ], - "doc": "Deprecated and will be removed soon." + "doc": "__Deprecated.__" }, { "name": "inheritedFields", @@ -3631,7 +4054,7 @@ } } ], - "doc": "Tags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "__Deprecated.__\nTags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." }, { "name": "timeReservedAfter", @@ -5269,6 +5692,26 @@ ] } }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsBusinessLocation", + "members": [ + { + "name": "locationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the business location. Has to be non-empty" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "bookingsCatalogV1ServiceOptionsAndVariantsBusinessSchedule", "members": [ @@ -5522,6 +5965,16 @@ { "name": "bookingsCatalogV1ServiceOptionsAndVariantsCategories", "members": [ + { + "name": "businessTermId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business Term Id" + }, { "name": "primary", "optional": true, @@ -5835,7 +6288,7 @@ "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { "name": "limit", @@ -5845,7 +6298,7 @@ "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -5865,7 +6318,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." }, { "name": "prev", @@ -5875,7 +6328,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -6001,7 +6454,7 @@ "nativeType": "string" } ], - "doc": "random GUID so clients can tell if event was already handled" + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { "name": "actionEvent", @@ -6064,7 +6517,7 @@ "nativeType": "string" } ], - "doc": "Assuming that all messages including Actions have id\nExample: The id of the specific order, the id of a specific campaign" + "doc": "ID of the entity associated with the event." }, { "name": "eventTime", @@ -6074,18 +6527,7 @@ "nativeType": "Date" } ], - "doc": "The time of the event. Useful if there was a delay in dispatching" - }, - { - "name": "extendedFieldsUpdatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsExtendedFieldsUpdatedEvent", - "displayName": "ExtendedFieldsUpdatedEvent" - } - ], - "doc": "" + "doc": "Event timestamp." }, { "name": "originatedFrom", @@ -6115,7 +6557,7 @@ "nativeType": "boolean" } ], - "doc": "A field that should be set if this event was triggered by an anonymize request.\nFor example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.\nNOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers." + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { "name": "updatedEvent", @@ -6137,7 +6579,6 @@ "actionEvent", "createdEvent", "deletedEvent", - "extendedFieldsUpdatedEvent", "updatedEvent" ] } @@ -6185,17 +6626,6 @@ ], "doc": "" }, - { - "name": "extendedFieldsUpdatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsExtendedFieldsUpdatedEvent", - "displayName": "ExtendedFieldsUpdatedEvent" - } - ], - "doc": "" - }, { "name": "updatedEvent", "optional": true, @@ -6245,25 +6675,16 @@ }, { "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityDeletedEvent", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityUpdatedEvent", "members": [ { - "name": "currentEntityAsJson", + "name": "deletedEntityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + "doc": "Entity that was deleted" } ], "docs": { @@ -6273,7 +6694,7 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsExtendedFieldsUpdatedEvent", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityUpdatedEvent", "members": [ { "name": "currentEntityAsJson", @@ -6283,7 +6704,7 @@ "nativeType": "string" } ], - "doc": "" + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], "docs": { @@ -6835,6 +7256,27 @@ ], "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." }, + { + "name": "formatted", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Full address of the location." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocationsAddressLocation", + "displayName": "LocationsAddressLocation" + } + ], + "doc": "Geographic coordinates of location." + }, { "name": "postalCode", "optional": true, @@ -6999,7 +7441,24 @@ "nativeType": "string" } ], - "doc": "Location type. **Note:** Currently not supported." + "doc": "Location type.\n\n**Note:** Currently not supported.\n" + }, + { + "name": "locationTypes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Location types." }, { "name": "name", @@ -7853,6 +8312,16 @@ } ], "doc": "Timezone in `America/New_York` format." + }, + { + "name": "trackClicksAnalytics", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Track clicks analytics" } ], "docs": { @@ -8518,7 +8987,7 @@ "displayName": "Availability" } ], - "doc": "Deprecated and will be removed soon." + "doc": "__Deprecated.__" }, { "name": "calendarConference", @@ -8550,7 +9019,7 @@ "displayName": "ConferenceProvider" } ], - "doc": "Deprecated and will be removed soon." + "doc": "__Deprecated.__" }, { "name": "created", @@ -8572,7 +9041,7 @@ "displayName": "ExternalCalendarOverrides" } ], - "doc": "Deprecated and will be removed soon." + "doc": "__Deprecated.__" }, { "name": "inheritedFields", @@ -8687,7 +9156,7 @@ } } ], - "doc": "Tags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." + "doc": "__Deprecated.__\nTags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." }, { "name": "timeZone", @@ -8849,28 +9318,6 @@ ], "doc": "" }, - { - "name": "migrationEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMigrationEvent", - "displayName": "MigrationEvent" - } - ], - "doc": "supported only for schedule migration apis." - }, - { - "name": "multipleSessionsCreated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMultipleSessionsCreated", - "displayName": "MultipleSessionsCreated" - } - ], - "doc": "supported only for schedule migration apis." - }, { "name": "notifyParticipants", "optional": true, @@ -9044,37 +9491,15 @@ "doc": "" }, { - "name": "migrationEvent", + "name": "recurringSessionSplit", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMigrationEvent", - "displayName": "MigrationEvent" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRecurringSessionSplit", + "displayName": "RecurringSessionSplit" } ], - "doc": "supported only for schedule migration apis." - }, - { - "name": "multipleSessionsCreated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMultipleSessionsCreated", - "displayName": "MultipleSessionsCreated" - } - ], - "doc": "supported only for schedule migration apis." - }, - { - "name": "recurringSessionSplit", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRecurringSessionSplit", - "displayName": "RecurringSessionSplit" - } - ], - "doc": "" + "doc": "" }, { "name": "scheduleCancelled", @@ -9971,6 +10396,17 @@ } ], "doc": "" + }, + { + "name": "serviceOptionsAndVariants", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" + } + ], + "doc": "" } ], "docs": { @@ -10149,7 +10585,7 @@ "displayName": "ExternalCalendarOverrides" } ], - "doc": "Deprecated and will be removed soon." + "doc": "__Deprecated.__" }, { "name": "inheritedFields", @@ -10330,7 +10766,7 @@ } } ], - "doc": "Tags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "__Deprecated.__\nTags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." }, { "name": "timeReservedAfter", @@ -11399,194 +11835,198 @@ } }, { - "name": "bookingsV2AttendanceAttendance", + "name": "bookingsServicesV2ServiceActionEvent", "members": [ { - "name": "_id", - "readOnly": true, + "name": "bodyAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the attendance object." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceAddress", + "members": [ { - "name": "bookingId", + "name": "addressLine", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Booking ID." + "doc": "Main address line, usually street and number, as free text." }, { - "name": "numberOfAttendees", + "name": "addressLine2", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Total number of participants who have that attended the session. Can be greater than `1` for bookings with multiple participants." + "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." }, { - "name": "sessionId", + "name": "city", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Session ID." + "doc": "City name." }, { - "name": "status", + "name": "country", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Whether the booked contact attended the session, might be one of the following:\n\n+ `NOT_SET`: There is no available attendance information.\n+ `ATTENDED`: At least a single participant has attended the session.\n+ `NOT_ATTENDED`: No participant has attended the session.\n" - } - ], - "docs": { - "description": [ - "Attendance is the main entity of AttendanceService.\nIt contains the attendance information for a given booking in a given session." - ] - } - }, - { - "name": "bookingsV2AttendanceAttendanceCreated", - "members": [ + "doc": "Country code." + }, { - "name": "entity", + "name": "countryFullname", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", - "displayName": "Attendance" + "nativeType": "string" } ], - "doc": "" + "doc": "Country full name." }, { - "name": "metadata", + "name": "formattedAddress", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceBackendEventMetadata", - "displayName": "BackendEventMetadata" + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2AttendanceAttendanceUpdated", - "members": [ + "doc": "A string containing the full address of this location." + }, { - "name": "entity", + "name": "geocode", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", - "displayName": "Attendance" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceAddressLocation", + "displayName": "AddressLocation" } ], - "doc": "" + "doc": "Coordinates of the physical address." }, { - "name": "metadata", + "name": "hint", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceBackendEventMetadata", - "displayName": "BackendEventMetadata" + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2AttendanceBackendEventMetadata", - "members": [ + "doc": "Free text to help find the address." + }, { - "name": "entityId", + "name": "postalCode", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the entity associated with the event." + "doc": "Zip/postal code." }, { - "name": "eventTime", + "name": "streetAddress", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceStreetAddress", + "displayName": "StreetAddress" } ], - "doc": "Event timestamp." + "doc": "Street name, number and apartment number." }, { - "name": "id", + "name": "subdivision", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Event ID." + "doc": "Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." }, { - "name": "triggeredByAnonymizeRequest", + "name": "subdivisions", + "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSubdivision", + "displayName": "Subdivision" + } + ] + } } ], - "doc": "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." + "doc": "Multi-level subdivisions from top to bottom." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAddressStreetOneOf", + "members": [ + "addressLine", + "streetAddress" + ] + } + ] + }, "docs": { "description": [ - "" + "Physical address" ] } }, { - "name": "bookingsV2AttendanceCursorPaging", + "name": "bookingsServicesV2ServiceAddressLocation", "members": [ { - "name": "cursor", + "name": "latitude", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Pointer to the next or previous page in the list of results.\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request." + "doc": "Address latitude." }, { - "name": "limit", + "name": "longitude", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Number of attendances to return.\nDefaults to `50`. Maximum `1000`." + "doc": "Address longitude." } ], "docs": { @@ -11596,28 +12036,28 @@ } }, { - "name": "bookingsV2AttendanceCursorPagingMetadata", + "name": "bookingsServicesV2ServiceAddressStreetOneOf", "members": [ { - "name": "cursors", + "name": "addressLine", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceCursors", - "displayName": "Cursors" + "nativeType": "string" } ], - "doc": "Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging)." + "doc": "Main address line, usually street and number, as free text." }, { - "name": "hasNext", + "name": "streetAddress", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceStreetAddress", + "displayName": "StreetAddress" } ], - "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + "doc": "Street name, number and apartment number." } ], "docs": { @@ -11627,46 +12067,37 @@ } }, { - "name": "bookingsV2AttendanceCursors", + "name": "bookingsServicesV2ServiceApplicationError", "members": [ { - "name": "next", + "name": "code", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Error code." }, { - "name": "prev", + "name": "data", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Object" } ], - "doc": "Cursor pointing to previous page in the list of results." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2AttendanceGetAttendanceRequest", - "members": [ + "doc": "Data related to the error." + }, { - "name": "attendanceId", + "name": "description", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Id of the Attendance to retrieve." + "doc": "Description of the error." } ], "docs": { @@ -11676,81 +12107,31 @@ } }, { - "name": "bookingsV2AttendanceGetAttendanceResponse", + "name": "bookingsServicesV2ServiceAvailability", "members": [ { - "name": "attendance", + "name": "constraints", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", - "displayName": "Attendance" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceAvailabilityConstraints", + "displayName": "AvailabilityConstraints" } ], - "doc": "The retrieved Attendance." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2AttendancePaging", - "members": [ + "doc": "Constraints for calculating the schedule's availability." + }, { - "name": "limit", + "name": "end", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Date" } ], - "doc": "Number of items to load." + "doc": "Date and time the schedule stops being available for booking. No value indicates no end time." }, { - "name": "offset", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Number of items to skip in the current sort order." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2AttendanceQueryAttendanceRequest", - "members": [ - { - "name": "query", - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceQueryV2", - "displayName": "QueryV2" - } - ], - "doc": "WQL expression." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2AttendanceQueryAttendanceResponse", - "members": [ - { - "name": "attendances", + "name": "linkedSchedules", "optional": true, "type": [ { @@ -11758,49 +12139,37 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", - "displayName": "Attendance" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLinkedSchedule", + "displayName": "LinkedSchedule" } ] } } ], - "doc": "The retrieved Attendances." + "doc": "Other schedules that impact the availability calculation. Relevant only when there are availability constraints." }, { - "name": "pagingMetadata", + "name": "start", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceCursorPagingMetadata", - "displayName": "CursorPagingMetadata" + "nativeType": "Date" } ], - "doc": "Paging Metadata. Cursor pagination is supported." + "doc": "Date and time the schedule starts to be available for booking." } ], "docs": { "description": [ - "" + "" ] } }, { - "name": "bookingsV2AttendanceQueryV2", + "name": "bookingsServicesV2ServiceAvailabilityConstraints", "members": [ { - "name": "cursorPaging", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceCursorPaging", - "displayName": "CursorPaging" - } - ], - "doc": "" - }, - { - "name": "fields", + "name": "slotDurations", "optional": true, "type": [ { @@ -11808,114 +12177,87 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "nativeType": "number" } ] } } ], - "doc": "" + "doc": "A list of duration options for slots, in minutes. Minimum value for a duration is 1.\nThe availability calculation generates slots with these durations, where there is no conflict with existing sessions or other availability constraints." }, { - "name": "filter", + "name": "slotsSplitInterval", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSplitInterval", + "displayName": "SplitInterval" } ], - "doc": "" + "doc": "An object defining the time between available slots' start times. For example, a slot with slots_split_interval=5 can start every 5 minutes. The default is the slot duration." }, { - "name": "sort", + "name": "splitInterval", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceSorting", - "displayName": "Sorting" - } - ] - } + "nativeType": "number" } ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfQueryV2PagingMethodOneOf", - "members": [ - "cursorPaging", - "paging" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2AttendanceQueryV2PagingMethodOneOf", - "members": [ + "doc": "Specify how to split the slots in intervals of minutes.\nThis value indicates the time between available slots' start time. e.g., from 5 minute slots (3:00, 3:05, 3:15) and 1 hour slots (3:00, 4:00, 5:00).\nOptional. The default is the first duration in slot_durations field.\nDeprecated. Use the `split_slots_interval.value_in_minutes`." + }, { - "name": "cursorPaging", + "name": "timeBetweenSlots", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceCursorPaging", - "displayName": "CursorPaging" + "nativeType": "number" } ], - "doc": "" + "doc": "The number of minutes between the `end` of one slot, and the `start` of the next.\nMinimum value is 0, maximum value is 120." } ], "docs": { "description": [ - "" + "Describes how to calculate the specific slots that are available for booking." ] } }, { - "name": "bookingsV2AttendanceSetAttendanceRequest", + "name": "bookingsServicesV2ServiceAvailabilityPolicy", "members": [ { - "name": "attendance", + "name": "splitInterval", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", - "displayName": "Attendance" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSplitInterval", + "displayName": "SplitInterval" } ], - "doc": "Attendance to create or updated." + "doc": "Specify how to split the schedule slots in intervals of minutes." } ], "docs": { "description": [ - "" + "Availability policy applied to all site schedules." ] } }, { - "name": "bookingsV2AttendanceSetAttendanceResponse", + "name": "bookingsServicesV2ServiceAvailabilityPolicyUpdated", "members": [ { - "name": "attendance", + "name": "availabilityPolicy", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", - "displayName": "Attendance" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceAvailabilityPolicy", + "displayName": "AvailabilityPolicy" } ], - "doc": "The updated Attendance." + "doc": "" } ], "docs": { @@ -11925,27 +12267,43 @@ } }, { - "name": "bookingsV2AttendanceSorting", + "name": "bookingsServicesV2ServiceBackendEventMetadata", "members": [ { - "name": "fieldName", - "optional": true, + "name": "entityId", "type": [ { "nativeType": "string" } ], - "doc": "Name of the field to sort by." + "doc": "ID of the entity associated with the event." }, { - "name": "order", - "optional": true, + "name": "eventTime", "type": [ { "nativeType": "string" } ], - "doc": "Sort order." + "doc": "Event timestamp." + }, + { + "name": "id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event ID." + }, + { + "name": "triggeredByAnonymizeRequest", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." } ], "docs": { @@ -11955,122 +12313,168 @@ } }, { - "name": "bookingsV2BookingAddress", + "name": "bookingsServicesV2ServiceBehavior", "members": [ { - "name": "addressLine", + "name": "defaultBehavior", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceEntryPass", + "displayName": "EntryPass" } ], - "doc": "Main address line, usually street and number, as free text." + "doc": "Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events." }, { - "name": "addressLine2", + "name": "discount", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceDiscount", + "displayName": "Discount" } ], - "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." - }, + "doc": "Discount applied to paid resources" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBehaviorBehaviorOneOf", + "members": [ + "defaultBehavior", + "discount" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBehaviorBehaviorOneOf", + "members": [ { - "name": "city", + "name": "defaultBehavior", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceEntryPass", + "displayName": "EntryPass" } ], - "doc": "City name." + "doc": "Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events." }, { - "name": "country", + "name": "discount", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceDiscount", + "displayName": "Discount" } ], - "doc": "Country code." - }, + "doc": "Discount applied to paid resources" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBenefit", + "members": [ { - "name": "countryFullname", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Country full name." + "doc": "Benefit unique ID" }, { - "name": "formattedAddress", + "name": "appDefId", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "A string containing the full address of this location." + "doc": "Id of the app associated with this benefit" }, { - "name": "geocode", + "name": "behavior", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingAddressLocation", - "displayName": "AddressLocation" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBehavior", + "displayName": "Behavior" } ], - "doc": "Coordinates of the physical address." + "doc": "Benefit behavior" }, { - "name": "hint", + "name": "benefitType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Free text to help find the address." + "doc": "Benefit Type" }, { - "name": "postalCode", + "name": "creditAmount", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Zip/postal code." + "doc": "Amount of credits that provided by this benefit" }, { - "name": "streetAddress", + "name": "customFields", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingStreetAddress", - "displayName": "StreetAddress" + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } } ], - "doc": "Street name, number and apartment number." + "doc": "additional details related to benefit; limited to 20 entries, 20 symbols for key and 20 symbols for value" }, { - "name": "subdivision", + "name": "editable", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." + "doc": "return value only in case it required in the ListRequest, true means that benefit's type could be updated" }, { - "name": "subdivisions", + "name": "resourceIds", "optional": true, "type": [ { @@ -12078,86 +12482,75 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingSubdivision", - "displayName": "Subdivision" + "nativeType": "string" } ] } } ], - "doc": "Multi-level subdivisions from top to bottom." + "doc": "Resource IDs that serves by this benefit" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfAddressStreetOneOf", - "members": [ - "addressLine", - "streetAddress" - ] - } - ] - }, "docs": { "description": [ - "Physical address" + "" ] } }, { - "name": "bookingsV2BookingAddressLocation", + "name": "bookingsServicesV2ServiceBenefitNotification", "members": [ { - "name": "latitude", + "name": "appDefId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Address latitude." + "doc": "App def ID" }, { - "name": "longitude", + "name": "benefit", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBenefit", + "displayName": "Benefit" } ], - "doc": "Address longitude." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingAddressStreetOneOf", - "members": [ + "doc": "Current benefit details" + }, { - "name": "addressLine", + "name": "event", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Main address line, usually street and number, as free text." + "doc": "Notification event" }, { - "name": "streetAddress", + "name": "planId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingStreetAddress", - "displayName": "StreetAddress" + "nativeType": "string" } ], - "doc": "Street name, number and apartment number." + "doc": "Plan unique ID" + }, + { + "name": "prevBenefit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBenefit", + "displayName": "Benefit" + } + ], + "doc": "Previous benefit" } ], "docs": { @@ -12167,265 +12560,259 @@ } }, { - "name": "bookingsV2BookingAllowedActions", + "name": "bookingsServicesV2ServiceBookAfterStartPolicy", "members": [ { - "name": "cancel", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Is cancel booking allowed" - }, - { - "name": "reschedule", + "name": "enabled", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Is reschedule booking allowed" + "doc": "Whether booking is allowed after the start of the schedule. When `true`,\ncustomers can book after the start of the schedule.\n\nDefault: `false`\n" } ], "docs": { "description": [ - "Possible allowed actions for a Booking" + "The policy for whether a session can be booked after the start of the schedule.\nThis policy and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this policy\nis enabled, the `LimitLateBookingPolicy` policy must be disabled." ] } }, { - "name": "bookingsV2BookingApplicationError", + "name": "bookingsServicesV2ServiceBookingPolicy", "members": [ { - "name": "code", + "name": "_createdDate", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Error code." + "doc": "Date and time the policy was created." }, { - "name": "data", + "name": "_id", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "Data related to the error." + "doc": "The ID to the policy for the booking." }, { - "name": "description", + "name": "_updatedDate", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Description of the error." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingBackendEventMetadata", - "members": [ + "doc": "Date and time the policy was updated." + }, { - "name": "entityId", + "name": "bookAfterStartPolicy", + "readOnly": true, + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBookAfterStartPolicy", + "displayName": "BookAfterStartPolicy" } ], - "doc": "ID of the entity associated with the event." + "doc": "Policy on booking an entity after the start of the schedule." }, { - "name": "eventTime", + "name": "cancellationPolicy", + "readOnly": true, + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCancellationPolicy", + "displayName": "CancellationPolicy" } ], - "doc": "Event timestamp." + "doc": "Policy for canceling a booked entity." }, { - "name": "id", + "name": "customPolicyDescription", + "readOnly": true, + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePolicyDescription", + "displayName": "PolicyDescription" } ], - "doc": "Event ID." + "doc": "Custom description for the policy. This policy is displayed to the participant." }, { - "name": "triggeredByAnonymizeRequest", + "name": "default", + "readOnly": true, + "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "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." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingBookedEntity", - "members": [ + "doc": "Whether the policy is the default for the meta site." + }, { - "name": "schedule", + "name": "limitEarlyBookingPolicy", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedSchedule", - "displayName": "BookedSchedule" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLimitEarlyBookingPolicy", + "displayName": "LimitEarlyBookingPolicy" } ], - "doc": "The booked schedule. The booking is automatically assigned to the schedule's sessions." + "doc": "Policy for limiting early bookings." }, { - "name": "slot", + "name": "limitLateBookingPolicy", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedSlot", - "displayName": "BookedSlot" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLimitLateBookingPolicy", + "displayName": "LimitLateBookingPolicy" } ], - "doc": "The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist." + "doc": "Policy for limiting late bookings." }, { - "name": "tags", + "name": "name", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "List of tags for the booking.\nSystem-assigned tags for sessions and schedules are:\n+ \"INDIVIDUAL\" Appointments, including appointments with more than 1 participant.\n+ \"GROUP\" Individual classes.\n+ \"COURSE\" Courses." + "doc": "Name of the policy." }, { - "name": "title", + "name": "participantsPolicy", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceParticipantsPolicy", + "displayName": "ParticipantsPolicy" } ], - "doc": "Session title at the time of booking." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfBookedEntityItemOneOf", - "members": [ - "schedule", - "slot" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingBookedEntityItemOneOf", - "members": [ + "doc": "Policy regarding the participants per booking." + }, { - "name": "schedule", + "name": "reschedulePolicy", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedSchedule", - "displayName": "BookedSchedule" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceReschedulePolicy", + "displayName": "ReschedulePolicy" } ], - "doc": "The booked schedule. The booking is automatically assigned to the schedule's sessions." + "doc": "Policy for rescheduling a booked entity." }, { - "name": "slot", + "name": "resourcesPolicy", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedSlot", - "displayName": "BookedSlot" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceResourcesPolicy", + "displayName": "ResourcesPolicy" } ], - "doc": "The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist." + "doc": "Policy for allocating resources." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the policy is updated. To prevent conflicting changes, the existing revision must be used when updating a policy." + }, + { + "name": "waitlistPolicy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceWaitlistPolicy", + "displayName": "WaitlistPolicy" + } + ], + "doc": "Waitlist policy for the service." } ], "docs": { "description": [ - "" + "`BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service\nby visitors and members." ] } }, { - "name": "bookingsV2BookingBookedResource", + "name": "bookingsServicesV2ServiceBookingPolicyWithServices", "members": [ { - "name": "_id", + "name": "bookingPolicy", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBookingPolicy", + "displayName": "BookingPolicy" } ], - "doc": "Booked resource ID." + "doc": "The booking policy." }, { - "name": "email", + "name": "countOfServices", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Resource's email at the time of booking." + "doc": "The number of services associated with the booking policy." }, { - "name": "name", + "name": "hasMoreServices", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Resource's name at the time of booking." + "doc": "Whether there are more services associated with the booking policy." }, { - "name": "scheduleId", + "name": "services", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ] + } } ], - "doc": "Resource's schedule ID." + "doc": "The services associated with the booking policy. Up to 5 services are returned per policy." } ], "docs": { @@ -12435,71 +12822,74 @@ } }, { - "name": "bookingsV2BookingBookedSchedule", + "name": "bookingsServicesV2ServiceBulkActionMetadata", "members": [ { - "name": "firstSessionStart", - "readOnly": true, + "name": "totalFailures", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "The start time of the first session in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat. Required." + "doc": "Number of items that couldn't be processed." }, { - "name": "lastSessionEnd", - "readOnly": true, + "name": "totalSuccesses", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "The end time of the last session in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat. Required." + "doc": "Number of items that were successfully processed." }, { - "name": "location", - "readOnly": true, + "name": "undetailedFailures", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingLocation", - "displayName": "Location" + "nativeType": "number" } ], - "doc": "Location where the schedule's sessions take place. Read only." - }, - { - "name": "scheduleId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Schedule ID." - }, + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBulkCreateServicesRequest", + "members": [ { - "name": "serviceId", + "name": "returnEntity", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Booked service ID." + "doc": "`true` if the created entities must be included in the response, otherwise no entities are included in the response." }, { - "name": "timezone", - "optional": true, + "name": "services", "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ] + } } ], - "doc": "The timezone according to which the slot was shown to the user when booking, and should be shown in future." + "doc": "Services to create" } ], "docs": { @@ -12509,89 +12899,154 @@ } }, { - "name": "bookingsV2BookingBookedSlot", + "name": "bookingsServicesV2ServiceBulkCreateServicesResponse", "members": [ { - "name": "endDate", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat." + "doc": "Create statistics." }, { - "name": "location", + "name": "results", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingLocation", - "displayName": "Location" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBulkServiceResult", + "displayName": "BulkServiceResult" + } + ] + } } ], - "doc": "Location where the slot's session takes place." + "doc": "The result of each service creation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBulkDeleteServicesRequest", + "members": [ + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" }, { - "name": "resource", + "name": "participantNotification", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedResource", - "displayName": "BookedResource" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2ParticipantNotification", + "displayName": "V2ParticipantNotification" } ], - "doc": "The resource assigned to the slot." + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`.\n" }, { - "name": "scheduleId", + "name": "preserveFutureSessionsWithParticipants", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Schedule ID. Required." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBulkDeleteServicesResponse", + "members": [ { - "name": "serviceId", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "Service ID." + "doc": "Update statistics." }, { - "name": "sessionId", + "name": "results", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBulkServiceResult", + "displayName": "BulkServiceResult" + } + ] + } } ], - "doc": "ID of the underlying session when session is a single session or generated from a recurring session.\nIf `sessionId` is defined in the `Create Booking` request, the `startDate`, `endDate`, `timezone`, `resource`, and `location` fields are ignored and populated from the existing session's information." - }, + "doc": "The result of each service removal." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBulkServiceResult", + "members": [ { - "name": "startDate", + "name": "item", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" } ], - "doc": "The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat." + "doc": "" }, { - "name": "timezone", + "name": "itemMetadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceItemMetadata", + "displayName": "ItemMetadata" } ], - "doc": "The timezone according to which the slot was shown to the user when booking, and should be shown in future." + "doc": "" } ], "docs": { @@ -12601,43 +13056,59 @@ } }, { - "name": "bookingsV2BookingBooking", + "name": "bookingsServicesV2ServiceBulkUpdateServicesRequest", "members": [ { - "name": "_createdDate", - "readOnly": true, + "name": "returnEntity", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "boolean" } ], - "doc": "Date and time the booking was created." + "doc": "`true` if the updated entities must be included in the response, otherwise no entities are included in the response." }, { - "name": "_id", - "readOnly": true, + "name": "services", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMaskedService", + "displayName": "MaskedService" + } + ] + } } ], - "doc": "Booking ID." - }, + "doc": "Services to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBulkUpdateServicesResponse", + "members": [ { - "name": "_updatedDate", - "readOnly": true, + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "Date and time the booking was updated." + "doc": "Update statistics." }, { - "name": "additionalFields", + "name": "results", "optional": true, "type": [ { @@ -12645,51 +13116,69 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCustomFormField", - "displayName": "CustomFormField" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBulkServiceResult", + "displayName": "BulkServiceResult" } ] } } ], - "doc": "Additional custom fields submitted with the booking form." - }, + "doc": "The result of each service update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBusinessLocation", + "members": [ { - "name": "bookedEntity", + "name": "locationId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedEntity", - "displayName": "BookedEntity" + "nativeType": "string" } ], - "doc": "An object describing the slot or schedule that was booked." - }, + "doc": "The ID of the business location. Has to be non-empty" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBusinessLocationOptions", + "members": [ { - "name": "contactDetails", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingContactDetails", - "displayName": "ContactDetails" + "nativeType": "string" } ], - "doc": "Contact details of the site visitor or member making the booking." + "doc": "Business location ID." }, { - "name": "createdBy", + "name": "address", "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingIdentificationData", - "displayName": "IdentificationData" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCommonAddress", + "displayName": "CommonAddress" } ], - "doc": "ID of the creator of the Booking.\nIf `appId` and another ID are present, the other ID takes precedence." + "doc": "Business location address. The address is derived from the business location and is read-only." }, { - "name": "doubleBooked", + "name": "default", "readOnly": true, "optional": true, "type": [ @@ -12697,187 +13186,10303 @@ "nativeType": "boolean" } ], - "doc": "Whether this booking overlaps another existing confirmed booking. Returned when: `true`" + "doc": "Whether this is the default location. There can only be 1 default location per site. The default location can't be archived." }, { - "name": "endDate", + "name": "name", "readOnly": true, "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The end date of this booking. For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session." - }, + "doc": "Business location name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceBusinessSchedule", + "members": [ { - "name": "extendedFields", + "name": "periods", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingExtendedFields", - "displayName": "ExtendedFields" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceTimePeriod", + "displayName": "TimePeriod" + } + ] + } } ], - "doc": "Additional custom fields. This includes fields managed by Wix, by 3rd-party apps, and by the site.\n\nEmpty fields are not returned.\n" + "doc": "Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods." }, { - "name": "externalUserId", + "name": "specialHourPeriod", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSpecialHourPeriod", + "displayName": "SpecialHourPeriod" + } + ] + } } ], - "doc": "External ID provided by the client app on creation." + "doc": "Exceptions to the business's regular hours. The business can be open or closed during the exception." + } + ], + "docs": { + "description": [ + "Business schedule. Regular and exceptional time periods when the business is open or the service is available." + ] + } + }, + { + "name": "bookingsServicesV2ServiceCalendarConference", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Wix Calendar conference ID." }, { - "name": "participantsChoices", + "name": "accountOwnerId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", - "displayName": "ParticipantChoices" + "nativeType": "string" } ], - "doc": "Information about the booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + "doc": "ID of the account owner in the video conferencing service." }, { - "name": "paymentStatus", - "readOnly": true, + "name": "conferenceType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Payment status.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." + "doc": "Conference type.\n" }, { - "name": "revision", + "name": "description", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision number to be used when updating, rescheduling, or cancelling the booking. Revision number, which increments by 1 each time the booking is updated, rescheduled, or canceled. To prevent conflicting changes,the current revision must be passed when updating the booking." + "doc": "Conference description." }, { - "name": "selectedPaymentOption", + "name": "externalId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Selected payment option.\nOne of the payment options offered by the service, or another option if `skipSelectedPaymentOptionValidation` is `true`.\nWhen undefined, the payment option is resolved by the service configuration on checkout." + "doc": "Conference meeting ID in the provider's conferencing system." }, { - "name": "startDate", + "name": "guestUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "URL used by a guest to join the conference." + }, + { + "name": "hostUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "URL used by the host to start the conference." + }, + { + "name": "password", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Password to join the conference." + }, + { + "name": "providerId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Conference provider ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCalendarDateTime", + "members": [ + { + "name": "localDateTime", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLocalDateTime", + "displayName": "LocalDateTime" + } + ], + "doc": "An object containing the local date and time for the business's time zone." + }, + { + "name": "timeZone", "readOnly": true, "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone. Optional. Derived from the schedule's time zone.\nIn case this field is associated with recurring session, this field is empty." + }, + { + "name": "timestamp", + "optional": true, "type": [ { "nativeType": "Date" } ], - "doc": "The start date of this booking. For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session." + "doc": "UTC date-time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. If a time zone 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\"`.\nRequired if `localDateTime` is not specified.\nIf `localDateTime` is specified, `timestamp` is calculated as `localDateTime`, using the business's time zone." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCancellationPolicy", + "members": [ + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether canceling a booking is allowed. When `true`, customers\ncan cancel the booking.\n\nDefault: `false`\n" }, { - "name": "status", + "name": "latestCancellationInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum number of minutes before the start of the booked session that the booking can be canceled.\n\nDefault: 1440 minutes (1 day)\nMin: 1 minute\n" + }, + { + "name": "limitLatestCancellation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there is a limit on the latest cancellation time. When `true`,\na time limit is enforced.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "The policy for canceling a booked session." + ] + } + }, + { + "name": "bookingsServicesV2ServiceCategory", + "members": [ + { + "name": "_id", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Booking status.\nOne of:\n- `\"CREATED\"` - The booking was created.\n- `\"UPDATED\"` - The booking was updated.\n- `\"CONFIRMED\"` - The booking was confirmed and appears on the bookings calendar.\nA booking can be manually confirmed using the [`Confirm Or Decline API`](www.example.com).\nA booking can be automatically confirmed when the following requirements are met:\n+ The service is configured as automatically confirmed.\n+ The system invoked the eCommerce checkout API and created an order.\n- `\"CANCELED\"` - The booking has been canceled and synced to the bookings calendar.\nThe booking can be canceled using [`Cancel Booking API`](www.example.com).\n- `\"PENDING\"` - The booking is waiting to be confirmed or declined by the owner and the booking is synced to the bookings calendar.\nBookings can be manually set as `PENDING` using the [`setAsPending` API](www.example.com), by those with Manage Booking Status permissions scopes.\nBookings can be automatically set as `PENDING` when the following requirements are met:\n+ The service is configured as manually confirmed.\n+ Invoking the eCommerce checkout API and an order has been created.\n- `\"WAITING_LIST\"` - The booking is on a waiting list.\n- `\"DECLINED\"` - The booking was declined by the owner and synced to the Bookings calendar.\nBookings can be manually declined using the [`Decline Booking` API](www.example.com) by those with Manage Booking Status permissions scopes.\nBooking can be automatically declined when one of the following requirements are met:\n+ Invoking the `eCommerce checkout` API and the order declined event has been sent.\n+ Invoking the `eCommerce checkout` API and order approved event has been sent, but the booking is offline and the booking causes a double booking." + "doc": "Category ID." }, { - "name": "totalParticipants", + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category name." + }, + { + "name": "sortOrder", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Total number of participants. Available only when the booking includes a single service variant." + "doc": "Sort order of the category in the Dashboard." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category status.\nSupported values:\n- \"CREATED\". The category is created.\n- \"DELETED\". The category is deleted.\nDefault: \"CREATED\"" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfBookingParticipantsInfoOneOf", - "members": [ - "participantsChoices", - "totalParticipants" - ] - } - ] - }, "docs": { "description": [ - "The booking object, version 2." + "Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI." ] } }, { - "name": "bookingsV2BookingBookingCanceled", + "name": "bookingsServicesV2ServiceCategoryNotification", "members": [ { - "name": "booking", + "name": "category", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCategory", + "displayName": "Category" } ], - "doc": "The canceled booking object." + "doc": "" }, { - "name": "flowControlSettings", + "name": "event", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCancelBookingFlowControlSettings", - "displayName": "CancelBookingFlowControlSettings" + "nativeType": "string" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + "doc": "Supported values:\n- `'Created'`\n- `'Deleted'`\n- `'Updated'`" + } + ], + "docs": { + "description": [ + "An event sent every time a category entity is changed." + ] + } + }, + { + "name": "bookingsServicesV2ServiceCloneServiceRequest", + "members": [ + { + "name": "cloneServiceName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "the name of the clone service. The title of the clone service's schedule will also be set to this name. When this parameter is omitted then the clone service will have the same name as the source service and the clone service's schedule will get the same title as the source service's active schedule." }, { - "name": "initiatedBy", + "name": "copyPricingPlans", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", - "displayName": "CommonIdentificationData" + "nativeType": "boolean" } ], - "doc": "ID of the cancelation initiator." + "doc": "copy benefits with pricing plans that are connected to the source service. If the source service is connected to more than 120 benefits with pricing plans then they will not be copied. In that case the field `error_types` in the response will include `PRICING_PLANS`." }, { - "name": "participantNotification", + "name": "copyRecurringSessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Information about whether to notify the customer about the cancelation and the message to send." + "doc": "copy recurring sessions of an active service's schedule" }, { - "name": "previousStatus", + "name": "hideService", "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "whether to hide service from the list or not. Empty means that we will copy this value from the source service without overriding it" + }, + { + "name": "sourceServiceId", "type": [ { "nativeType": "string" } ], - "doc": "The previous status of the booking." + "doc": "ID of a source service" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCloneServiceResponse", + "members": [ + { + "name": "errors", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of entity types that we failed to clone" + }, + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "Cloned service" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCommonAddress", + "members": [ + { + "name": "addressLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Main address line, usually street and number as free text." + }, + { + "name": "addressLine1", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Main address line, usually street and number as free text." + }, + { + "name": "city", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "City name." + }, + { + "name": "country", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + }, + { + "name": "formatted", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Full address of the location." + }, + { + "name": "postalCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Postal or zip code." + }, + { + "name": "streetAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCommonStreetAddress", + "displayName": "CommonStreetAddress" + } + ], + "doc": "Street name and number." + }, + { + "name": "subdivision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCommonAddressStreetOneOf", + "members": [ + "addressLine", + "streetAddress" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCommonAddressLocation", + "members": [ + { + "name": "latitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Address latitude." + }, + { + "name": "longitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Address longitude." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCommonAddressStreetOneOf", + "members": [ + { + "name": "addressLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Main address line, usually street and number as free text." + }, + { + "name": "streetAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCommonStreetAddress", + "displayName": "CommonStreetAddress" + } + ], + "doc": "Street name and number." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCommonStreetAddress", + "members": [ + { + "name": "apt", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Apartment number." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street name." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street number." + } + ], + "docs": { + "description": [ + "Street address. Includes street name, number, and apartment number in separate fields." + ] + } + }, + { + "name": "bookingsServicesV2ServiceConferenceProvider", + "members": [ + { + "name": "providerId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Conferencing provider ID" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceConferencing", + "members": [ + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a conference link is generated for the service's sessions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCountServicesRequest", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "The filters for performing the count." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCountServicesResponse", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of services matching the given filter." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCreateServiceRequest", + "members": [ + { + "name": "service", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "Service to be created." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCreateServiceResponse", + "members": [ + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "The created service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCursors", + "displayName": "Cursors" + } + ], + "doc": "Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging)." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCursorQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCursorQueryPagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCursorQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCustomLocationOptions", + "members": [ + { + "name": "address", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCommonAddress", + "displayName": "CommonAddress" + } + ], + "doc": "A custom address for the location." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceCustomPayment", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom description explaining to the customer how to pay for the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDeleteServiceRequest", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2ParticipantNotification", + "displayName": "V2ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message." + }, + { + "name": "preserveFutureSessionsWithParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`\n" + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDeleteServiceResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDiffmatokyPayload", + "members": [ + { + "name": "compareChannel", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "errorInformation", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceErrorInformation", + "displayName": "ErrorInformation" + } + ], + "doc": "" + }, + { + "name": "left", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "right", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDisablePricingPlansForServiceRequest", + "members": [ + { + "name": "pricingPlanIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "ID of the pricing plans to disconnect from the service." + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to disconnect the pricing plans from." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDisablePricingPlansForServiceResponse", + "members": [ + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "The service after the pricing plans update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDiscount", + "members": [ + { + "name": "moneyOffAmount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Absolute amount discount" + }, + { + "name": "percentOffRate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fixed-rate percent off discount" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDiscountDiscountOneOf", + "members": [ + "moneyOffAmount", + "percentOffRate" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDiscountDiscountOneOf", + "members": [ + { + "name": "moneyOffAmount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Absolute amount discount" + }, + { + "name": "percentOffRate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fixed-rate percent off discount" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceEmpty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceEnablePricingPlansForServiceRequest", + "members": [ + { + "name": "pricingPlanIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the pricing plans to connect to the service." + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to add the pricing plans to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceEnablePricingPlansForServiceResponse", + "members": [ + { + "name": "pricingPlanIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the pricing plans connected to the service." + }, + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "The service after the pricing plans update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceEntryPass", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceErrorInformation", + "members": [ + { + "name": "stackTrace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceExtendedFields", + "members": [ + { + "name": "namespaces", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "Object" + } + ] + } + } + ], + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceExternalCalendarInfo", + "members": [ + { + "name": "calendarType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceExternalCalendarOverrides", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Synced description of the external calendar event." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Synced title of the external calendar event." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceFixedPayment", + "members": [ + { + "name": "deposit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMoney", + "displayName": "Money" + } + ], + "doc": "The deposit price required to book the service.\n\nRequired when: `rateType` is `FIXED` and `paymentOptions.deposit` is `true`\n" + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMoney", + "displayName": "Money" + } + ], + "doc": "The fixed price required to book the service.\n\nRequired when: `rateType` is `FIXED`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceForm", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the form associated with the service.\nThe form information that is submitted when booking includes contact details, participants, and other form fields set up for the service.\nYou can manage the service booking form fields using the [Bookings Forms API](https://dev.wix.com/api/rest/wix-bookings/services-v2/form/form-object)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceFormSettings", + "members": [ + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the service booking form should be hidden from the site." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceFrequency", + "members": [ + { + "name": "repetition", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceGetServiceAvailabilityConstraintsRequest", + "members": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceGetServiceAvailabilityConstraintsResponse", + "members": [ + { + "name": "constraints", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceServiceAvailabilityConstraints", + "displayName": "ServiceAvailabilityConstraints" + } + ], + "doc": "The retrieved availability constraints of the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceGetServiceRequest", + "members": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceGetServiceResponse", + "members": [ + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "The retrieved service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceHtmlSitePublished", + "members": [ + { + "name": "appInstanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Application instance ID" + }, + { + "name": "appType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Application type" + }, + { + "name": "branchId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "optional branch id if publish is done from branch" + }, + { + "name": "lastTransactionId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The site's last transactionId" + }, + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "MSID" + }, + { + "name": "pages", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePage", + "displayName": "Page" + } + ] + } + } + ], + "doc": "A list of the site's pages" + }, + { + "name": "publishDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site's publish date" + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceInterval", + "members": [ + { + "name": "daysOfWeek", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." + }, + { + "name": "duration", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation. minimum: 1, maximum: 86400." + }, + { + "name": "hourOfDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23." + }, + { + "name": "minuteOfHour", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceIntervalSplit", + "members": [ + { + "name": "intervals", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceRecurringInterval", + "displayName": "RecurringInterval" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "newScheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "oldScheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceInvalidPricingPlan", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The invalid pricing plan id." + }, + { + "name": "message", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The reason for the pricing plan considered as invalid" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceItemMetadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + }, + { + "name": "error", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceApplicationError", + "displayName": "ApplicationError" + } + ], + "doc": "Details about the error in case of failure." + }, + { + "name": "originalIndex", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceKeyword", + "members": [ + { + "name": "isMain", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the keyword is the main focus keyword." + }, + { + "name": "term", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Keyword value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceLimitEarlyBookingPolicy", + "members": [ + { + "name": "earliestBookingInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of minutes before the start of the session that a booking can be made. This value must be greater\nthan `latest_booking_in_minutes` in the `LimitLateBookingPolicy` policy.\n\nDefault: 10080 minutes (7 days)\nMin: 1 minute\n" + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there is a limit on how early a customer\ncan book. When `false`, there is no limit on the earliest\nbooking time and customers can book in advance, as early as they like.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "The policy for limiting early bookings." + ] + } + }, + { + "name": "bookingsServicesV2ServiceLimitLateBookingPolicy", + "members": [ + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there is a limit on how late a customer\ncan book. When `false`, there is no limit on the latest\nbooking time and customers can book up to the last minute.\n\nDefault: `false`\n" + }, + { + "name": "latestBookingInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum number of minutes before the start of the session that a booking can be made.\nFor a schedule, this is relative to the start time of the next booked session, excluding past-booked sessions.\nThis value must be less than `earliest_booking_in_minutes` in the `LimitEarlyBookingPolicy` policy.\n\nDefault: 1440 minutes (1 day)\nMin: 1 minute\n" + } + ], + "docs": { + "description": [ + "The policy for limiting late bookings." + ] + } + }, + { + "name": "bookingsServicesV2ServiceLinkedSchedule", + "members": [ + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID." + }, + { + "name": "scheduleOwnerId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Owner ID, of the linked schedule." + }, + { + "name": "transparency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\n\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions.\n\n\n\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceLocalDateTime", + "members": [ + { + "name": "dayOfMonth", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Day of the month, from 1-31." + }, + { + "name": "hourOfDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Hour of the day in 24-hour format, from 0-23." + }, + { + "name": "minutesOfHour", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minute, from 0-59." + }, + { + "name": "monthOfYear", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Month number, from 1-12." + }, + { + "name": "year", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Year. 4-digit format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceLocation", + "members": [ + { + "name": "address", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Free text address used when locationType is `OWNER_CUSTOM`." + }, + { + "name": "customAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceAddress", + "displayName": "Address" + } + ], + "doc": "Custom address, used when locationType is `\"OWNER_CUSTOM\"`. Might be used when locationType is `\"CUSTOM\"` in case the owner sets a custom address for the session which is different from the default." + }, + { + "name": "locationType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location type.\nOne of:\n- `\"OWNER_BUSINESS\"` The business address as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"` The address as set when creating the service.\n- `\"CUSTOM\"` The address set for the individual session." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceLocationsAddress", + "members": [ + { + "name": "city", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "City name." + }, + { + "name": "country", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + }, + { + "name": "formatted", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Full address of the location." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLocationsAddressLocation", + "displayName": "LocationsAddressLocation" + } + ], + "doc": "Geographic coordinates of location." + }, + { + "name": "postalCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Postal or zip code." + }, + { + "name": "streetAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLocationsStreetAddress", + "displayName": "LocationsStreetAddress" + } + ], + "doc": "Street address. Includes street name, number, and apartment number in separate fields." + }, + { + "name": "subdivision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceLocationsAddressLocation", + "members": [ + { + "name": "latitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Latitude of the location. Must be between -90 and 90." + }, + { + "name": "longitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Longitude of the location. Must be between -180 and 180." + } + ], + "docs": { + "description": [ + "Address Geolocation" + ] + } + }, + { + "name": "bookingsServicesV2ServiceLocationsLocation", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location ID." + }, + { + "name": "address", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLocationsAddress", + "displayName": "LocationsAddress" + } + ], + "doc": "Address." + }, + { + "name": "archived", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the location is archived. Archived locations can't be updated.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect its `status`." + }, + { + "name": "businessSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBusinessSchedule", + "displayName": "BusinessSchedule" + } + ], + "doc": "Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n\n__Note:__ Not supported by Wix Bookings.\n" + }, + { + "name": "default", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this is the default location. There can only be one default location per site. The default location can't be archived." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location description." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Email address." + }, + { + "name": "fax", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fax number." + }, + { + "name": "locationType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location type.\n\n**Note:** Currently not supported.\n" + }, + { + "name": "locationTypes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Location types." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location name." + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Phone number." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the location is updated.\nTo prevent conflicting changes, the existing revision must be used when updating a location." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location status. Defaults to `ACTIVE`.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status. `INACTIVE` is currently not supported." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Timezone in `America/New_York` format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceLocationsStreetAddress", + "members": [ + { + "name": "apt", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Apartment number." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street name." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street number." + } + ], + "docs": { + "description": [ + "Street address. Includes street name, number, and apartment number in separate fields." + ] + } + }, + { + "name": "bookingsServicesV2ServiceMaskedService", + "members": [ + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "Service to update. [Partial updates](https://dev.wix.com/api/rest/wix-bookings/bookings/patch-endpoints-and-field-masks-in-update-requests) are supported." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceMedia", + "members": [ + { + "name": "coverMedia", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Cover media associated with the service." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMediaItem", + "displayName": "MediaItem" + } + ] + } + } + ], + "doc": "Media items associated with the service." + }, + { + "name": "mainMedia", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Primary media associated with the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceMediaItem", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Details of the image associated with the service, such as URL and size." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaItemItemOneOf", + "members": [ + "image" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceMediaItemItemOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Details of the image associated with the service, such as URL and size." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceMigrationData", + "members": [ + { + "name": "businessId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "staffs", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceStaffData", + "displayName": "StaffData" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceMigrationEvent", + "members": [ + { + "name": "migrationData", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMigrationData", + "displayName": "MigrationData" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceMoney", + "members": [ + { + "name": "currency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Currency code. Must be valid ISO 4217 currency code (e.g., USD)." + }, + { + "name": "formattedValue", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative." + } + ], + "docs": { + "description": [ + "Money.\nDefault format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003." + ] + } + }, + { + "name": "bookingsServicesV2ServiceMoveToNewLocationsOptions", + "members": [ + { + "name": "newLocation", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2Location", + "displayName": "V2Location" + } + ], + "doc": "The new location to move existing sessions currently set to a removed location, used when `action` is `MOVE_TO_LOCATION`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceMultiServiceEnabledNotification", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceMultipleSessionsCreated", + "members": [ + { + "name": "schedulesWithSessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleWithSessions", + "displayName": "ScheduleWithSessions" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceOnlineBooking", + "members": [ + { + "name": "allowMultipleRequests", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Multiple customers can request to book the same time slot. Relevant when `requireManualApproval` is `true`." + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this service can be booked online.\nWhen set to `true`, customers can book the service online. Configuring the payment options is done via `service.payment` property.\nWhen set to `false`, customers cannot book the service online, and the service can only be paid for in person." + }, + { + "name": "requireManualApproval", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Booking the service requires approval by the business owner." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServicePage", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Page's Id" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServicePaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServicePagingMetadataV2", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCursors", + "displayName": "Cursors" + } + ], + "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "tooManyToCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag that indicates the server failed to calculate the `total` field." + }, + { + "name": "total", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceParticipant", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Participant ID. Currently represents the booking.id." + }, + { + "name": "approvalStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Approval status for the participant.\n\n" + }, + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact ID." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Participant's email address." + }, + { + "name": "inherited", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the participant was inherited from the schedule, as opposed to being booked directly to the session." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Participant's name." + }, + { + "name": "partySize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Group or party size. The number of people attending. Defaults to 0. Maximum is 250." + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Participant's phone number." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceParticipantNotification", + "members": [ + { + "name": "message", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom message to send to the participants about the changes to the booking." + }, + { + "name": "notifyParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceParticipantsPolicy", + "members": [ + { + "name": "maxParticipantsPerBooking", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of participants allowed.\n\nDefault: 1 participant\nMin: 1 participant\n" + } + ], + "docs": { + "description": [ + "The policy for the maximum number of participants per booking." + ] + } + }, + { + "name": "bookingsServicesV2ServicePayment", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCustomPayment", + "displayName": "CustomPayment" + } + ], + "doc": "The details for the custom price of the service.\n\nRequired when: `rateType` is `CUSTOM`\n" + }, + { + "name": "fixed", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceFixedPayment", + "displayName": "FixedPayment" + } + ], + "doc": "The details for the fixed price of the service.\n\nRequired when: `rateType` is `FIXED`\n" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePaymentOptions", + "displayName": "PaymentOptions" + } + ], + "doc": "The payment options a customer can use to pay for the service." + }, + { + "name": "pricingPlanIds", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of pricing plans that can be used as payment for the service." + }, + { + "name": "rateType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The rate the customer is expected to pay for the service.\nCan be:\n- `FIXED`: The service has a fixed price.\n- `CUSTOM`: The service has a custom price, expressed as a price description.\n- `VARIED`: This service is offered with a set of different prices based on different terms.\n- `NO_FEE`: This service is offered free of charge." + }, + { + "name": "varied", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceVariedPayment", + "displayName": "VariedPayment" + } + ], + "doc": "The details for the varied pricing of the service.\nRead more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).\n\nRequired when: `rateType` is `VARIED`\n" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPaymentRateOneOf", + "members": [ + "custom", + "fixed", + "varied" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServicePaymentOptions", + "members": [ + { + "name": "deposit", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "This service requires a deposit to be made online in order to book it.\nWhen `true`:\n+ `rateType` must be `VARIED` or `FIXED`.\n+ A `deposit` must be specified." + }, + { + "name": "inPerson", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Customers can pay for the service in person." + }, + { + "name": "online", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Customers can pay for the service online.\nWhen `true`:\n+ `rateType` must be either `FIXED` or `VARIED`.\n+ `fixed.price` or `varied.default_price` must be specified respectively. Read more about [getting paid online](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online)." + }, + { + "name": "pricingPlan", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Customers can pay for the service using a pricing plan." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServicePaymentRateOneOf", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCustomPayment", + "displayName": "CustomPayment" + } + ], + "doc": "The details for the custom price of the service.\n\nRequired when: `rateType` is `CUSTOM`\n" + }, + { + "name": "fixed", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceFixedPayment", + "displayName": "FixedPayment" + } + ], + "doc": "The details for the fixed price of the service.\n\nRequired when: `rateType` is `FIXED`\n" + }, + { + "name": "varied", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceVariedPayment", + "displayName": "VariedPayment" + } + ], + "doc": "The details for the varied pricing of the service.\nRead more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).\n\nRequired when: `rateType` is `VARIED`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServicePolicyDescription", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The description to display.\n\nDefault: Empty\nMax length: 1000 characters\n" + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the description should be displayed. If `true`, the description is displayed.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "A description of the policy to display to participants." + ] + } + }, + { + "name": "bookingsServicesV2ServicePrice", + "members": [ + { + "name": "amount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Required payment amount." + }, + { + "name": "currency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Currency in which the amount is quoted." + }, + { + "name": "downPayAmount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Amount of a down payment or deposit as part of the transaction." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceQueryPoliciesRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCursorQuery", + "displayName": "CursorQuery" + } + ], + "doc": "WQL expression." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceQueryPoliciesResponse", + "members": [ + { + "name": "bookingPolicies", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBookingPolicyWithServices", + "displayName": "BookingPolicyWithServices" + } + ] + } + } + ], + "doc": "The retrieved policies." + }, + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCursorPagingMetadata", + "displayName": "CursorPagingMetadata" + } + ], + "doc": "Paging metadata, including offset and count." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceQueryServicesRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceQueryV2", + "displayName": "QueryV2" + } + ], + "doc": "WQL expression." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceQueryServicesResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePagingMetadataV2", + "displayName": "PagingMetadataV2" + } + ], + "doc": "Paging metadata, including offset and count." + }, + { + "name": "services", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ] + } + } + ], + "doc": "The retrieved services." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceQueryV2", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object in the following format:\n\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\n\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`\n\nRead more about [supported fields and operators](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting).\n" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePaging", + "displayName": "Paging" + } + ], + "doc": "Paging options to limit and skip the number of items." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[ {\"fieldName\":\"sortField1\",\"order\":\"ASC\"},\n{\"fieldName\":\"sortField2\",\"order\":\"DESC\"} ]`\n\nRead more about [sorting](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting#wix-bookings_services-v2_filtering-and-sorting_sorting).\n" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfQueryV2PagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceQueryV2PagingMethodOneOf", + "members": [ + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePaging", + "displayName": "Paging" + } + ], + "doc": "Paging options to limit and skip the number of items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceRate", + "members": [ + { + "name": "labeledPriceOptions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePrice", + "displayName": "Price" + } + ] + } + } + ], + "doc": "Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + }, + { + "name": "priceText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceRecurringInterval", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The recurring interval identifier." + }, + { + "name": "affectedSchedules", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLinkedSchedule", + "displayName": "LinkedSchedule" + } + ] + } + } + ], + "doc": "Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval." + }, + { + "name": "end", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The end time of the recurring interval. Optional. Empty value indicates that there is no end time." + }, + { + "name": "frequency", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceFrequency", + "displayName": "Frequency" + } + ], + "doc": "The frequency of the interval. Optional. The default is frequency with the default repetition." + }, + { + "name": "interval", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceInterval", + "displayName": "Interval" + } + ], + "doc": "The interval rules. The day, hour and minutes the interval is recurring." + }, + { + "name": "intervalType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of recurring interval.\n" + }, + { + "name": "start", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The start time of the recurring interval. Required." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceRecurringSessionSplit", + "members": [ + { + "name": "newScheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "oldScheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "recurringSessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSession", + "displayName": "Session" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceRecurringSessionsUpdated", + "members": [ + { + "name": "newRecurringSessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSession", + "displayName": "Session" + } + ] + } + } + ], + "doc": "New schedule's recurring session list." + }, + { + "name": "oldRecurringSessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSession", + "displayName": "Session" + } + ] + } + } + ], + "doc": "Old schedule's recurring session list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceRemovedLocationSessionsAction", + "members": [ + { + "name": "action", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The action to perform on sessions currently set to a removed location. For example, move existing sessions to a new specified location." + }, + { + "name": "moveToLocationOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMoveToNewLocationsOptions", + "displayName": "MoveToNewLocationsOptions" + } + ], + "doc": "Options related to the action, such as a new location to move existing sessions to." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfRemovedLocationSessionsActionActionOptionsOneOf", + "members": [ + "moveToLocationOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceRemovedLocationSessionsActionActionOptionsOneOf", + "members": [ + { + "name": "moveToLocationOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMoveToNewLocationsOptions", + "displayName": "MoveToNewLocationsOptions" + } + ], + "doc": "Options related to the action, such as a new location to move existing sessions to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceReschedulePolicy", + "members": [ + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether rescheduling a booking is allowed. When `true`, customers\ncan reschedule the booking.\n\nDefault: `false`\n" + }, + { + "name": "latestRescheduleInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum number of minutes before the start of the booked session that the booking can be rescheduled.\n\nDefault: 1440 minutes (1 day)\nMin: 1 minute\n" + }, + { + "name": "limitLatestReschedule", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there is a limit on the latest reschedule time. When `true`,\na time limit is enforced.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "The policy for rescheduling a booked session." + ] + } + }, + { + "name": "bookingsServicesV2ServiceResource", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource ID." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource description." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource email address." + }, + { + "name": "images", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource images." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource name." + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource phone number." + }, + { + "name": "scheduleIds", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of IDs of schedules owned by this resource." + }, + { + "name": "schedules", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSchedule", + "displayName": "Schedule" + } + ] + } + } + ], + "doc": "Deprecated. Please use scheduleIds. List of the schedules owned by this resource. Min size 1." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource status.\n" + }, + { + "name": "tag", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Deprecated. Please use tags." + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource tags. Tags are used to identify, group, and filter the different types of resources. For example, 'staff' or 'room'." + }, + { + "name": "wixUserId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Wix user ID, if the resource is associated with the Wix user.\nA staff member resource can be associated with a Wix user via assignment of a permissions role in the business manager.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceResourceGroup", + "members": [ + { + "name": "requiredResourcesNumber", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "How many resources of the group / resource ids are required in order to book the service.\nDefaults to 1." + }, + { + "name": "resourceGroupId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An optional resource group id, if provided it references a resource group in the resource groups API.\nTODO - referenced_entity annotation" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceResourceIds", + "displayName": "ResourceIds" + } + ], + "doc": "Resource ids, each referencing a resource in resources API. may be a subset of resources within a resource group.\nTODO - referenced_entity annotation" + }, + { + "name": "selectableResource", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If set to `true`, the custom can select the specific resources while booking the service.\nIf set to `false`, the resources required for to book the service would be auto selected at the time of the booking.\nDefaults to false." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceResourceIds", + "members": [ + { + "name": "values", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Values of the resource ids. TODO - referenced_entity annotation" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceResourceNotification", + "members": [ + { + "name": "event", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event type." + }, + { + "name": "resource", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceResource", + "displayName": "Resource" + } + ], + "doc": "Updated resource entity.\n'resource.schedules' is deprecated and will not be returned. Please use 'resource.scheduleIds' instead." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceResourceType", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the resource." + }, + { + "name": "name", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the resource type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceResourcesPolicy", + "members": [ + { + "name": "autoAssignAllowed", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "`true`, if it is allowed to automatically assign a resource when booking an appointment,\n`false`, if the client must always select a resource.\n\nDefault: `false`\n" + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "`true` if this policy is enabled, `false` otherwise.\nWhen `false` then the client must always select a resource when booking an appointment." + } + ], + "docs": { + "description": [ + "The policy regarding the allocation of resources (e.g. staff members)." + ] + } + }, + { + "name": "bookingsServicesV2ServiceSchedule", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID." + }, + { + "name": "availability", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceAvailability", + "displayName": "Availability" + } + ], + "doc": "__Deprecated.__" + }, + { + "name": "calendarConference", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCalendarConference", + "displayName": "CalendarConference" + } + ], + "doc": "A conference created for the schedule. This is used when a participant is added to a schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." + }, + { + "name": "capacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of participants that can be added to the schedule's sessions.\nMust be at most `1` for schedule whose availability is affected by another schedule. E.g, appointment schedules of the Wix Bookings app." + }, + { + "name": "conferenceProvider", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceConferenceProvider", + "displayName": "ConferenceProvider" + } + ], + "doc": "__Deprecated.__" + }, + { + "name": "created", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Schedule creation date." + }, + { + "name": "externalCalendarOverrides", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceExternalCalendarOverrides", + "displayName": "ExternalCalendarOverrides" + } + ], + "doc": "__Deprecated.__" + }, + { + "name": "inheritedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Fields which were inherited from the Business Info page under Settings in the Dashboard." + }, + { + "name": "intervals", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceRecurringInterval", + "displayName": "RecurringInterval" + } + ] + } + } + ], + "doc": "Deprecated. Please use the [Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/session) instead." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLocation", + "displayName": "Location" + } + ], + "doc": "Default location for the schedule's sessions." + }, + { + "name": "participants", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceParticipant", + "displayName": "Participant" + } + ] + } + } + ], + "doc": "*Partial list** of participants which are registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule.\nTo retrieve the full list of schedule participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceRate", + "displayName": "Rate" + } + ], + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." + }, + { + "name": "scheduleOwnerId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the schedule's owner entity. This may be a resource ID or a service ID." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule status." + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "__Deprecated.__\nTags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." + }, + { + "name": "timeZone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule's time zone in [Area/Location](https://en.wikipedia.org/wiki/Tz_database) format. Read-only.\nDerived from the Wix Business time zone." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default title for the schedule's sessions. Maximum length: 6000 characters." + }, + { + "name": "totalNumberOfParticipants", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of participants registered to sessions in this schedule, calculated as the sum of the party sizes." + }, + { + "name": "updated", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Schedule last update date." + }, + { + "name": "version", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Schedule version number, updated each time the schedule is updated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceScheduleCancelled", + "members": [ + { + "name": "oldSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceScheduleCreated", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceScheduleNotification", + "members": [ + { + "name": "availabilityPolicyUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceAvailabilityPolicyUpdated", + "displayName": "AvailabilityPolicyUpdated" + } + ], + "doc": "" + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "intervalSplit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceIntervalSplit", + "displayName": "IntervalSplit" + } + ], + "doc": "" + }, + { + "name": "notifyParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to notify participants about changed sessions. deprecated, use participant_notification" + }, + { + "name": "preserveFutureSessionsWithParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "" + }, + { + "name": "recurringSessionSplit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceRecurringSessionSplit", + "displayName": "RecurringSessionSplit" + } + ], + "doc": "" + }, + { + "name": "scheduleCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleCancelled", + "displayName": "ScheduleCancelled" + } + ], + "doc": "" + }, + { + "name": "scheduleCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleCreated", + "displayName": "ScheduleCreated" + } + ], + "doc": "" + }, + { + "name": "scheduleUnassignedFromUser", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleUnassignedFromUser", + "displayName": "ScheduleUnassignedFromUser" + } + ], + "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." + }, + { + "name": "scheduleUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleUpdated", + "displayName": "ScheduleUpdated" + } + ], + "doc": "" + }, + { + "name": "sessionCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSessionCancelled", + "displayName": "SessionCancelled" + } + ], + "doc": "" + }, + { + "name": "sessionCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSessionCreated", + "displayName": "SessionCreated" + } + ], + "doc": "" + }, + { + "name": "sessionUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSessionUpdated", + "displayName": "SessionUpdated" + } + ], + "doc": "" + }, + { + "name": "siteProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSitePropertiesOnScheduleCreation", + "displayName": "SitePropertiesOnScheduleCreation" + } + ], + "doc": "site properties. Optional. Given in create schedule notification." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfScheduleNotificationEventOneOf", + "members": [ + "availabilityPolicyUpdated", + "intervalSplit", + "migrationEvent", + "multipleSessionsCreated", + "recurringSessionSplit", + "scheduleCancelled", + "scheduleCreated", + "scheduleUnassignedFromUser", + "scheduleUpdated", + "sessionCancelled", + "sessionCreated", + "sessionUpdated" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceScheduleNotificationEventOneOf", + "members": [ + { + "name": "availabilityPolicyUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceAvailabilityPolicyUpdated", + "displayName": "AvailabilityPolicyUpdated" + } + ], + "doc": "" + }, + { + "name": "intervalSplit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceIntervalSplit", + "displayName": "IntervalSplit" + } + ], + "doc": "" + }, + { + "name": "recurringSessionSplit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceRecurringSessionSplit", + "displayName": "RecurringSessionSplit" + } + ], + "doc": "" + }, + { + "name": "scheduleCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleCancelled", + "displayName": "ScheduleCancelled" + } + ], + "doc": "" + }, + { + "name": "scheduleCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleCreated", + "displayName": "ScheduleCreated" + } + ], + "doc": "" + }, + { + "name": "scheduleUnassignedFromUser", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleUnassignedFromUser", + "displayName": "ScheduleUnassignedFromUser" + } + ], + "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." + }, + { + "name": "scheduleUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceScheduleUpdated", + "displayName": "ScheduleUpdated" + } + ], + "doc": "" + }, + { + "name": "sessionCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSessionCancelled", + "displayName": "SessionCancelled" + } + ], + "doc": "" + }, + { + "name": "sessionCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSessionCreated", + "displayName": "SessionCreated" + } + ], + "doc": "" + }, + { + "name": "sessionUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSessionUpdated", + "displayName": "SessionUpdated" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceScheduleUnassignedFromUser", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSchedule", + "displayName": "Schedule" + } + ], + "doc": "The schedule that was unassigned from the user." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The Wix user id." + } + ], + "docs": { + "description": [ + "Schedule unassigned from user." + ] + } + }, + { + "name": "bookingsServicesV2ServiceScheduleUpdated", + "members": [ + { + "name": "newSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSchedule", + "displayName": "Schedule" + } + ], + "doc": "The new schedule after the update." + }, + { + "name": "oldSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSchedule", + "displayName": "Schedule" + } + ], + "doc": "The old schedule before the update." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "recurringSessions", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceRecurringSessionsUpdated", + "displayName": "RecurringSessionsUpdated" + } + ], + "doc": "Recurring sessions updated event. If this field is given, the reason for the schedule updated event was\nupdating at least one of the given schedule's recurring sessions.\nThis event is triggered by create/update/delete recurring session apis." + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceScheduleWithSessions", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + }, + { + "name": "sessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSession", + "displayName": "Session" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "siteProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSitePropertiesOnScheduleCreation", + "displayName": "SitePropertiesOnScheduleCreation" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSearchServicesRequest", + "members": [ + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePaging", + "displayName": "Paging" + } + ], + "doc": "Pagination, including offset, and limit." + }, + { + "name": "query", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The search term used to match services." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSearchServicesResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePagingMetadataV2", + "displayName": "PagingMetadataV2" + } + ], + "doc": "Paging metadata, including offset and count." + }, + { + "name": "services", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ] + } + } + ], + "doc": "The retrieved services." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSeoSchema", + "members": [ + { + "name": "settings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSettings", + "displayName": "Settings" + } + ], + "doc": "SEO general settings." + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceTag", + "displayName": "Tag" + } + ] + } + } + ], + "doc": "SEO tag information." + } + ], + "docs": { + "description": [ + "The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.\nThe search engines use this information for ranking purposes, or to display snippets in the search results.\nThis data will override other sources of tags (for example patterns) and will be included in the section of the HTML document, while not being displayed on the page itself." + ] + } + }, + { + "name": "bookingsServicesV2ServiceService", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the service was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the service was updated." + }, + { + "name": "bookingPolicy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBookingPolicy", + "displayName": "BookingPolicy" + } + ], + "doc": "Policy determining under what conditions this service can be booked. For example, whether the service can only be booked up to 30 minutes before it begins." + }, + { + "name": "category", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2Category", + "displayName": "V2Category" + } + ], + "doc": "The category the service is associated with." + }, + { + "name": "conferencing", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceConferencing", + "displayName": "Conferencing" + } + ], + "doc": "Conferencing options for this service." + }, + { + "name": "defaultCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service description, such as `High-class hair styling, cuts, straightening and color.`" + }, + { + "name": "extendedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Extensions enabling users to save custom data related to the service." + }, + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceForm", + "displayName": "Form" + } + ], + "doc": "The form used when booking the service." + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the service is hidden from the site." + }, + { + "name": "locations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2Location", + "displayName": "V2Location" + } + ] + } + } + ], + "doc": "The locations this service is offered at.\nIn case of multiple (more than 1) location, All locations must be of type `BUSINESS`.\nFor courses only: Currently, only 1 location is supported, for all location types." + }, + { + "name": "mainSlug", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSlug", + "displayName": "Slug" + } + ], + "doc": "The main slug for the service. `mainSlug` is either taken from the current service name or is a custom slug set by the business owner.\n`mainSlug` is used to construct the service's URLs." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMedia", + "displayName": "Media" + } + ], + "doc": "Media associated with the service." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service name." + }, + { + "name": "onlineBooking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceOnlineBooking", + "displayName": "OnlineBooking" + } + ], + "doc": "Online booking settings." + }, + { + "name": "payment", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServicePayment", + "displayName": "Payment" + } + ], + "doc": "Payment options for booking the service." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the service is updated. To prevent conflicting changes, the existing revision must be used when updating a service." + }, + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2Schedule", + "displayName": "V2Schedule" + } + ], + "doc": "The service's schedule, which can be used to manage the service's sessions." + }, + { + "name": "seoData", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSeoSchema", + "displayName": "SeoSchema" + } + ], + "doc": "Custom SEO data for the service." + }, + { + "name": "sortOrder", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Order of a service within a category." + }, + { + "name": "staffMemberIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the staff members providing the service. For appointments only." + }, + { + "name": "supportedSlugs", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSlug", + "displayName": "Slug" + } + ] + } + } + ], + "doc": "A slug is the last part of the URL address that serves as a unique identifier of the service.\nThe list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner." + }, + { + "name": "tagLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Short service description, such as `Hair styling.`" + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service type." + }, + { + "name": "urls", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceUrLs", + "displayName": "URLs" + } + ], + "doc": "URLs to various service-related pages, such as the calendar page and the booking page." + } + ], + "docs": { + "description": [ + "The `Service` object represents the business offering that a business provides to its customers." + ] + } + }, + { + "name": "bookingsServicesV2ServiceServiceAvailabilityConstraints", + "members": [ + { + "name": "bookingPolicy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBookingPolicy", + "displayName": "BookingPolicy" + } + ], + "doc": "The booking policy." + }, + { + "name": "locations", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2Location", + "displayName": "V2Location" + } + ] + } + } + ], + "doc": "The locations this service is offered at.\nOnly multiple locations of type `BUSINESS` are supported. multiple locations of type `CUSTOM` or `CUSTOMER` are not supported.\nFor courses only: Currently, only 1 location is supported, for all location types.\nUse `setServiceLocations` method to change the locations this service is offered at." + }, + { + "name": "onlineBooking", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceOnlineBooking", + "displayName": "OnlineBooking" + } + ], + "doc": "Online booking settings." + }, + { + "name": "resourceGroups", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceResourceGroup", + "displayName": "ResourceGroup" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "schedule", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2Schedule", + "displayName": "V2Schedule" + } + ], + "doc": "The service schedule, including the schedule id and availability constraints." + }, + { + "name": "serviceResources", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceServiceResource", + "displayName": "ServiceResource" + } + ] + } + } + ], + "doc": "Resource groups required to book the service" + }, + { + "name": "slotsSplitInterval", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV1SplitInterval", + "displayName": "V1SplitInterval" + } + ], + "doc": "The time between available slots' start times.\nFor example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc.\nIs applied to all schedules of the site.\nFor appointment only." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceServiceCreated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceServiceDeleted", + "members": [ + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceServiceResource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The unique identifier for the service resource, if not provided, would default to the resource type id." + }, + { + "name": "requiredResourcesNumber", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "How many resources of the are required in order to book the service.\nDefaults to 1." + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceResourceIds", + "displayName": "ResourceIds" + } + ], + "doc": "Resource ids, each referencing a resource in resources API. Must be a subset of resources within the selected resource type." + }, + { + "name": "resourceType", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceResourceType", + "displayName": "ResourceType" + } + ], + "doc": "" + }, + { + "name": "selectableResource", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If set to `true`, the customer can select the specific resources while booking the service.\nIf set to `false`, the resources required for to book the service would be auto selected at the time of the booking.\nDefaults to false." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfServiceResourceSelectionOneOf", + "members": [ + "resourceIds" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceServiceResourceSelectionOneOf", + "members": [ + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceResourceIds", + "displayName": "ResourceIds" + } + ], + "doc": "Resource ids, each referencing a resource in resources API. Must be a subset of resources within the selected resource type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceServiceUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSession", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session ID." + }, + { + "name": "affectedSchedules", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLinkedSchedule", + "displayName": "LinkedSchedule" + } + ] + } + } + ], + "doc": "An object specifying a list of schedules and the way each schedule's availability is affected by the session. For example, the schedule of an instructor is affected by sessions of the class that they instruct.\nThe array is inherited from the schedule and can be overridden even if the session is a recurring session." + }, + { + "name": "calendarConference", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCalendarConference", + "displayName": "CalendarConference" + } + ], + "doc": "A conference created for the session according to the details set in the schedule's conference provider information.\nIf the session is a recurring session, this field is inherited from the schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." + }, + { + "name": "capacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of participants that can be added to the session. Defaults to the schedule capacity.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + }, + { + "name": "end", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCalendarDateTime", + "displayName": "CalendarDateTime" + } + ], + "doc": "An object specifying the end date and time of the session. The `end` time must be after the `start` time and be same type as `start`.\nIf the session is a recurring session, `end` must contain a `localDateTime`." + }, + { + "name": "externalCalendarOverrides", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceExternalCalendarOverrides", + "displayName": "ExternalCalendarOverrides" + } + ], + "doc": "__Deprecated.__" + }, + { + "name": "inheritedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "A list of properties for which values were inherited from the schedule.\nThis does not include participants that were inherited from the schedule." + }, + { + "name": "instanceOfRecurrence", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A string representing a recurrence rule (RRULE) if the session is an instance of a recurrence pattern.\nEmpty when the session is not an instance of a recurrence rule, or if the session defines a recurrence pattern, and `recurrence` is not empty." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceLocation", + "displayName": "Location" + } + ], + "doc": "An object describing the location where the session takes place.\nDefaults to the schedule location.\nFor single sessions, `session.location.businessLocation` can only be provided for locations that are defined in the schedule using `schedule.location` or `schedule.availability.locations`." + }, + { + "name": "notes", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Additional information about the session.\nNotes are not supported for recurring sessions." + }, + { + "name": "originalStart", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Original start date and time of the session in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format." + }, + { + "name": "participants", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceParticipant", + "displayName": "Participant" + } + ] + } + } + ], + "doc": "*Partial list** list of participants booked for the session.\nThe list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.\nIf the session is a recurring session, this field must be empty.\nTo retrieve the full list of session participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceRate", + "displayName": "Rate" + } + ], + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." + }, + { + "name": "recurrence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A 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).\nIf the session is an instance of a recurrence pattern, the `instanceOfRecurrence` property will be contain the recurrence rule and this property will be empty.\nThe RRULE defines a rule for repeating a session.\nSupported parameters are:\n\n|Keyword|Description|Supported values|\n|--|--|---|\n|`FREQ`|The frequency at which the session is recurs. Required.|`WEEKLY`|\n|`INTERVAL`|How often, in terms of `FREQ`, the session recurs. Default is 1. Optional.|\n|`UNTIL`|The UTC end date and time of the recurrence. Optional.|\n|`BYDAY`|Day of the week when the event should recur. Required.|One of: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`|\n\n\nFor example, a session that repeats every second week on a Monday until January 7, 2022 at 8 AM:\n`\"FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20220107T080000Z\"`\n\n\n" + }, + { + "name": "recurringIntervalId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Recurring interval ID. Defined when a session will be a recurring session. read-only. Optional.\nFor exmaple, when creating a class service with recurring sessions, you add a recurrence rule to create recurring sessions.\nThis field is omitted for single sessions or instances of recurring sessions.\nSpecified when the session was originally generated from a schedule recurring interval.\nDeprecated. Use `recurringSessionId`." + }, + { + "name": "recurringSessionId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The 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." + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the schedule that the session belongs to." + }, + { + "name": "scheduleOwnerId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the resource or service that the session's schedule belongs to." + }, + { + "name": "start", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCalendarDateTime", + "displayName": "CalendarDateTime" + } + ], + "doc": "An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session status.\n" + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "__Deprecated.__\nTags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + }, + { + "name": "timeReservedAfter", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Time reserved after the session end time, derived from the schedule availability constraints and the time between slots. Read-only.\nIf the session is a recurring session, this field must be empty." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session title.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + }, + { + "name": "totalNumberOfParticipants", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of participants booked for the session. Read-only.\nCalculated as the sum of the party sizes." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session type.\n" + }, + { + "name": "version", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSessionVersion", + "displayName": "SessionVersion" + } + ], + "doc": "The session version.\nComposed by the schedule, session and participants versions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSessionCancelled", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "session", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSession", + "displayName": "Session" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSessionCreated", + "members": [ + { + "name": "session", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSession", + "displayName": "Session" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSessionUpdated", + "members": [ + { + "name": "newSession", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSession", + "displayName": "Session" + } + ], + "doc": "" + }, + { + "name": "oldSession", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSession", + "displayName": "Session" + } + ], + "doc": "" + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSessionVersion", + "members": [ + { + "name": "number", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Incremental version number, which is updated on each change to the session or on changes affecting the session." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSetCustomSlugEvent", + "members": [ + { + "name": "mainSlug", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSlug", + "displayName": "Slug" + } + ], + "doc": "The main slug for the service after the update" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSetCustomSlugRequest", + "members": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to assign the custom slug to." + }, + { + "name": "slugName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The custom name to set as the active slug for the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSetCustomSlugResponse", + "members": [ + { + "name": "slug", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceSlug", + "displayName": "Slug" + } + ], + "doc": "The new slug set as the active slug for the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSetServiceLocationsRequest", + "members": [ + { + "name": "locations", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2Location", + "displayName": "V2Location" + } + ] + } + } + ], + "doc": "The locations you specify replace the existing service locations." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2ParticipantNotification", + "displayName": "V2ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change of location, and an optional custom message." + }, + { + "name": "removedLocationSessionsAction", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceRemovedLocationSessionsAction", + "displayName": "RemovedLocationSessionsAction" + } + ], + "doc": "The action to perform on sessions currently set to a removed location. For example, move existing sessions to a new specified location." + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSetServiceLocationsResponse", + "members": [ + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "The updated service with the newly set locations." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSettings", + "members": [ + { + "name": "keywords", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceKeyword", + "displayName": "Keyword" + } + ] + } + } + ], + "doc": "User-selected keyword terms for a specific page." + }, + { + "name": "preventAutoRedirect", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.\n\nDefault: `false` (Auto Redirect is enabled.)\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSitePropertiesOnScheduleCreation", + "members": [ + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The global time zone value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSlug", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the slug was created. This is a system field." + }, + { + "name": "custom", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slug was generated or customized. If `true`, the slug was customized manually by the business owner. Otherwise, the slug was automatically generated from the service name." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The unique part of service's URL that identifies the service's information page. For example, `service-1` in `https:/example.com/services/service-1`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSpecialHourPeriod", + "members": [ + { + "name": "comment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Additional info about the exception. For example, \"We close earlier on New Year's Eve.\"" + }, + { + "name": "endDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)." + }, + { + "name": "isClosed", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the business is closed (or the service is not available) during the exception.\n\nDefault: `true`.\n" + }, + { + "name": "startDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)." + } + ], + "docs": { + "description": [ + "Exception to the business's regular hours. The business can be open or closed during the exception." + ] + } + }, + { + "name": "bookingsServicesV2ServiceSplitInterval", + "members": [ + { + "name": "sameAsDuration", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slot duration is used as the split interval value.\nIf `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in\n`schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field." + }, + { + "name": "valueInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of minutes between available slots' start times when `same_as_duration` is `false`." + } + ], + "docs": { + "description": [ + "The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc." + ] + } + }, + { + "name": "bookingsServicesV2ServiceStaffData", + "members": [ + { + "name": "refreshToken", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "resourceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "syncRequestEmail", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceStaffMember", + "members": [ + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the staff member" + }, + { + "name": "staffMemberId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the staff member providing the service, can be used to retrieve resource information using wix-bookings-backend resources API." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceStreetAddress", + "members": [ + { + "name": "apt", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Apartment number." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street name." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street number." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceSubdivision", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Subdivision full name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceTag", + "members": [ + { + "name": "children", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "SEO tag inner content. For example, ` inner content `." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the tag is a custom tag." + }, + { + "name": "disabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the tag is disabled." + }, + { + "name": "meta", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "SEO tag meta data. For example, `{height: 300, width: 240}`." + }, + { + "name": "props", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.\nFor example: `{'name': 'description', 'content': 'the description itself'}`." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "SEO tag type.\n\nSupported values: `title`, `meta`, `script`, `link`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceTimePeriod", + "members": [ + { + "name": "closeDay", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Day of the week the period ends on." + }, + { + "name": "closeTime", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\nmidnight at the end of the specified day.\n\n__Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n" + }, + { + "name": "openDay", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Day of the week the period starts on." + }, + { + "name": "openTime", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\nmidnight at the end of the specified day." + } + ], + "docs": { + "description": [ + "Weekly recurring time periods when the business is regularly open or the service is available." + ] + } + }, + { + "name": "bookingsServicesV2ServiceUpdateServiceRequest", + "members": [ + { + "name": "service", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "Service to update. [Partial updates](https://dev.wix.com/api/rest/wix-bookings/bookings/patch-endpoints-and-field-masks-in-update-requests) are supported." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceUpdateServiceResponse", + "members": [ + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceService", + "displayName": "Service" + } + ], + "doc": "The updated service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceUrLs", + "members": [ + { + "name": "bookingPage", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the booking entry point. It can be either to the calendar or to the service page." + }, + { + "name": "calendarPage", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the calendar. Can be empty if no calendar exists." + }, + { + "name": "servicePage", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the service page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceUserDomainInfoChangedEvent", + "members": [ + { + "name": "changeTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "" + }, + { + "name": "crudType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'CREATE'`\n- `'CREATE_OR_UPDATE'`\n- `'DELETE'`\n- `'INVALID_CRUD_TYPE'`\n- `'UPDATE'`" + }, + { + "name": "domainName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceV1SplitInterval", + "members": [ + { + "name": "sameAsDuration", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slot duration is used as the split interval value.\nIf `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in\n`schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field." + }, + { + "name": "valueInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of minutes between available slots' start times when `same_as_duration` is `false`." + } + ], + "docs": { + "description": [ + "The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc." + ] + } + }, + { + "name": "bookingsServicesV2ServiceV2AvailabilityConstraints", + "members": [ + { + "name": "sessionDurations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "A list of duration options for sessions, in minutes.\n\nThe availability calculation generates slots for sessions with these durations, unless there is a conflict with existing sessions or other availability constraints exist.\nRequired for services of type `APPOINTMENT` to allow the customer to book a session of the service. Not relevant for other service types.\n\n\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes\n" + }, + { + "name": "timeBetweenSessions", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of minutes between the end of a session and the start of the next.\n\nMin: 0 minutes\nMax: 720 minutes\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceV2Category", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category ID." + }, + { + "name": "name", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category name." + }, + { + "name": "sortOrder", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Order of a category within a category list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceV2Location", + "members": [ + { + "name": "business", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBusinessLocationOptions", + "displayName": "BusinessLocationOptions" + } + ], + "doc": "The service is offered at the referenced business location, the location has to reference a location from the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations)." + }, + { + "name": "calculatedAddress", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCommonAddress", + "displayName": "CommonAddress" + } + ], + "doc": "The location address, based on the location `type`. If `type` is `CUSTOMER`, this address is empty." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCustomLocationOptions", + "displayName": "CustomLocationOptions" + } + ], + "doc": "The service is offered at a custom location." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of location:\n- `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n- `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations).\n- `CUSTOMER`: Will be determined by the customer. For appointments only." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfV2LocationOptionsOneOf", + "members": [ + "business", + "custom" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceV2LocationOptionsOneOf", + "members": [ + { + "name": "business", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceBusinessLocationOptions", + "displayName": "BusinessLocationOptions" + } + ], + "doc": "The service is offered at the referenced business location, the location has to reference a location from the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations)." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceCustomLocationOptions", + "displayName": "CustomLocationOptions" + } + ], + "doc": "The service is offered at a custom location." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceV2ParticipantNotification", + "members": [ + { + "name": "message", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom message to send to the participants about the changes to the booking." + }, + { + "name": "notifyParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceV2Schedule", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID, used to manage the service's sessions." + }, + { + "name": "availabilityConstraints", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceV2AvailabilityConstraints", + "displayName": "V2AvailabilityConstraints" + } + ], + "doc": "Limitations dictating the way session availability is calculated. For appointments only." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceValidateSlugRequest", + "members": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to validate the slug name for." + }, + { + "name": "slugName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The custom name to validate as a slug for the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceValidateSlugResponse", + "members": [ + { + "name": "errors", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "If the slug is invalid, this field is populated with the reasons why the slug is invalid. Validation errors may include `SLUG_IS_TOO_LONG`, `SLUG_CONTAIN_ILLEGAL_CHARACTERS`, and `SLUG_ALREADY_EXISTS`." + }, + { + "name": "slugName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The requested custom slug name to validate. If valid, the slug name can be set as a slug for the service and is populated with the requested slug. Otherwise, `slugName` is empty." + }, + { + "name": "valid", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested slug name is valid." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceVariedPayment", + "members": [ + { + "name": "defaultPrice", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMoney", + "displayName": "Money" + } + ], + "doc": "The default price for the service without any variants. It will also be used as the default price for any new variant." + }, + { + "name": "deposit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMoney", + "displayName": "Money" + } + ], + "doc": "The deposit price required to book the service.\n\nRequired when: `rateType` is `VARIED` and `paymentOptions.deposit` is `true`\n" + }, + { + "name": "maxPrice", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMoney", + "displayName": "Money" + } + ], + "doc": "The maximum price a customer may pay for this service, based on its variants." + }, + { + "name": "minPrice", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceMoney", + "displayName": "Money" + } + ], + "doc": "The minimal price a customer may pay for this service, based on its variants." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceVersion", + "members": [ + { + "name": "participantsVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Participants version number, updated each time the schedule participants are updated." + }, + { + "name": "scheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Schedule version number, updated each time the schedule is updated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsServicesV2ServiceWaitlistPolicy", + "members": [ + { + "name": "capacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of spots available in the waitlist.\n\nDefault: 10 spots\nMin: 1 spot\n" + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the session has a waitlist. If `true`, there is a waitlist.\n\nDefault: `false`\n" + }, + { + "name": "reservationTimeInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of time a participant is given to book, once notified that a spot is available.\n\nDefault: 10 minutes\nMin: 1 spot\n" + } + ], + "docs": { + "description": [ + "The policy for the waitlist." + ] + } + }, + { + "name": "bookingsV2AttendanceAttendance", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the attendance object." + }, + { + "name": "bookingId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booking ID." + }, + { + "name": "numberOfAttendees", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of participants who have that attended the session. Can be greater than `1` for bookings with multiple participants." + }, + { + "name": "sessionId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session ID." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Whether the booked contact attended the session, might be one of the following:\n\n+ `NOT_SET`: There is no available attendance information.\n+ `ATTENDED`: At least a single participant has attended the session.\n+ `NOT_ATTENDED`: No participant has attended the session.\n" + } + ], + "docs": { + "description": [ + "Attendance is the main entity of AttendanceService.\nIt contains the attendance information for a given booking in a given session." + ] + } + }, + { + "name": "bookingsV2AttendanceAttendanceCreated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", + "displayName": "Attendance" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceAttendanceUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", + "displayName": "Attendance" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceBackendEventMetadata", + "members": [ + { + "name": "entityId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event timestamp." + }, + { + "name": "id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event ID." + }, + { + "name": "triggeredByAnonymizeRequest", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request." + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of attendances to return.\nDefaults to `50`. Maximum `1000`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceCursorPagingMetadata", + "members": [ + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceCursors", + "displayName": "Cursors" + } + ], + "doc": "Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging)." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceGetAttendanceRequest", + "members": [ + { + "name": "attendanceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the Attendance to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceGetAttendanceResponse", + "members": [ + { + "name": "attendance", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", + "displayName": "Attendance" + } + ], + "doc": "The retrieved Attendance." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendancePaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceQueryAttendanceRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceQueryV2", + "displayName": "QueryV2" + } + ], + "doc": "WQL expression." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceQueryAttendanceResponse", + "members": [ + { + "name": "attendances", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", + "displayName": "Attendance" + } + ] + } + } + ], + "doc": "The retrieved Attendances." + }, + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceCursorPagingMetadata", + "displayName": "CursorPagingMetadata" + } + ], + "doc": "Paging Metadata. Cursor pagination is supported." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceQueryV2", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "" + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfQueryV2PagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceQueryV2PagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceSetAttendanceRequest", + "members": [ + { + "name": "attendance", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", + "displayName": "Attendance" + } + ], + "doc": "Attendance to create or updated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceSetAttendanceResponse", + "members": [ + { + "name": "attendance", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2AttendanceAttendance", + "displayName": "Attendance" + } + ], + "doc": "The updated Attendance." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2AttendanceSorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingAddBookingsToMultiServiceBookingRequest", + "members": [ + { + "name": "bookings", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingIdAndRevision", + "displayName": "BookingIdAndRevision" + } + ] + } + } + ], + "doc": "List of bookings ids and their revisions to add to the multi service booking." + }, + { + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingAddBookingsToMultiServiceBookingResponse", + "members": [ + { + "name": "bookings", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingResult", + "displayName": "BookingResult" + } + ] + } + } + ], + "doc": "The bookings that were added to the multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingAddress", + "members": [ + { + "name": "addressLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Main address line, usually street and number, as free text." + }, + { + "name": "addressLine2", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." + }, + { + "name": "city", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "City name." + }, + { + "name": "country", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Country code." + }, + { + "name": "countryFullname", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Country full name." + }, + { + "name": "formattedAddress", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A string containing the full address of this location." + }, + { + "name": "geocode", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingAddressLocation", + "displayName": "AddressLocation" + } + ], + "doc": "Coordinates of the physical address." + }, + { + "name": "hint", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Free text to help find the address." + }, + { + "name": "postalCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Zip/postal code." + }, + { + "name": "streetAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingStreetAddress", + "displayName": "StreetAddress" + } + ], + "doc": "Street name, number and apartment number." + }, + { + "name": "subdivision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." + }, + { + "name": "subdivisions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingSubdivision", + "displayName": "Subdivision" + } + ] + } + } + ], + "doc": "Multi-level subdivisions from top to bottom." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAddressStreetOneOf", + "members": [ + "addressLine", + "streetAddress" + ] + } + ] + }, + "docs": { + "description": [ + "Physical address" + ] + } + }, + { + "name": "bookingsV2BookingAddressLocation", + "members": [ + { + "name": "latitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Address latitude." + }, + { + "name": "longitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Address longitude." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingAddressStreetOneOf", + "members": [ + { + "name": "addressLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Main address line, usually street and number, as free text." + }, + { + "name": "streetAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingStreetAddress", + "displayName": "StreetAddress" + } + ], + "doc": "Street name, number and apartment number." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingAllowedActions", + "members": [ + { + "name": "cancel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Is cancel booking allowed" + }, + { + "name": "reschedule", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Is reschedule booking allowed" + } + ], + "docs": { + "description": [ + "Possible allowed actions for a Booking" + ] + } + }, + { + "name": "bookingsV2BookingApplicationError", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + }, + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data related to the error." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the error." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBackendEventMetadata", + "members": [ + { + "name": "entityId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event timestamp." + }, + { + "name": "id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event ID." + }, + { + "name": "triggeredByAnonymizeRequest", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookedEntity", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedSchedule", + "displayName": "BookedSchedule" + } + ], + "doc": "The booked schedule. The booking is automatically assigned to the schedule's sessions." + }, + { + "name": "slot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedSlot", + "displayName": "BookedSlot" + } + ], + "doc": "The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist." + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of tags for the booking.\nSystem-assigned tags for sessions and schedules are:\n+ \"INDIVIDUAL\" Appointments, including appointments with more than 1 participant.\n+ \"GROUP\" Individual classes.\n+ \"COURSE\" Courses." + }, + { + "name": "title", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session title at the time of booking.\nIf session doesn't exist at the time of the booking, service name is used." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBookedEntityItemOneOf", + "members": [ + "schedule", + "slot" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookedEntityItemOneOf", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedSchedule", + "displayName": "BookedSchedule" + } + ], + "doc": "The booked schedule. The booking is automatically assigned to the schedule's sessions." + }, + { + "name": "slot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedSlot", + "displayName": "BookedSlot" + } + ], + "doc": "The booked slot, once booked becomes a session, The booking is automatically assigned to the session if it already exists, or creates a session if one doesn't already exist." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookedResource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booked resource ID." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource's email at the time of booking." + }, + { + "name": "explicitlyRequested", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates whether the resource was specifically requested or should be auto selected by the Server.\nThe value will be true if the resource was explicitly given in the request, otherwise false." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource's name at the time of booking." + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource's schedule ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookedSchedule", + "members": [ + { + "name": "firstSessionStart", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The start time of the first session in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat. Required." + }, + { + "name": "lastSessionEnd", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The end time of the last session in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat. Required." + }, + { + "name": "location", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingLocation", + "displayName": "Location" + } + ], + "doc": "Location where the schedule's sessions take place. Read only." + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booked service ID." + }, + { + "name": "timezone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The timezone according to which the slot was shown to the user when booking, and should be shown in future." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookedSlot", + "members": [ + { + "name": "endDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat." + }, + { + "name": "eventId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Calendar 3 event ID\nIf not empty, on all write flows (create / update) gets priority over session_id.\nso if both session_id and event_id are provided, the session_id that will be set on the booking will be based on the event_id.\nOtherwise, if event_id is empty on write flow," + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingLocation", + "displayName": "Location" + } + ], + "doc": "Location where the slot's session takes place." + }, + { + "name": "resource", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedResource", + "displayName": "BookedResource" + } + ], + "doc": "The enriched resource assigned to the slot, can be either the requested resource or the resource chosen by the system.\nWhen populated, the given resource will be booked according to it's availability.\nWhen empty, If `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation,\notherwise one of the service resources will be assigned to the slot randomly upon confirmation." + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID. Required." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID." + }, + { + "name": "sessionId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the underlying session when session is a single session or generated from a recurring session.\nIf `sessionId` is defined in the `Create Booking` request, the `startDate`, `endDate`, `timezone`, `resource`, and `location` fields are ignored and populated from the existing session's information." + }, + { + "name": "startDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat." + }, + { + "name": "timezone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The timezone according to which the slot was shown to the user when booking, and should be shown in future." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBooking", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the booking was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booking ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the booking was updated." + }, + { + "name": "additionalFields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCustomFormField", + "displayName": "CustomFormField" + } + ] + } + } + ], + "doc": "Additional custom fields submitted with the booking form." + }, + { + "name": "bookedEntity", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedEntity", + "displayName": "BookedEntity" + } + ], + "doc": "An object describing the slot or schedule that was booked." + }, + { + "name": "contactDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingContactDetails", + "displayName": "ContactDetails" + } + ], + "doc": "Contact details of the site visitor or member making the booking." + }, + { + "name": "createdBy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingIdentificationData", + "displayName": "IdentificationData" + } + ], + "doc": "ID of the creator of the Booking.\nIf `appId` and another ID are present, the other ID takes precedence." + }, + { + "name": "doubleBooked", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps another existing confirmed booking. Returned when: `true`" + }, + { + "name": "endDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The end date of this booking. For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session." + }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Custom field data for this object. Extended fields must be configured in the Wix Dev Center before they can be accessed with API calls." + }, + { + "name": "externalUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "External ID provided by the client app on creation." + }, + { + "name": "participantsChoices", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", + "displayName": "ParticipantChoices" + } + ], + "doc": "Information about the booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + }, + { + "name": "paymentStatus", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Payment status.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number to be used when updating, rescheduling, or cancelling the booking. Revision number, which increments by 1 each time the booking is updated, rescheduled, or canceled. To prevent conflicting changes,the current revision must be passed when updating the booking." + }, + { + "name": "selectedPaymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selected payment option.\nOne of the payment options offered by the service, or another option if `skipSelectedPaymentOptionValidation` is `true`.\nWhen undefined, the payment option is resolved by the service configuration on checkout." + }, + { + "name": "startDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The start date of this booking. For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booking status.\nOne of:\n- `\"CREATED\"` - The booking was created.\n- `\"UPDATED\"` - The booking was updated.\n- `\"CONFIRMED\"` - The booking was confirmed and appears on the bookings calendar.\nA booking can be manually confirmed using the [`Confirm Or Decline API`](www.example.com).\nA booking can be automatically confirmed when the following requirements are met:\n+ The service is configured as automatically confirmed.\n+ The system invoked the eCommerce checkout API and created an order.\n- `\"CANCELED\"` - The booking has been canceled and synced to the bookings calendar.\nThe booking can be canceled using [`Cancel Booking API`](www.example.com).\n- `\"PENDING\"` - The booking is waiting to be confirmed or declined by the owner and the booking is synced to the bookings calendar.\nBookings can be manually set as `PENDING` using the [`setAsPending` API](www.example.com), by those with Manage Booking Status permissions scopes.\nBookings can be automatically set as `PENDING` when the following requirements are met:\n+ The service is configured as manually confirmed.\n+ Invoking the eCommerce checkout API and an order has been created.\n- `\"WAITING_LIST\"` - The booking is on a waiting list.\n- `\"DECLINED\"` - The booking was declined by the owner and synced to the Bookings calendar.\nBookings can be manually declined using the [`Decline Booking` API](www.example.com) by those with Manage Booking Status permissions scopes.\nBooking can be automatically declined when one of the following requirements are met:\n+ Invoking the `eCommerce checkout` API and the order declined event has been sent.\n+ Invoking the `eCommerce checkout` API and order approved event has been sent, but the booking is offline and the booking causes a double booking." + }, + { + "name": "totalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of participants. Available only when the booking includes a single service variant." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBookingParticipantsInfoOneOf", + "members": [ + "participantsChoices", + "totalParticipants" + ] + } + ] + }, + "docs": { + "description": [ + "The booking object, version 2." + ] + } + }, + { + "name": "bookingsV2BookingBookingCanceled", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "The canceled booking object." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCancelBookingFlowControlSettings", + "displayName": "CancelBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + }, + { + "name": "initiatedBy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", + "displayName": "CommonIdentificationData" + } + ], + "doc": "ID of the cancelation initiator." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the cancelation and the message to send." + }, + { + "name": "previousStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous status of the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingCanceledEvent", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingCanceled", + "displayName": "BookingCanceled" + } + ], + "doc": "The canceled booking." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingChanged", + "members": [ + { + "name": "currentBooking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "The booking after the changes." + }, + { + "name": "previousBooking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "The booking before the changes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingConfirmed", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "The confirmed booking object." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "initiatedBy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", + "displayName": "CommonIdentificationData" + } + ], + "doc": "ID of the confirmation initiator." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the confirmation and the message to send." + }, + { + "name": "previousPaymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous payment status of the booking." + }, + { + "name": "previousStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous status of the booking." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingConfirmedEvent", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingConfirmed", + "displayName": "BookingConfirmed" + } + ], + "doc": "The confirmed booking." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingCreated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingDeclined", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "The declined booking object." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "initiatedBy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", + "displayName": "CommonIdentificationData" + } + ], + "doc": "ID of the decline initiator." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the decline and the message to send." + }, + { + "name": "previousPaymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous payment status of the booking." + }, + { + "name": "previousStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous status of the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingDeclinedEvent", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingDeclined", + "displayName": "BookingDeclined" + } + ], + "doc": "The declined booking." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingDetails", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the bookings to be updated." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingIdAndRevision", + "members": [ + { + "name": "bookingId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingInfo", + "members": [ + { + "name": "bookingId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking." + }, + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Payment status to set for the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingMarkedAsPending", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "The booking object that was marked as pending." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "initiatedBy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", + "displayName": "CommonIdentificationData" + } + ], + "doc": "ID of the mark as pending initiator." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer upon manual confirmation of the pending booking and the message to send." + }, + { + "name": "previousPaymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous payment status of the booking." + }, + { + "name": "previousStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous status of the booking." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingNumberOfParticipantsUpdated", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingNumberOfParticipantsUpdated", + "displayName": "NumberOfParticipantsUpdated" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingParticipantsInfoOneOf", + "members": [ + { + "name": "participantsChoices", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", + "displayName": "ParticipantChoices" + } + ], + "doc": "Information about the booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + }, + { + "name": "totalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of participants. Available only when the booking includes a single service variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingPolicySettings", + "members": [ + { + "name": "maxParticipantsPerBooking", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Booking policy settings for a given Slot/Schedule" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingPolicyViolations", + "members": [ + { + "name": "bookOnlineDisabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Online booking is disabled for this slot." + }, + { + "name": "tooEarlyToBook", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Too early to book this slot." + }, + { + "name": "tooLateToBook", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Too late to book this slot." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingRescheduled", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "The rescheduled booking object." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingRescheduleBookingFlowControlSettings", + "displayName": "RescheduleBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." + }, + { + "name": "initiatedBy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", + "displayName": "CommonIdentificationData" + } + ], + "doc": "ID of the rescheduling initiator." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the rescheduling and the message to send." + }, + { + "name": "previousBookedEntity", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedEntity", + "displayName": "BookedEntity" + } + ], + "doc": "An object describing the previous slot or schedule of the booking." + }, + { + "name": "previousEndDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The previous end date of the booking. For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session." + }, + { + "name": "previousParticipantsChoices", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", + "displayName": "ParticipantChoices" + } + ], + "doc": "Information about the previous booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + }, + { + "name": "previousStartDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The previous start date of the booking. For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session." + }, + { + "name": "previousStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous status of the booking." + }, + { + "name": "previousTotalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The previous total number of participants. Available only when the booking includes a single service variant." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBookingRescheduledPreviousParticipantsInfoOneOf", + "members": [ + "previousParticipantsChoices", + "previousTotalParticipants" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingRescheduledEvent", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingRescheduled", + "displayName": "BookingRescheduled" + } + ], + "doc": "The rescheduled booking." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingRescheduledPreviousParticipantsInfoOneOf", + "members": [ + { + "name": "previousParticipantsChoices", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", + "displayName": "ParticipantChoices" + } + ], + "doc": "Information about the previous booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + }, + { + "name": "previousTotalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The previous total number of participants. Available only when the booking includes a single service variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingResult", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "Booking entity." + }, + { + "name": "bookingId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booking ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingSource", + "members": [ + { + "name": "actor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Actor that created this booking.\n" + }, + { + "name": "appDefId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Wix site ID of the application that created the booking." + }, + { + "name": "appName", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the application that created the booking, as saved in Wix Developers Center at the time of booking." + }, + { + "name": "platform", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Platform from which a booking was created\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBookingUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkActionMetadata", + "members": [ + { + "name": "totalFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that couldn't be processed." + }, + { + "name": "totalSuccesses", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that were successfully processed." + }, + { + "name": "undetailedFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkBookingResult", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ], + "doc": "" + }, + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", + "displayName": "ItemMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkCalculateAllowedActionsRequest", + "members": [ + { + "name": "bookingIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The booking id's that we want to calculate the allowedActions for" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkCalculateAllowedActionsResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkCalculateAllowedActionsResult", + "displayName": "BulkCalculateAllowedActionsResult" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkCalculateAllowedActionsResult", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingAllowedActions", + "displayName": "AllowedActions" + } + ], + "doc": "" + }, + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", + "displayName": "ItemMetadata" + } + ], + "doc": "(id, indexInGivenSeq, isSuccessful, error)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkConfirmOrDeclineBookingRequest", + "members": [ + { + "name": "details", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkConfirmOrDeclineBookingRequestBookingDetails", + "displayName": "BulkConfirmOrDeclineBookingRequestBookingDetails" + } + ] + } + } + ], + "doc": "The bookings to confirm or decline." + }, + { + "name": "returnEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the confirmed or declined bookings entities.\nNot supported yet, currently the entity is not returned." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkConfirmOrDeclineBookingRequestBookingDetails", + "members": [ + { + "name": "bookingId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking to confirm or decline." + }, + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Current payment status of the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkConfirmOrDeclineBookingResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Total successes and failures of the bulk confirm or decline action." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkBookingResult", + "displayName": "BulkBookingResult" + } + ] + } + } + ], + "doc": "The bulk confirm or decline results.\nFor each booking, the results contain the metadata of the confirm or decline action." } ], "docs": { @@ -12887,27 +23492,34 @@ } }, { - "name": "bookingsV2BookingBookingCanceledEvent", + "name": "bookingsV2BookingBulkCreateBookingRequest", "members": [ { - "name": "data", + "name": "createBookingsInfo", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingCanceled", - "displayName": "BookingCanceled" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCreateBookingInfo", + "displayName": "CreateBookingInfo" + } + ] + } } ], - "doc": "" + "doc": "Bookings to create.\nMax: 8 bookings." }, { - "name": "metadata", + "name": "returnFullEntity", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", - "displayName": "BackendEventMetadata" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether to return the created bookings entities." } ], "docs": { @@ -12917,29 +23529,36 @@ } }, { - "name": "bookingsV2BookingBookingChanged", + "name": "bookingsV2BookingBulkCreateBookingResponse", "members": [ { - "name": "currentBooking", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "The booking after the changes." + "doc": "Total successes and failures of the bulk create booking action." }, { - "name": "previousBooking", + "name": "results", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkBookingResult", + "displayName": "BulkBookingResult" + } + ] + } } ], - "doc": "The booking before the changes." + "doc": "Bulk create booking results.\nWhether it successfully created each booking, providing the corresponding error message if a failure occurred, and includes the created booking entity if the `returnFullEntity` is `true`." } ], "docs": { @@ -12949,40 +23568,73 @@ } }, { - "name": "bookingsV2BookingBookingConfirmed", + "name": "bookingsV2BookingBulkGetMultiServiceBookingAllowedActionsRequest", "members": [ { - "name": "booking", - "optional": true, + "name": "multiServiceBookingIds", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "The confirmed booking object." - }, + "doc": "The multi service booking ids to get the allowedActions for." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkGetMultiServiceBookingAllowedActionsResponse", + "members": [ { - "name": "doubleBooked", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "Whether this booking overlaps with another existing confirmed booking." + "doc": "" }, { - "name": "initiatedBy", + "name": "results", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", - "displayName": "CommonIdentificationData" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkCalculateAllowedActionsResult", + "displayName": "BulkCalculateAllowedActionsResult" + } + ] + } } ], - "doc": "ID of the confirmation initiator." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkRescheduleBookingRequest", + "members": [ { "name": "participantNotification", "optional": true, @@ -12992,37 +23644,54 @@ "displayName": "ParticipantNotification" } ], - "doc": "Information about whether to notify the customer about the confirmation and the message to send." + "doc": "Whether to notify participants about the change and an optional custom message" }, { - "name": "previousPaymentStatus", - "optional": true, + "name": "slotsBookings", "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingSlotBookings", + "displayName": "SlotBookings" + } + ] + } } ], - "doc": "The previous payment status of the booking." - }, + "doc": "Reschedule multiple bookings to multiple slots." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkRescheduleBookingRequestBooking", + "members": [ { - "name": "previousStatus", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The previous status of the booking." + "doc": "ID of the bookings to be rescheduled." }, { - "name": "sendSmsReminder", + "name": "revision", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." + "doc": "" } ], "docs": { @@ -13032,27 +23701,36 @@ } }, { - "name": "bookingsV2BookingBookingConfirmedEvent", + "name": "bookingsV2BookingBulkRescheduleBookingResponse", "members": [ { - "name": "data", + "name": "bulkActionMetadata", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingConfirmed", - "displayName": "BookingConfirmed" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "" + "doc": "Total successes and failures of the bulk reschedule action." }, { - "name": "metadata", + "name": "results", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", - "displayName": "BackendEventMetadata" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", + "displayName": "ItemMetadata" + } + ] + } } ], - "doc": "" + "doc": "The bulk reschedule results. For each booking, the results contain the metadata of the reschedule action." } ], "docs": { @@ -13062,100 +23740,168 @@ } }, { - "name": "bookingsV2BookingBookingCreated", + "name": "bookingsV2BookingBulkUpdateBookedScheduleRequest", "members": [ { - "name": "entity", + "name": "bookings", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingDetails", + "displayName": "BookingDetails" + } + ] + } } ], - "doc": "" + "doc": "The bookings whose booked schedule is to be updated to the given schedule." }, { - "name": "metadata", + "name": "participantNotification", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", - "displayName": "BackendEventMetadata" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "" + "doc": "Whether to notify participants about the change and an optional custom message." + }, + { + "name": "scheduleId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the schedule to be updated." } ], "docs": { "description": [ - "" + "Update the booked schedule of multiple bookings to the given schedule." ] } }, { - "name": "bookingsV2BookingBookingDeclined", + "name": "bookingsV2BookingBulkUpdateBookedScheduleResponse", "members": [ { - "name": "booking", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "The declined booking object." + "doc": "Total successes and failures of the bulk update action." }, { - "name": "doubleBooked", + "name": "results", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", + "displayName": "ItemMetadata" + } + ] + } } ], - "doc": "Whether this booking overlaps with another existing confirmed booking." - }, + "doc": "The bulk update results. For each booking, the results contain the metadata of the update action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingBulkUpdateBookingRequest", + "members": [ { - "name": "initiatedBy", - "optional": true, + "name": "bookings", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", - "displayName": "CommonIdentificationData" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMaskedBooking", + "displayName": "MaskedBooking" + } + ] + } } ], - "doc": "ID of the decline initiator." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "The `fieldMask` for each booking should not include both the `numberOfParticipants` and `participantsInfo` paths. Including both results\nin an error. `participantsInfo` is preferred over `numberOfParticipants`." + ] + } + }, + { + "name": "bookingsV2BookingBulkUpdateBookingResponse", + "members": [ { - "name": "participantNotification", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "Information about whether to notify the customer about the decline and the message to send." + "doc": "" }, { - "name": "previousPaymentStatus", + "name": "results", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", + "displayName": "ItemMetadata" + } + ] + } } ], - "doc": "The previous payment status of the booking." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingCalculateAllowedActionsRequest", + "members": [ { - "name": "previousStatus", - "optional": true, + "name": "bookingId", "type": [ { "nativeType": "string" } ], - "doc": "The previous status of the booking." + "doc": "The booking id that we want to calculate the allowedActions for" } ], "docs": { @@ -13165,24 +23911,15 @@ } }, { - "name": "bookingsV2BookingBookingDeclinedEvent", + "name": "bookingsV2BookingCalculateAllowedActionsResponse", "members": [ { - "name": "data", - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingDeclined", - "displayName": "BookingDeclined" - } - ], - "doc": "" - }, - { - "name": "metadata", + "name": "allowedActions", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", - "displayName": "BackendEventMetadata" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingAllowedActions", + "displayName": "AllowedActions" } ], "doc": "" @@ -13195,27 +23932,27 @@ } }, { - "name": "bookingsV2BookingBookingDetails", + "name": "bookingsV2BookingCancelBookingFlowControlSettings", "members": [ { - "name": "_id", + "name": "ignoreCancellationPolicy", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of the bookings to be updated." + "doc": "Whether the cancelation policy applies when canceling the booking. When\npassing `false` you can only cancel a booking if the cancelation policy\nallows it.\nDefault: `false`.\n" }, { - "name": "revision", + "name": "withRefund", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether to issue a refund when canceling the booking.\nThe refund will be issued only if the booking is refundable.\nCurrently, booking is considered refundable when it was paid by membership.\nIf passing `true`, the booking flow control settings will be set with refund,\notherwise, either if `false` is passed or the field remains empty,\nthe booking flow control settings will be set with no refund.\nDefault: `false`." } ], "docs": { @@ -13225,27 +23962,36 @@ } }, { - "name": "bookingsV2BookingBookingNumberOfParticipantsUpdated", + "name": "bookingsV2BookingCancelBookingRequest", "members": [ { - "name": "data", + "name": "bookingId", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingNumberOfParticipantsUpdated", - "displayName": "NumberOfParticipantsUpdated" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of the booking to cancel." }, { - "name": "metadata", + "name": "participantNotification", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", - "displayName": "BackendEventMetadata" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "" + "doc": "Information about whether to notify the customer about the cancelation and\nthe message to send." + }, + { + "name": "revision", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when managing the booking." } ], "docs": { @@ -13255,28 +24001,27 @@ } }, { - "name": "bookingsV2BookingBookingParticipantsInfoOneOf", + "name": "bookingsV2BookingCancelBookingRequestFlowControlSettings", "members": [ { - "name": "participantsChoices", + "name": "ignoreCancellationPolicy", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", - "displayName": "ParticipantChoices" + "nativeType": "boolean" } ], - "doc": "Information about the booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + "doc": "Whether the cancelation policy applies when canceling the booking. When\npassing `false` you can only cancel a booking if the cancelation policy\nallows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `\npermission scope when passing `true`.\n\nDefault: `false`.\n\n\n" }, { - "name": "totalParticipants", + "name": "withRefund", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Total number of participants. Available only when the booking includes a single service variant." + "doc": "Whether to issue a refund when canceling the booking.\nThe refund will be issued only if the booking is refundable.\nCurrently, booking is considered refundable when it was paid by membership.\nIf passing `true`, the booking flow control settings will be set with refund,\notherwise, either if `false` is passed or the field remains empty,\nthe booking flow control settings will be set with no refund.\n\nDefault: `false`.\n" } ], "docs": { @@ -13286,17 +24031,18 @@ } }, { - "name": "bookingsV2BookingBookingPolicySettings", + "name": "bookingsV2BookingCancelBookingResponse", "members": [ { - "name": "maxParticipantsPerBooking", + "name": "booking", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ], - "doc": "Booking policy settings for a given Slot/Schedule" + "doc": "Canceled booking." } ], "docs": { @@ -13306,37 +24052,48 @@ } }, { - "name": "bookingsV2BookingBookingPolicyViolations", + "name": "bookingsV2BookingCancelMultiServiceBookingRequest", "members": [ { - "name": "bookOnlineDisabled", + "name": "flowControlSettings", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCancelBookingFlowControlSettings", + "displayName": "CancelBookingFlowControlSettings" } ], - "doc": "Bookings policy violation. Online booking is disabled for this slot." + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether the you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." }, { - "name": "tooEarlyToBook", + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking to cancel it's related bookings." + }, + { + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "Bookings policy violation. Too early to book this slot." + "doc": "Information about whether to notify the customer about the cancelation and the message to send." }, { - "name": "tooLateToBook", + "name": "returnFullEntity", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Bookings policy violation. Too late to book this slot." + "doc": "Whether to return the canceled bookings entities." } ], "docs": { @@ -13346,122 +24103,150 @@ } }, { - "name": "bookingsV2BookingBookingRescheduled", + "name": "bookingsV2BookingCancelMultiServiceBookingResponse", "members": [ { - "name": "booking", + "name": "multiServiceBooking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMultiServiceBooking", + "displayName": "MultiServiceBooking" } ], - "doc": "The rescheduled booking object." - }, + "doc": "Canceled multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingClash", + "members": [ { - "name": "flowControlSettings", + "name": "bookingId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingRescheduleBookingFlowControlSettings", - "displayName": "RescheduleBookingFlowControlSettings" + "nativeType": "string" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." + "doc": "" }, { - "name": "initiatedBy", + "name": "contactName", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCommonIdentificationData", - "displayName": "CommonIdentificationData" + "nativeType": "string" } ], - "doc": "ID of the rescheduling initiator." + "doc": "" }, { - "name": "participantNotification", + "name": "msid", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "nativeType": "string" } ], - "doc": "Information about whether to notify the customer about the rescheduling and the message to send." + "doc": "" }, { - "name": "previousBookedEntity", + "name": "resourceName", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookedEntity", - "displayName": "BookedEntity" + "nativeType": "string" } ], - "doc": "An object describing the previous slot or schedule of the booking." + "doc": "" }, { - "name": "previousEndDate", + "name": "sessionId", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The previous end date of the booking. For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session." + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingCommonIdentificationData", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." }, { - "name": "previousParticipantsChoices", + "name": "appId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", - "displayName": "ParticipantChoices" + "nativeType": "string" } ], - "doc": "Information about the previous booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + "doc": "ID of an app." }, { - "name": "previousStartDate", + "name": "contactId", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The previous start date of the booking. For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session." + "doc": "ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system." }, { - "name": "previousStatus", + "name": "memberId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The previous status of the booking." + "doc": "ID of a site visitor that has logged in to the site." }, { - "name": "previousTotalParticipants", + "name": "wixUserId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The previous total number of participants. Available only when the booking includes a single service variant." + "doc": "ID of a Wix user (site owner, contributor, etc.)." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfBookingRescheduledPreviousParticipantsInfoOneOf", + "name": "oneOfCommonIdentificationDataIdOneOf", "members": [ - "previousParticipantsChoices", - "previousTotalParticipants" + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" ] } ] @@ -13473,27 +24258,47 @@ } }, { - "name": "bookingsV2BookingBookingRescheduledEvent", + "name": "bookingsV2BookingCommonIdentificationDataIdOneOf", "members": [ { - "name": "data", + "name": "anonymousVisitorId", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingRescheduled", - "displayName": "BookingRescheduled" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of a site visitor that has not logged in to the site." }, { - "name": "metadata", + "name": "appId", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBackendEventMetadata", - "displayName": "BackendEventMetadata" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of an app." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." } ], "docs": { @@ -13503,28 +24308,17 @@ } }, { - "name": "bookingsV2BookingBookingRescheduledPreviousParticipantsInfoOneOf", + "name": "bookingsV2BookingConfirmBookingFlowControlSettings", "members": [ { - "name": "previousParticipantsChoices", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", - "displayName": "ParticipantChoices" - } - ], - "doc": "Information about the previous booked service choices and participants.\nAvailable only when the booking includes multiple service variants." - }, - { - "name": "previousTotalParticipants", + "name": "checkAvailabilityValidation", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "The previous total number of participants. Available only when the booking includes a single service variant." + "doc": "todo: docs any-resource flow behavior\nWhether the availability is checked before confirming the booking.\nWhen passing `false` a booking is only being updated with status CONFIRMED\nDefault: `false`." } ], "docs": { @@ -13534,49 +24328,57 @@ } }, { - "name": "bookingsV2BookingBookingSource", + "name": "bookingsV2BookingConfirmBookingRequest", "members": [ { - "name": "actor", - "optional": true, + "name": "bookingId", "type": [ { "nativeType": "string" } ], - "doc": "Actor that created this booking.\n" + "doc": "ID of the booking to confirm." }, { - "name": "appDefId", - "readOnly": true, + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "Wix site ID of the application that created the booking." + "doc": "Information about whether to notify the customer about the confirmation and\nthe message to send." }, { - "name": "appName", - "readOnly": true, - "optional": true, + "name": "revision", "type": [ { "nativeType": "string" } ], - "doc": "Name of the application that created the booking, as saved in Wix Developers Center at the time of booking." - }, + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingConfirmBookingResponse", + "members": [ { - "name": "platform", + "name": "booking", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ], - "doc": "Platform from which a booking was created\n" + "doc": "" } ], "docs": { @@ -13586,95 +24388,86 @@ } }, { - "name": "bookingsV2BookingBulkActionMetadata", + "name": "bookingsV2BookingConfirmMultiServiceBookingRequest", "members": [ { - "name": "totalFailures", + "name": "confirmBookingsInfo", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingInfo", + "displayName": "BookingInfo" + } + ] + } } ], - "doc": "Number of items that couldn't be processed." + "doc": "Bookings to confirm." }, { - "name": "totalSuccesses", + "name": "doubleBooked", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Number of items that were successfully processed." + "doc": "Whether this booking overlaps with another existing confirmed booking." }, { - "name": "undetailedFailures", + "name": "flowControlSettings", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingConfirmBookingFlowControlSettings", + "displayName": "ConfirmBookingFlowControlSettings" } ], - "doc": "Number of failures without details because detailed failure threshold was exceeded." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingBulkBookingResult", - "members": [ + "doc": "Information about whether specific procedures of the standard Wix Bookings\nconfirmation flow are changed. For example, whether the availability is\nchecked before confirming the booking." + }, { - "name": "item", + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking to confirm it's related bookings." + }, + { + "name": "participantNotification", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "" + "doc": "Information about whether to notify the customer about the confirmation and the message to send." }, { - "name": "itemMetadata", + "name": "returnFullEntity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", - "displayName": "ItemMetadata" + "nativeType": "boolean" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingBulkCalculateAllowedActionsRequest", - "members": [ + "doc": "Whether to return the confirmed bookings entities." + }, { - "name": "bookingIds", + "name": "sendSmsReminder", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "boolean" } ], - "doc": "The booking id's that we want to calculate the allowedActions for" + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." } ], "docs": { @@ -13684,36 +24477,18 @@ } }, { - "name": "bookingsV2BookingBulkCalculateAllowedActionsResponse", + "name": "bookingsV2BookingConfirmMultiServiceBookingResponse", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", - "displayName": "BulkActionMetadata" - } - ], - "doc": "" - }, - { - "name": "results", + "name": "multiServiceBooking", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkCalculateAllowedActionsResult", - "displayName": "BulkCalculateAllowedActionsResult" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMultiServiceBooking", + "displayName": "MultiServiceBooking" } ], - "doc": "" + "doc": "Confirmed multi service booking." } ], "docs": { @@ -13723,29 +24498,26 @@ } }, { - "name": "bookingsV2BookingBulkCalculateAllowedActionsResult", + "name": "bookingsV2BookingConfirmOrDeclineBookingRequest", "members": [ { - "name": "item", - "optional": true, + "name": "bookingId", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingAllowedActions", - "displayName": "AllowedActions" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of the booking to confirm or decline." }, { - "name": "itemMetadata", + "name": "paymentStatus", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", - "displayName": "ItemMetadata" + "nativeType": "string" } ], - "doc": "(id, indexInGivenSeq, isSuccessful, error)" + "doc": "Current payment status of the booking." } ], "docs": { @@ -13755,34 +24527,18 @@ } }, { - "name": "bookingsV2BookingBulkCreateBookingRequest", + "name": "bookingsV2BookingConfirmOrDeclineBookingResponse", "members": [ { - "name": "createBookingsInfo", - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCreateBookingInfo", - "displayName": "CreateBookingInfo" - } - ] - } - } - ], - "doc": "Bookings to create.\nMax: 8 bookings." - }, - { - "name": "returnFullEntity", + "name": "booking", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ], - "doc": "Whether to return the created bookings entities." + "doc": "" } ], "docs": { @@ -13792,36 +24548,27 @@ } }, { - "name": "bookingsV2BookingBulkCreateBookingResponse", + "name": "bookingsV2BookingConfirmRequest", "members": [ { - "name": "bulkActionMetadata", - "optional": true, + "name": "_id", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", - "displayName": "BulkActionMetadata" + "nativeType": "string" } ], - "doc": "Total successes and failures of the bulk create booking action." + "doc": "ID of the booking to be confirmed." }, { - "name": "results", + "name": "participantNotification", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkBookingResult", - "displayName": "BulkBookingResult" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "Bulk create booking results.\nWhether it successfully created each booking, providing the corresponding error message if a failure occurred, and includes the created booking entity if the `returnFullEntity` is `true`." + "doc": "Whether to notify the participants about the booking confirmation, and an optional custom message." } ], "docs": { @@ -13831,35 +24578,28 @@ } }, { - "name": "bookingsV2BookingBulkRescheduleBookingRequest", + "name": "bookingsV2BookingConfirmResponse", "members": [ { - "name": "participantNotification", + "name": "booking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "" }, { - "name": "slotsBookings", + "name": "doubleBooked", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingSlotBookings", - "displayName": "SlotBookings" - } - ] - } + "nativeType": "boolean" } ], - "doc": "Reschedule multiple bookings to multiple slots." + "doc": "Whether this booking overlaps with another existing confirmed booking." } ], "docs": { @@ -13869,24 +24609,15 @@ } }, { - "name": "bookingsV2BookingBulkRescheduleBookingRequestBooking", + "name": "bookingsV2BookingConsistentQueryBookingsRequest", "members": [ { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of the bookings to be rescheduled." - }, - { - "name": "revision", + "name": "query", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingQueryV2", + "displayName": "QueryV2" } ], "doc": "" @@ -13899,21 +24630,10 @@ } }, { - "name": "bookingsV2BookingBulkRescheduleBookingResponse", + "name": "bookingsV2BookingConsistentQueryBookingsResponse", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", - "displayName": "BulkActionMetadata" - } - ], - "doc": "Total successes and failures of the bulk reschedule action." - }, - { - "name": "results", + "name": "bookings", "optional": true, "type": [ { @@ -13921,14 +24641,25 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", - "displayName": "ItemMetadata" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ] } } ], - "doc": "The bulk reschedule results. For each booking, the results contain the metadata of the reschedule action." + "doc": "" + }, + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingPagingMetadataV2", + "displayName": "PagingMetadataV2" + } + ], + "doc": "" } ], "docs": { @@ -13938,149 +24669,88 @@ } }, { - "name": "bookingsV2BookingBulkUpdateBookedScheduleRequest", + "name": "bookingsV2BookingContactDetails", "members": [ { - "name": "bookings", + "name": "contactId", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingDetails", - "displayName": "BookingDetails" - } - ] - } + "nativeType": "string" } ], - "doc": "The bookings whose booked schedule is to be updated to the given schedule." + "doc": "Contact's ID." }, { - "name": "participantNotification", + "name": "countryCode", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." }, { - "name": "scheduleId", + "name": "email", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The ID of the schedule to be updated." - } - ], - "docs": { - "description": [ - "Update the booked schedule of multiple bookings to the given schedule." - ] - } - }, - { - "name": "bookingsV2BookingBulkUpdateBookedScheduleResponse", - "members": [ + "doc": "Contact's email, used to create a new contact or get existing one from the [Contacts API](https://dev.wix.com/api/rest/contacts/contacts). Used to validate coupon usage limitations per contact. If not passed, the coupon usage limitation will not be enforced. (Coupon usage limitation validation is not supported yet)." + }, { - "name": "bulkActionMetadata", + "name": "firstName", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", - "displayName": "BulkActionMetadata" + "nativeType": "string" } ], - "doc": "Total successes and failures of the bulk update action." + "doc": "Contact's first name. When populated from a standard booking form, this property corresponds to the **Name** field." }, { - "name": "results", + "name": "fullAddress", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", - "displayName": "ItemMetadata" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingAddress", + "displayName": "Address" } ], - "doc": "The bulk update results. For each booking, the results contain the metadata of the update action." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingBulkUpdateBookingRequest", - "members": [ + "doc": "Contact's full address." + }, { - "name": "bookings", + "name": "lastName", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMaskedBooking", - "displayName": "MaskedBooking" - } - ] - } + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "The `fieldMask` for each booking should not include both the `numberOfParticipants` and `participantsInfo` paths. Including both results\nin an error. `participantsInfo` is preferred over `numberOfParticipants`." - ] - } - }, - { - "name": "bookingsV2BookingBulkUpdateBookingResponse", - "members": [ + "doc": "Contact's last name." + }, { - "name": "bulkActionMetadata", + "name": "phone", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBulkActionMetadata", - "displayName": "BulkActionMetadata" + "nativeType": "string" } ], - "doc": "" + "doc": "Contact's phone number." }, { - "name": "results", + "name": "timeZone", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingItemMetadata", - "displayName": "ItemMetadata" - } - ] - } + "nativeType": "string" } ], - "doc": "" + "doc": "Contact's time zone." } ], "docs": { @@ -14090,37 +24760,37 @@ } }, { - "name": "bookingsV2BookingCalculateAllowedActionsRequest", + "name": "bookingsV2BookingCreateBookingFlowControlSettings", "members": [ { - "name": "bookingId", + "name": "skipAvailabilityValidation", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "The booking id that we want to calculate the allowedActions for" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingCalculateAllowedActionsResponse", - "members": [ + "doc": "Whether the availability is checked before creating the booking. When\npassing `false` a booking is only created when the slot or schedule is\navailable.\nDefault: `false`." + }, + { + "name": "skipBusinessConfirmation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether `PENDING` bookings are automatically set to `CONFIRMED` for\nservices that normally require the owner's manual confirmation. Your\napp must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope\nwhen passing `true`.\nDefault: `false`." + }, { - "name": "allowedActions", + "name": "skipSelectedPaymentOptionValidation", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingAllowedActions", - "displayName": "AllowedActions" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether customers can pay using a payment method that isn't supported\nfor the service, but that's supported for other services. Your app\nmust have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing\n`true`.\nDefault: `false`." } ], "docs": { @@ -14130,27 +24800,50 @@ } }, { - "name": "bookingsV2BookingCancelBookingFlowControlSettings", + "name": "bookingsV2BookingCreateBookingInfo", "members": [ { - "name": "ignoreCancellationPolicy", + "name": "booking", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ], - "doc": "Whether the cancelation policy applies when canceling the booking. When\npassing `false` you can only cancel a booking if the cancelation policy\nallows it.\nDefault: `false`.\n" + "doc": "The booking to create" }, { - "name": "withRefund", + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCreateBookingFlowControlSettings", + "displayName": "CreateBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Information about a message to send to the customer." + }, + { + "name": "sendSmsReminder", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether to issue a refund when canceling the booking.\nThe refund will be issued only if the booking is refundable.\nCurrently, booking is considered refundable when it was paid by membership.\nIf passing `true`, the booking flow control settings will be set with refund,\notherwise, either if `false` is passed or the field remains empty,\nthe booking flow control settings will be set with no refund.\nDefault: `false`." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." } ], "docs": { @@ -14160,16 +24853,28 @@ } }, { - "name": "bookingsV2BookingCancelBookingRequest", + "name": "bookingsV2BookingCreateBookingRequest", "members": [ { - "name": "bookingId", + "name": "booking", "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ], - "doc": "ID of the booking to cancel." + "doc": "The booking to create." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCreateBookingFlowControlSettings", + "displayName": "CreateBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." }, { "name": "participantNotification", @@ -14180,16 +24885,17 @@ "displayName": "ParticipantNotification" } ], - "doc": "Information about whether to notify the customer about the cancelation and\nthe message to send." + "doc": "Information about a message to send to the customer." }, { - "name": "revision", + "name": "sendSmsReminder", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when managing the booking." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." } ], "docs": { @@ -14199,27 +24905,37 @@ } }, { - "name": "bookingsV2BookingCancelBookingRequestFlowControlSettings", + "name": "bookingsV2BookingCreateBookingRequestFlowControlSettings", "members": [ { - "name": "ignoreCancellationPolicy", + "name": "skipAvailabilityValidation", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the cancelation policy applies when canceling the booking. When\npassing `false` you can only cancel a booking if the cancelation policy\nallows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `\npermission scope when passing `true`.\n\nDefault: `false`.\n\n\n" + "doc": "Whether the availability is checked before creating the booking. When\npassing `false` a booking is only created when the slot or schedule is\navailable. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`\npermission scope when passing `true`.\n\nDefault: `false`.\n" }, { - "name": "withRefund", + "name": "skipBusinessConfirmation", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether to issue a refund when canceling the booking.\nThe refund will be issued only if the booking is refundable.\nCurrently, booking is considered refundable when it was paid by membership.\nIf passing `true`, the booking flow control settings will be set with refund,\notherwise, either if `false` is passed or the field remains empty,\nthe booking flow control settings will be set with no refund.\n\nDefault: `false`.\n" + "doc": "Whether `PENDING` bookings are automatically set to `CONFIRMED` for\nservices that normally require the owner's manual confirmation. Your\napp must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope\nwhen passing `true`.\n\nDefault: `false`.\n" + }, + { + "name": "skipSelectedPaymentOptionValidation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether customers can pay using a payment method that isn't supported\nfor the service, but that's supported for other services. Your app\nmust have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing\n`true`.\n\nDefault: `false`.\n" } ], "docs": { @@ -14229,7 +24945,7 @@ } }, { - "name": "bookingsV2BookingCancelBookingResponse", + "name": "bookingsV2BookingCreateBookingResponse", "members": [ { "name": "booking", @@ -14240,7 +24956,7 @@ "displayName": "Booking" } ], - "doc": "Canceled booking." + "doc": "Created booking." } ], "docs": { @@ -14250,73 +24966,99 @@ } }, { - "name": "bookingsV2BookingCommonIdentificationData", + "name": "bookingsV2BookingCreateMultiServiceBookingRequest", "members": [ { - "name": "anonymousVisitorId", + "name": "bookings", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" + } + ] + } + } + ], + "doc": "The bookings to create as multi service booking." + }, + { + "name": "flowControlSettings", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCreateBookingFlowControlSettings", + "displayName": "CreateBookingFlowControlSettings" } ], - "doc": "ID of a site visitor that has not logged in to the site." + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." }, { - "name": "appId", + "name": "multiServiceBookingType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of an app." + "doc": "Multi service booking type.\nOne of:\n- `\"SEQUENTIAL_BOOKINGS\"` Multi service booking will be considered available if its bookings are available as returned from ListMultiServiceAvailabilityTimeSlots API.\n- `\"SEPARATE_BOOKINGS\"` Not supported yet.\n- `\"PARALLEL_BOOKINGS\"` Not supported yet." }, { - "name": "contactId", - "readOnly": true, + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system." + "doc": "Information about a message to send to the customer." }, { - "name": "memberId", + "name": "returnFullEntity", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of a site visitor that has logged in to the site." + "doc": "Whether to return the created bookings entities." }, { - "name": "wixUserId", + "name": "sendSmsReminder", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of a Wix user (site owner, contributor, etc.)." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCommonIdentificationDataIdOneOf", - "members": [ - "anonymousVisitorId", - "appId", - "memberId", - "wixUserId" - ] - } + "docs": { + "description": [ + "" ] - }, + } + }, + { + "name": "bookingsV2BookingCreateMultiServiceBookingResponse", + "members": [ + { + "name": "multiServiceBooking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMultiServiceBooking", + "displayName": "MultiServiceBooking" + } + ], + "doc": "Created multi service booking.\nContains the booking results on the same order as passed on the request." + } + ], "docs": { "description": [ "" @@ -14324,47 +25066,57 @@ } }, { - "name": "bookingsV2BookingCommonIdentificationDataIdOneOf", + "name": "bookingsV2BookingCursorPaging", "members": [ { - "name": "anonymousVisitorId", + "name": "cursor", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of a site visitor that has not logged in to the site." + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { - "name": "appId", + "name": "limit", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of an app." - }, + "doc": "Maximum number of items to return in the results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingCursors", + "members": [ { - "name": "memberId", + "name": "next", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of a site visitor that has logged in to the site." + "doc": "Cursor string pointing to the next page in the list of results." }, { - "name": "wixUserId", + "name": "prev", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of a Wix user (site owner, contributor, etc.)." + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -14374,57 +25126,48 @@ } }, { - "name": "bookingsV2BookingConfirmBookingRequest", + "name": "bookingsV2BookingCustomFormField", "members": [ { - "name": "bookingId", + "name": "_id", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the booking to confirm." + "doc": "ID of the form field as defined in the form." }, { - "name": "participantNotification", + "name": "label", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "nativeType": "string" } ], - "doc": "Information about whether to notify the customer about the confirmation and\nthe message to send." + "doc": "Form field's label at the time of submission." }, { - "name": "revision", + "name": "value", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingConfirmBookingResponse", - "members": [ + "doc": "Value that was submitted for this field." + }, { - "name": "booking", + "name": "valueType", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "nativeType": "string" } ], - "doc": "" + "doc": "" } ], "docs": { @@ -14434,7 +25177,7 @@ } }, { - "name": "bookingsV2BookingConfirmOrDeclineBookingRequest", + "name": "bookingsV2BookingDeclineBookingRequest", "members": [ { "name": "bookingId", @@ -14443,17 +25186,27 @@ "nativeType": "string" } ], - "doc": "ID of the booking to confirm or decline." + "doc": "ID of the booking to decline." }, { - "name": "paymentStatus", + "name": "participantNotification", "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the decline and\nthe message to send." + }, + { + "name": "revision", "type": [ { "nativeType": "string" } ], - "doc": "Current payment status of the booking." + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." } ], "docs": { @@ -14463,7 +25216,7 @@ } }, { - "name": "bookingsV2BookingConfirmOrDeclineBookingResponse", + "name": "bookingsV2BookingDeclineBookingResponse", "members": [ { "name": "booking", @@ -14474,7 +25227,7 @@ "displayName": "Booking" } ], - "doc": "" + "doc": "Declined booking." } ], "docs": { @@ -14484,16 +25237,44 @@ } }, { - "name": "bookingsV2BookingConfirmRequest", + "name": "bookingsV2BookingDeclineMultiServiceBookingRequest", "members": [ { - "name": "_id", + "name": "declineBookingsInfo", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingInfo", + "displayName": "BookingInfo" + } + ] + } + } + ], + "doc": "Bookings to decline." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "multiServiceBookingId", "type": [ { "nativeType": "string" } ], - "doc": "ID of the booking to be confirmed." + "doc": "ID of the multi service booking to decline it's related bookings." }, { "name": "participantNotification", @@ -14504,28 +25285,17 @@ "displayName": "ParticipantNotification" } ], - "doc": "Whether to notify the participants about the booking confirmation, and an optional custom message." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingConfirmResponse", - "members": [ + "doc": "Information about whether to notify the customer about the decline and the message to send." + }, { - "name": "booking", + "name": "returnFullEntity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether to return the declined bookings entities." } ], "docs": { @@ -14535,18 +25305,18 @@ } }, { - "name": "bookingsV2BookingConsistentQueryBookingsRequest", + "name": "bookingsV2BookingDeclineMultiServiceBookingResponse", "members": [ { - "name": "query", + "name": "multiServiceBooking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingQueryV2", - "displayName": "QueryV2" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMultiServiceBooking", + "displayName": "MultiServiceBooking" } ], - "doc": "" + "doc": "Declined multi service booking." } ], "docs": { @@ -14556,36 +25326,27 @@ } }, { - "name": "bookingsV2BookingConsistentQueryBookingsResponse", + "name": "bookingsV2BookingExtendedFields", "members": [ { - "name": "bookings", + "name": "namespaces", "optional": true, "type": [ { "complexType": { - "nativeType": "Array", + "nativeType": "Record", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "nativeType": "string" + }, + { + "nativeType": "Object" } ] } } ], - "doc": "" - }, - { - "name": "pagingMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingPagingMetadataV2", - "displayName": "PagingMetadataV2" - } - ], - "doc": "" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -14595,88 +25356,66 @@ } }, { - "name": "bookingsV2BookingContactDetails", + "name": "bookingsV2BookingFlowControlSettings", "members": [ { - "name": "contactId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's ID." - }, - { - "name": "countryCode", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." - }, - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's email, used to create a new contact or get existing one from the [Contacts API](https://dev.wix.com/api/rest/contacts/contacts). Used to validate coupon usage limitations per contact. If not passed, the coupon usage limitation will not be enforced. (Coupon usage limitation validation is not supported yet)." - }, - { - "name": "firstName", + "name": "skipAvailabilityValidation", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Contact's first name. When populated from a standard booking form, this property corresponds to the **Name** field." + "doc": "When true, skips availability checking and allows booking.\nRequires BOOKINGS.OVERRIDE_AVAILABILITY permissions." }, { - "name": "fullAddress", + "name": "skipBusinessConfirmation", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingAddress", - "displayName": "Address" + "nativeType": "boolean" } ], - "doc": "Contact's full address." + "doc": "When true, allows booking a confirmation-required service without requiring confirmation.\nRequires BOOKINGS.IGNORE_BOOKING_POLICY permissions." }, { - "name": "lastName", + "name": "skipSelectedPaymentOptionValidation", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Contact's last name." + "doc": "When true, skips selected payment option checking as defined in `selectedPaymentOption` field\nand allows booking.\nRequires BOOKINGS.MANAGE_PAYMENTS permissions." }, { - "name": "phone", + "name": "withRefund", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Contact's phone number." - }, + "doc": "When true, refunds the booking's payment when the booking is canceled." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingGetMultiServiceBookingAvailabilityRequest", + "members": [ { - "name": "timeZone", - "optional": true, + "name": "multiServiceBookingId", "type": [ { "nativeType": "string" } ], - "doc": "Contact's time zone." + "doc": "" } ], "docs": { @@ -14686,90 +25425,97 @@ } }, { - "name": "bookingsV2BookingCreateBookingFlowControlSettings", + "name": "bookingsV2BookingGetMultiServiceBookingAvailabilityResponse", "members": [ { - "name": "skipAvailabilityValidation", + "name": "bookable", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the availability is checked before creating the booking. When\npassing `false` a booking is only created when the slot or schedule is\navailable.\nDefault: `false`." + "doc": "Whether these bookings are bookable." }, { - "name": "skipBusinessConfirmation", + "name": "multiServiceBookingInfo", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingGetMultiServiceBookingAvailabilityResponseBookingInfo", + "displayName": "GetMultiServiceBookingAvailabilityResponseBookingInfo" + } + ] + } } ], - "doc": "Whether `PENDING` bookings are automatically set to `CONFIRMED` for\nservices that normally require the owner's manual confirmation. Your\napp must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope\nwhen passing `true`.\nDefault: `false`." + "doc": "Info of the bookings this availability was calculated for." }, { - "name": "skipSelectedPaymentOptionValidation", + "name": "policySettings", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingPolicySettings", + "displayName": "BookingPolicySettings" } ], - "doc": "Whether customers can pay using a payment method that isn't supported\nfor the service, but that's supported for other services. Your app\nmust have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing\n`true`.\nDefault: `false`." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingCreateBookingInfo", - "members": [ + "doc": "Multi service booking policy settings" + }, { - "name": "booking", + "name": "policyViolations", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingPolicyViolations", + "displayName": "BookingPolicyViolations" } ], - "doc": "The booking to create" + "doc": "Indicators for policy violations of the multi service booking." }, { - "name": "flowControlSettings", + "name": "remainingCapacity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCreateBookingFlowControlSettings", - "displayName": "CreateBookingFlowControlSettings" + "nativeType": "number" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + "doc": "Number of open spots for this availability." }, { - "name": "participantNotification", + "name": "totalCapacity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "nativeType": "number" } ], - "doc": "Information about a message to send to the customer." - }, + "doc": "Total number of spots for this availability." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingGetMultiServiceBookingAvailabilityResponseBookingInfo", + "members": [ { - "name": "sendSmsReminder", + "name": "bookingId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." + "doc": "Booking id" } ], "docs": { @@ -14779,49 +25525,67 @@ } }, { - "name": "bookingsV2BookingCreateBookingRequest", + "name": "bookingsV2BookingGetMultiServiceBookingRequest", "members": [ { - "name": "booking", + "name": "multiServiceBookingId", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "nativeType": "string" } ], - "doc": "The booking to create." - }, + "doc": "Multi service booking ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingGetMultiServiceBookingResponse", + "members": [ { - "name": "flowControlSettings", + "name": "metadata", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingCreateBookingFlowControlSettings", - "displayName": "CreateBookingFlowControlSettings" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMultiServiceBookingMetadata", + "displayName": "MultiServiceBookingMetadata" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + "doc": "" }, { - "name": "participantNotification", + "name": "multiServiceBooking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMultiServiceBooking", + "displayName": "MultiServiceBooking" } ], - "doc": "Information about a message to send to the customer." - }, - { - "name": "sendSmsReminder", - "optional": true, + "doc": "Multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingGetScheduleAvailabilityRequest", + "members": [ + { + "name": "scheduleId", "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." + "doc": "The schedule ID for which availability is checked." } ], "docs": { @@ -14831,37 +25595,29 @@ } }, { - "name": "bookingsV2BookingCreateBookingRequestFlowControlSettings", + "name": "bookingsV2BookingGetScheduleAvailabilityResponse", "members": [ { - "name": "skipAvailabilityValidation", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the availability is checked before creating the booking. When\npassing `false` a booking is only created when the slot or schedule is\navailable. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`\npermission scope when passing `true`.\n\nDefault: `false`.\n" - }, - { - "name": "skipBusinessConfirmation", + "name": "availability", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingScheduleAvailability", + "displayName": "ScheduleAvailability" } ], - "doc": "Whether `PENDING` bookings are automatically set to `CONFIRMED` for\nservices that normally require the owner's manual confirmation. Your\napp must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope\nwhen passing `true`.\n\nDefault: `false`.\n" + "doc": "" }, { - "name": "skipSelectedPaymentOptionValidation", + "name": "bookingPolicySettings", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingPolicySettings", + "displayName": "BookingPolicySettings" } ], - "doc": "Whether customers can pay using a payment method that isn't supported\nfor the service, but that's supported for other services. Your app\nmust have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing\n`true`.\n\nDefault: `false`.\n" + "doc": "" } ], "docs": { @@ -14871,18 +25627,28 @@ } }, { - "name": "bookingsV2BookingCreateBookingResponse", + "name": "bookingsV2BookingGetSlotAvailabilityRequest", "members": [ { - "name": "booking", + "name": "slot", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingV2Slot", + "displayName": "V2Slot" } ], - "doc": "Created booking." + "doc": "The slot for which the availability is checked." + }, + { + "name": "timezone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The timezone for which availability is to be calculated." } ], "docs": { @@ -14892,27 +25658,29 @@ } }, { - "name": "bookingsV2BookingCursorPaging", + "name": "bookingsV2BookingGetSlotAvailabilityResponse", "members": [ { - "name": "cursor", + "name": "availability", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingSlotAvailability", + "displayName": "SlotAvailability" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "" }, { - "name": "limit", + "name": "bookingPolicySettings", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingPolicySettings", + "displayName": "BookingPolicySettings" } ], - "doc": "Number of items to load." + "doc": "" } ], "docs": { @@ -14922,29 +25690,72 @@ } }, { - "name": "bookingsV2BookingCursors", + "name": "bookingsV2BookingIdentificationData", "members": [ { - "name": "next", + "name": "anonymousVisitorId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "ID of a site visitor that has not logged in to the site." }, { - "name": "prev", + "name": "appId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "ID of an app." + }, + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, "docs": { "description": [ "" @@ -14952,48 +25763,47 @@ } }, { - "name": "bookingsV2BookingCustomFormField", + "name": "bookingsV2BookingIdentificationDataIdOneOf", "members": [ { - "name": "_id", + "name": "anonymousVisitorId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the form field as defined in the form." + "doc": "ID of a site visitor that has not logged in to the site." }, { - "name": "label", - "readOnly": true, + "name": "appId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Form field's label at the time of submission." + "doc": "ID of an app." }, { - "name": "value", + "name": "memberId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Value that was submitted for this field." + "doc": "ID of a site visitor that has logged in to the site." }, { - "name": "valueType", + "name": "wixUserId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "ID of a Wix user (site owner, contributor, etc.)." } ], "docs": { @@ -15003,36 +25813,48 @@ } }, { - "name": "bookingsV2BookingDeclineBookingRequest", + "name": "bookingsV2BookingItemMetadata", "members": [ { - "name": "bookingId", + "name": "_id", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the booking to decline." + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." }, { - "name": "participantNotification", + "name": "error", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", - "displayName": "ParticipantNotification" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingApplicationError", + "displayName": "ApplicationError" } ], - "doc": "Information about whether to notify the customer about the decline and\nthe message to send." + "doc": "Details about the error in case of failure." }, { - "name": "revision", + "name": "originalIndex", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." } ], "docs": { @@ -15042,18 +25864,17 @@ } }, { - "name": "bookingsV2BookingDeclineBookingResponse", + "name": "bookingsV2BookingLegacyCreateBookingRequest", "members": [ { "name": "booking", - "optional": true, "type": [ { "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", "displayName": "Booking" } ], - "doc": "Declined booking." + "doc": "" } ], "docs": { @@ -15063,27 +25884,18 @@ } }, { - "name": "bookingsV2BookingExtendedFields", + "name": "bookingsV2BookingLegacyCreateBookingResponse", "members": [ { - "name": "namespaces", + "name": "booking", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "Object" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ], - "doc": "Data Extensions extended fields\nKey: Namespace\nValue: extended fields data in Struct format" + "doc": "" } ], "docs": { @@ -15093,47 +25905,47 @@ } }, { - "name": "bookingsV2BookingFlowControlSettings", + "name": "bookingsV2BookingLocation", "members": [ { - "name": "skipAvailabilityValidation", + "name": "_id", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "When true, skips availability checking and allows booking.\nRequires BOOKINGS.OVERRIDE_AVAILABILITY permissions." + "doc": "Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`." }, { - "name": "skipBusinessConfirmation", + "name": "formattedAddress", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "When true, allows booking a confirmation-required service without requiring confirmation.\nRequires BOOKINGS.IGNORE_BOOKING_POLICY permissions." + "doc": "The full address of this location." }, { - "name": "skipSelectedPaymentOptionValidation", + "name": "locationType", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "When true, skips selected payment option checking as defined in `selectedPaymentOption` field\nand allows booking.\nRequires BOOKINGS.MANAGE_PAYMENTS permissions." + "doc": "Location type.\n\n- `\"OWNER_BUSINESS\"`: The business address, as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"`: The address as set when creating the service.\n- `\"CUSTOM\"`: The address as set for the individual session.\n" }, { - "name": "withRefund", + "name": "name", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "When true, refunds the booking's payment when the booking is canceled." + "doc": "Location name." } ], "docs": { @@ -15143,16 +25955,33 @@ } }, { - "name": "bookingsV2BookingGetScheduleAvailabilityRequest", + "name": "bookingsV2BookingMarkAsMultiServiceBookingRequest", "members": [ { - "name": "scheduleId", + "name": "bookingIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the bookings to mark as multi service booking." + }, + { + "name": "multiServiceBookingType", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The schedule ID for which availability is checked." + "doc": "Multi service booking type.\nOne of:\n- `\"SEQUENTIAL_BOOKINGS\"` Multi service booking will be considered available if its bookings are available as returned from ListMultiServiceAvailabilityTimeSlots API.\n- `\"SEPARATE_BOOKINGS\"` Not supported yet.\n- `\"PARALLEL_BOOKINGS\"` Not supported yet." } ], "docs": { @@ -15162,29 +25991,17 @@ } }, { - "name": "bookingsV2BookingGetScheduleAvailabilityResponse", + "name": "bookingsV2BookingMarkAsMultiServiceBookingResponse", "members": [ { - "name": "availability", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingScheduleAvailability", - "displayName": "ScheduleAvailability" - } - ], - "doc": "" - }, - { - "name": "bookingPolicySettings", + "name": "multiServiceBookingId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingPolicySettings", - "displayName": "BookingPolicySettings" + "nativeType": "string" } ], - "doc": "" + "doc": "Multi service booking ID." } ], "docs": { @@ -15194,28 +26011,27 @@ } }, { - "name": "bookingsV2BookingGetSlotAvailabilityRequest", + "name": "bookingsV2BookingMarkBookingAsPendingFlowControlSettings", "members": [ { - "name": "slot", + "name": "checkAvailabilityValidation", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingV2Slot", - "displayName": "V2Slot" + "nativeType": "boolean" } ], - "doc": "The slot for which the availability is checked." + "doc": "Whether should check for double bookings before updating the booking as pending.\nWhen passing `false` a booking is only being updated with status PENDING\nDefault: `false`." }, { - "name": "timezone", + "name": "skipPendingApprovalServiceValidation", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "The timezone for which availability is to be calculated." + "doc": "Whether should validate that the given booking to be marked as pending, has a booking.slot.serviceId\nof a pending approval service.\nDefault: `false`." } ], "docs": { @@ -15225,104 +26041,79 @@ } }, { - "name": "bookingsV2BookingGetSlotAvailabilityResponse", + "name": "bookingsV2BookingMarkBookingAsPendingRequest", "members": [ { - "name": "availability", - "optional": true, + "name": "bookingId", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingSlotAvailability", - "displayName": "SlotAvailability" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of the booking to mark as PENDING." }, { - "name": "bookingPolicySettings", + "name": "doubleBooked", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingPolicySettings", - "displayName": "BookingPolicySettings" + "nativeType": "boolean" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingIdentificationData", - "members": [ + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, { - "name": "anonymousVisitorId", + "name": "flowControlSettings", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMarkBookingAsPendingFlowControlSettings", + "displayName": "MarkBookingAsPendingFlowControlSettings" } ], - "doc": "ID of a site visitor that has not logged in to the site." + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before updating the booking's status." }, { - "name": "appId", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "ID of an app." + "doc": "Information about whether to notify the customer and\nthe message to send." }, { - "name": "contactId", + "name": "paymentStatus", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system." + "doc": "Payment status to set for the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." }, { - "name": "memberId", - "optional": true, + "name": "revision", "type": [ { "nativeType": "string" } ], - "doc": "ID of a site visitor that has logged in to the site." + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." }, { - "name": "wixUserId", + "name": "sendSmsReminder", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of a Wix user (site owner, contributor, etc.)." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfIdentificationDataIdOneOf", - "members": [ - "anonymousVisitorId", - "appId", - "memberId", - "wixUserId" - ] - } - ] - }, "docs": { "description": [ "" @@ -15330,98 +26121,107 @@ } }, { - "name": "bookingsV2BookingIdentificationDataIdOneOf", + "name": "bookingsV2BookingMarkBookingAsPendingResponse", "members": [ { - "name": "anonymousVisitorId", + "name": "booking", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", + "displayName": "Booking" } ], - "doc": "ID of a site visitor that has not logged in to the site." - }, + "doc": "The updated booking" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingMarkMultiServiceBookingAsPendingRequest", + "members": [ { - "name": "appId", + "name": "doubleBooked", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of an app." + "doc": "Whether this booking overlaps with another existing confirmed booking." }, { - "name": "memberId", + "name": "flowControlSettings", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMarkBookingAsPendingFlowControlSettings", + "displayName": "MarkBookingAsPendingFlowControlSettings" } ], - "doc": "ID of a site visitor that has logged in to the site." + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before updating the booking." }, { - "name": "wixUserId", + "name": "markAsPendingBookingsInfo", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingInfo", + "displayName": "BookingInfo" + } + ] + } } ], - "doc": "ID of a Wix user (site owner, contributor, etc.)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsV2BookingItemMetadata", - "members": [ + "doc": "Bookings to mark as pending." + }, { - "name": "_id", - "optional": true, + "name": "multiServiceBookingId", "type": [ { "nativeType": "string" } ], - "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + "doc": "ID of the multi service booking to mark as pending it's related bookings." }, { - "name": "error", + "name": "participantNotification", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingApplicationError", - "displayName": "ApplicationError" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "Details about the error in case of failure." + "doc": "Information about whether to notify the customer upon manual confirmation and the message to send." }, { - "name": "originalIndex", + "name": "returnFullEntity", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Index of the item within the request array. Allows for correlation between request and response items." + "doc": "Whether to return the pending bookings entities." }, { - "name": "success", + "name": "sendSmsReminder", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." } ], "docs": { @@ -15431,17 +26231,18 @@ } }, { - "name": "bookingsV2BookingLegacyCreateBookingRequest", + "name": "bookingsV2BookingMarkMultiServiceBookingAsPendingResponse", "members": [ { - "name": "booking", + "name": "multiServiceBooking", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMultiServiceBooking", + "displayName": "MultiServiceBooking" } ], - "doc": "" + "doc": "Pending multi service booking." } ], "docs": { @@ -15451,7 +26252,7 @@ } }, { - "name": "bookingsV2BookingLegacyCreateBookingResponse", + "name": "bookingsV2BookingMaskedBooking", "members": [ { "name": "booking", @@ -15472,47 +26273,83 @@ } }, { - "name": "bookingsV2BookingLocation", + "name": "bookingsV2BookingMigrationCheckIfClashesWithBlockedTimeRequest", "members": [ { - "name": "_id", + "name": "msidAndBookingIds", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMsidAndBookingId", + "displayName": "MsidAndBookingId" + } + ] + } } ], - "doc": "Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingMigrationCheckIfClashesWithBlockedTimeResponse", + "members": [ { - "name": "formattedAddress", + "name": "clashes", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingClash", + "displayName": "Clash" + } + ] + } } ], - "doc": "The full address of this location." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingMsidAndBookingId", + "members": [ { - "name": "locationType", + "name": "bookingId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location type.\n\n- `\"OWNER_BUSINESS\"`: The business address, as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"`: The address as set when creating the service.\n- `\"CUSTOM\"`: The address as set for the individual session.\n" + "doc": "" }, { - "name": "name", + "name": "msid", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location name." + "doc": "" } ], "docs": { @@ -15522,21 +26359,20 @@ } }, { - "name": "bookingsV2BookingMaskedBooking", + "name": "bookingsV2BookingMultiServiceBooking", "members": [ { - "name": "booking", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBooking", - "displayName": "Booking" + "nativeType": "string" } ], - "doc": "" + "doc": "Multi service booking ID." }, { - "name": "mask", + "name": "bookings", "optional": true, "type": [ { @@ -15544,13 +26380,65 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingResult", + "displayName": "BookingResult" } ] } } ], - "doc": "" + "doc": "The created bookings which are part of the multi service booking" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingMultiServiceBookingInfo", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Multi service booking ID." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Multi service booking type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingMultiServiceBookingMetadata", + "members": [ + { + "name": "totalNumberOfScheduledBookings", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of the scheduled bookings within the multi service booking, including bookings which were not retrieved due to lack of read permissions.\nScheduled bookings are bookings with status CONFIRMED or PENDING." } ], "docs": { @@ -16090,6 +26978,81 @@ ] } }, + { + "name": "bookingsV2BookingRemoveBookingsFromMultiServiceBookingRequest", + "members": [ + { + "name": "bookings", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingIdAndRevision", + "displayName": "BookingIdAndRevision" + } + ] + } + } + ], + "doc": "List of bookings ids and their revisions to remove from the multi service booking." + }, + { + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingRemoveBookingsFromMultiServiceBookingResponse", + "members": [ + { + "name": "bookings", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingResult", + "displayName": "BookingResult" + } + ] + } + } + ], + "doc": "The bookings that were removed from the multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "bookingsV2BookingRescheduleBookingFlowControlSettings", "members": [ @@ -16314,6 +27277,199 @@ ] } }, + { + "name": "bookingsV2BookingRescheduleMultiServiceBookingRequest", + "members": [ + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingRescheduleBookingFlowControlSettings", + "displayName": "RescheduleBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." + }, + { + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking to reschedule it's related bookings." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the rescheduling and the message to send." + }, + { + "name": "rescheduleBookingsInfo", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingRescheduleMultiServiceBookingRequestRescheduleBookingInfo", + "displayName": "RescheduleMultiServiceBookingRequestRescheduleBookingInfo" + } + ] + } + } + ], + "doc": "Bookings to reschedule." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the rescheduled bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingRescheduleMultiServiceBookingRequestRescheduleBookingInfo", + "members": [ + { + "name": "bookingId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking to reschedule." + }, + { + "name": "participantsChoices", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", + "displayName": "ParticipantChoices" + } + ], + "doc": "Information about the service choices to book. Available only for services with\nvariants.\nPass when not all participants book the same variant." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + }, + { + "name": "slot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingV2Slot", + "displayName": "V2Slot" + } + ], + "doc": "Information about the new slot." + }, + { + "name": "totalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of participants. Available only for services with\nvariants.\nPass when all participants book the same variant." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfRescheduleMultiServiceBookingRequestRescheduleBookingInfoParticipantsInfoOneOf", + "members": [ + "participantsChoices", + "totalParticipants" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingRescheduleMultiServiceBookingRequestRescheduleBookingInfoParticipantsInfoOneOf", + "members": [ + { + "name": "participantsChoices", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingParticipantChoices", + "displayName": "ParticipantChoices" + } + ], + "doc": "Information about the service choices to book. Available only for services with\nvariants.\nPass when not all participants book the same variant." + }, + { + "name": "totalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of participants. Available only for services with\nvariants.\nPass when all participants book the same variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsV2BookingRescheduleMultiServiceBookingResponse", + "members": [ + { + "name": "multiServiceBooking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingMultiServiceBooking", + "displayName": "MultiServiceBooking" + } + ], + "doc": "Rescheduled multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "bookingsV2BookingScheduleAvailability", "members": [ @@ -16980,7 +28136,7 @@ "nativeType": "string" } ], - "doc": "entity_id" + "doc": "ID of the entity to update." }, { "name": "namespace", @@ -16989,7 +28145,7 @@ "nativeType": "string" } ], - "doc": "" + "doc": "Identifier for the app whose extended fields are being updated." }, { "name": "namespaceData", @@ -16998,7 +28154,7 @@ "nativeType": "Object" } ], - "doc": "" + "doc": "Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured." } ], "docs": { @@ -17018,7 +28174,7 @@ "nativeType": "string" } ], - "doc": "" + "doc": "Identifier for the app whose extended field data was updated." }, { "name": "namespaceData", @@ -17028,7 +28184,7 @@ "nativeType": "Object" } ], - "doc": "only data from UpdateExtendedFieldsRequest namespace_data" + "doc": "Updated data." } ], "docs": { @@ -17209,6 +28365,17 @@ ], "doc": "Whether this booking overlaps with another existing confirmed booking." }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingConfirmBookingFlowControlSettings", + "displayName": "ConfirmBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before confirming the booking." + }, { "name": "participantNotification", "optional": true, @@ -17714,7 +28881,7 @@ "displayName": "SlotSlotResource" } ], - "doc": "The resource required for this slot. Currently, in Bookings, this is the relevant staff. Required." + "doc": "The resource required for this slot.\nWhen populated, the given resource will be assigned to the slot upon confirmation according to it's availability.\nWhen empty, If `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation,\notherwise one of the service resources will be assigned to the slot randomly upon confirmation." }, { "name": "scheduleId", diff --git a/wix-bookings-v2/wix-bookings-v2/Services.service.json b/wix-bookings-v2/wix-bookings-v2/Services.service.json index 15ca2e09ad..86ee23f553 100644 --- a/wix-bookings-v2/wix-bookings-v2/Services.service.json +++ b/wix-bookings-v2/wix-bookings-v2/Services.service.json @@ -9,6 +9,631 @@ "relatedGuides": [], "properties": [], "operations": [ + { + "name": "createService", + "params": [ + { + "name": "service", + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ], + "doc": "Service to be created.", + "required": true + } + ], + "requiredFields": [ + "service" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ] + } + } + ], + "doc": "The created service.\n" + }, + "docs": { + "summary": "Creates a new service.", + "description": [], + "examples": [ + { + "title": "Create a class service ", + "body": [ + "", + "import { services } from 'wix-bookings.v2';", + "import { categories } from 'wix-bookings.v1';", + "", + "async function getFirstCategory() {", + " const response = await categories.listCategories();", + " return response.categories[0]", + "}", + "", + "async function createClass() {", + " const category = await getFirstCategory();", + "", + " const serviceToBeCreated = {", + " type: services.ServiceType.CLASS,", + " name: \"Group Cat Hugging\",", + " description: \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " tagLine: \"Get some purr therapy with our cat hugging service!\",", + " defaultCapacity: 30,", + " category: category,", + " payment: {", + " rateType: services.RateType.FIXED,", + " fixed: {", + " price: {", + " value: \"25\",", + " currency: \"USD\"", + " }", + " },", + " options: {", + " online: true,", + " inPerson: false,", + " deposit: false,", + " pricingPlan: false", + " }", + " },", + " onlineBooking: {", + " enabled: true", + " },", + " }", + "", + " const newService = await services.createService(serviceToBeCreated);", + "", + " console.log('Success! Created a new service:', newService);", + "", + " return newService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 3,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8d9560d3-72b9-45c0-a16d-1e73f7d38e11\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/group-cat-hugging\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"1204a214-d1fb-41c8-886a-1ec461b990dd\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + "}", + " */", + "" + ], + "extra": { + "description": "Create a class with a capacity of 30 people." + } + }, + { + "title": "Create an appointment service ", + "body": [ + "import { services } from 'wix-bookings.v2';", + "import { categories } from 'wix-bookings.v1';", + "", + "async function getFirstCategory() {", + " const response = await categories.listCategories();", + " return response.categories[0]", + "}", + "", + "async function createAppointment(staffMemberIds) {", + "", + " const category = await getFirstCategory();", + "", + " const serviceToBeCreated = {", + " type: services.ServiceType.APPOINTMENT,", + " name: \"Personal Cat Hugging\",", + " description: \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " tagLine: \"Get some purr therapy with our cat hugging service!\",", + " category: category,", + " payment: {", + " rateType: services.RateType.FIXED,", + " fixed: {", + " price: {", + " value: \"25\",", + " currency: \"USD\"", + " }", + " },", + " options: {", + " online: true,", + " inPerson: false,", + " deposit: false,", + " pricingPlan: false", + " },", + " },", + " staffMemberIds: staffMemberIds", + " }", + "", + " const newService = await services.createService(serviceToBeCreated);", + "", + " console.log('Success! Created a new service:', newService);", + "", + " return newService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"APPOINTMENT\",", + " \"sortOrder\": 3,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8d9560d3-72b9-45c0-a16d-1e73f7d38e11\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/group-cat-hugging\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"1204a214-d1fb-41c8-886a-1ec461b990dd\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" + ], + "extra": { + "description": "Create an appointment provided by specific staff members." + } + }, + { + "title": "Create a course service ", + "body": [ + "import { services } from 'wix-bookings.v2';", + "import { categories } from 'wix-bookings.v1';", + "", + "async function getFirstCategory() {", + " const response = await categories.listCategories();", + " return response.categories[0]", + "}", + "", + "async function createCourse() {", + "", + " const category = await getFirstCategory();", + "", + " const serviceToBeCreated = {", + " type: services.ServiceType.COURSE,", + " name: \"Cat Hugging Training\",", + " description: \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " tagLine: \"Get some purr therapy training with our cat hugging experts\",", + " defaultCapacity: 30,", + " category: category,", + " payment: {", + " rateType: services.RateType.FIXED,", + " fixed: {", + " price: {", + " value: \"150\",", + " currency: \"USD\"", + " }", + " },", + " options: {", + " online: true,", + " inPerson: false,", + " deposit: false,", + " pricingPlan: false", + " },", + " },", + " onlineBooking: {", + " enabled: true", + " },", + " }", + "", + " const newService = await services.createService(serviceToBeCreated);", + "", + " console.log('Success! Created a new service:', newService);", + "", + " return newService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 3,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\".", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8d9560d3-72b9-45c0-a16d-1e73f7d38e11\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/group-cat-hugging\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"1204a214-d1fb-41c8-886a-1ec461b990dd\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" + ], + "extra": { + "description": "Create a course that can accommodate 30 people." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "createService", + "isAdminMethod": true + }, + { + "name": "deleteService", + "params": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to delete.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.Services.DeleteServiceOptions" + } + ], + "doc": "Allows you to configure how to handle the deleted service's future sessions and how to notify the sessions participants.", + "required": false + } + ], + "requiredFields": [ + "serviceId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Deletes a service.", + "description": [], + "examples": [ + { + "title": "Delete a service @description:", + "body": [ + "import { services } from 'wix-bookings.v2';", + "", + "/*", + " * Sample serviceID value: 'ff61204b-b19a-5cc8-823b-7eed8ae5fc28'", + " */", + "async function deleteService(serviceID) {", + " await services.deleteService(serviceID);", + " console.log('Deleted the service');", + "}", + "", + "/* Promise resolves to void */", + "" + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "deleteService", + "isAdminMethod": true + }, { "name": "getService", "params": [ @@ -49,17 +674,138 @@ "title": "Retrieve a service ", "body": [ "import { services } from 'wix-bookings.v2';", - " ", + "", + "/*", + " * Sample serviceId value: 'ff61204b-b19a-5cc8-823b-7eed8ae5fc28'", + " */", "async function getService(serviceId) {", " try {", - " const result = await services.getService(serviceId);", - " return result;", + " return services.getService(serviceId);", " } catch (error) {", " console.error(error);", " // Handle the error", " }", "}", - " " + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" ] } ] @@ -95,6 +841,8 @@ ">**Notes:**", "> + Use UTC format when filtering with dates.", "> + Only 1 use of each filter in the same query is supported. If a filter is defined more than once in a query, only the first occurrence is processed.", + "", + "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", "|`type`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", @@ -108,8 +856,8 @@ "|`payment.options.inPerson`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", "|`payment.options.pricingPlan`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", "|`onlineBooking.enabled`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", - "|`staffMembersIds`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`hasAll()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasAll)|", "|`locations.business.id`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|", + "|`staffMemberIds`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`hasAll()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasAll)|", "|`supportedSlugs.name`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|", "|`mainSlug.name`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|" ], @@ -118,12 +866,244 @@ "title": "Query services with default settings ", "body": [ "", - "import { services } from 'wix-bookings.v2';", + "import {services} from 'wix-bookings.v2';", "", - "export async function queryServices() {", - " const result = await services.queryServices().find().items;", - " return result;", + "async function queryServices() {", + " const result = await services.queryServices().find()", + " return result.items;", "}", + "", + "/* Promise resolves to:", + " [", + " {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 5,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"326e4696-bef0-4e37-83ad-db33236f1106\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"2e226dda-ba40-4565-b984-d7425a603e4c\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " ]", + " */", "" ], "extra": { @@ -134,15 +1114,250 @@ "title": "Filter services by category ID", "body": [ "", - "import { services } from 'wix-bookings.v2';", + "import {services} from 'wix-bookings.v2';", "", - "export async function filterServicesByCategoryId(categoryId) {", + "/*", + " * Sample categoryId value: '99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c'", + " */", + "async function filterServicesByCategoryId(categoryId) {", " const result = await services.queryServices()", " .eq(\"category.id\", categoryId)", " .find()", - " .items", - " return result;", + "", + " return result.items;", "}", + "", + "/* Promise resolves to:", + " [", + " {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 5,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"326e4696-bef0-4e37-83ad-db33236f1106\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"2e226dda-ba40-4565-b984-d7425a603e4c\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " ]", + " */", "" ] }, @@ -150,15 +1365,247 @@ "title": "Sort services alphabetically by name ", "body": [ "", - "import { services } from 'wix-bookings.v2';", + "import {services} from 'wix-bookings.v2';", "", - "export async function getServicesSorted() {", + "async function getServicesSorted() {", " const result = await services.queryServices()", " .ascending(\"name\")", " .find()", - " .items", - " return result;", + "", + " return result.items;", "}", + "", + "/* Promise resolves to:", + " [", + " {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 5,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"326e4696-bef0-4e37-83ad-db33236f1106\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"2e226dda-ba40-4565-b984-d7425a603e4c\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " ]", + " */", "" ] }, @@ -166,17 +1613,250 @@ "title": "Filter services by `mainSlug.name` ", "body": [ "", - "import { path } from 'wix-location';", - "import { services } from 'wix-bookings.v2';", + "import {path} from 'wix-location';", + "import {services} from 'wix-bookings.v2';", "", "export async function getServiceFromPath() {", " const [serviceNameInUrl] = path;", - " const response = await services.queryServices()", + " const result = await services.queryServices()", " .eq(\"mainSlug.name\", serviceNameInUrl)", " .limit(1)", - " .find()", - " return response.items[0];", + " .find();", + "", + " return result.items[0];", "}", + "", + "/* Promise resolves to:", + " [", + " {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 5,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"326e4696-bef0-4e37-83ad-db33236f1106\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"2e226dda-ba40-4565-b984-d7425a603e4c\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " ]", + " */", "" ], "extra": { @@ -192,6 +1872,368 @@ } ], "syntaxName": "queryServices" + }, + { + "name": "updateService", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID.", + "required": true + }, + { + "name": "service", + "type": [ + { + "referenceType": "wix-bookings-v2.Services.UpdateService" + } + ], + "doc": "", + "required": true + } + ], + "requiredFields": [ + "_id", + "service", + "service.revision" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ] + } + } + ], + "doc": "The updated service.\n" + }, + "docs": { + "summary": "Updates a service.", + "description": [ + "[Partial updates](https://dev.wix.com/api/rest/wix-bookings/bookings/patch-endpoints-and-field-masks-in-update-requests) are supported.\n\nEach time the service is updated, `revision` increments by 1. You must include the\nnumber of the existing revision when\nupdating the service. This ensures you're working with the\nlatest service information and prevents unintended overwrites." + ], + "examples": [ + { + "title": "Update a service with a full update ", + "body": [ + "import { services } from 'wix-bookings.v2';", + "", + "async function updateService() {", + " const serviceToBeCreated = {", + " type: services.ServiceType.APPOINTMENT,", + " name: \"Cat Hugging Training\",", + " description: \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " tagLine: \"Get some purr therapy training with our cat hugging experts\",", + " defaultCapacity: 30,", + " payment: {", + " rateType: services.RateType.FIXED,", + " fixed: {", + " price: {", + " value: \"150\",", + " currency: \"USD\"", + " }", + " },", + " options: {", + " online: true,", + " inPerson: false,", + " deposit: false,", + " pricingPlan: false", + " },", + " },", + " onlineBooking: {", + " enabled: true", + " },", + " }", + "", + " const newName = \"Cat Hugging Training - Advanced\";", + " const createdService = await services.createService(serviceToBeCreated);", + " const updatedService = await services.updateService(createdService._id, {...createdService, name: newName});", + "", + " console.log('Success! Updated a service:', updatedService);", + "", + " return updatedService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 0,", + " \"name\": \"Cat Hugging Training - Advanced\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8bf39bc0-a05a-49ff-9ee3-fc29d698988d\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training-advanced\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"name\": \"cat-hugging-training-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:27 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training-advanced\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/cat-hugging-training-advanced\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/cat-hugging-training-advanced\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/cat-hugging-training-advanced\"", + " },", + " \"revision\": \"2\",", + " \"_id\": \"a262b133-e7a1-4498-a722-8340ed3f3db3\",", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:27 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" + ], + "extra": { + "description": "Update a service given the entire service, with the changes applied." + } + }, + { + "title": "Update a service with a partial update ", + "body": [ + "import { services } from 'wix-bookings.v2';", + "", + "/*", + " * Sample serviceId value: 'ff61204b-b19a-5cc8-823b-7eed8ae5fc28'", + " * Sample serviceName value: 'Cat Hugging Training - Advanced'", + " * Sample serviceRevision value: 1", + " */", + "async function updateServiceName(serviceId, serviceName, serviceRevision) {", + " const updatedService = await services.updateService(serviceId, {", + " id: serviceId, name: serviceName, revision: serviceRevision", + " });", + "", + " console.log('Success! Updated the service name:', updatedService, serviceName);", + "", + " return updatedService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 0,", + " \"name\": \"Cat Hugging Training - Advanced\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8bf39bc0-a05a-49ff-9ee3-fc29d698988d\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training-advanced\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"name\": \"cat-hugging-training-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:27 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training-advanced\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/cat-hugging-training-advanced\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/cat-hugging-training-advanced\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/cat-hugging-training-advanced\"", + " },", + " \"revision\": \"2\",", + " \"_id\": \"a262b133-e7a1-4498-a722-8340ed3f3db3\",", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:27 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" + ], + "extra": { + "description": "Update a service given only the fields that need to be updated. For example, update only the service name." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updateService", + "isAdminMethod": true } ], "messages": [ @@ -258,6 +2300,16 @@ ], "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." }, + { + "name": "formatted", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Full address of the location." + }, { "name": "postalCode", "optional": true, @@ -481,7 +2533,7 @@ } } ], - "doc": "A list of duration options for sessions, in minutes.\n\nThe availability calculation generates slots for sessions with these durations, unless there is a conflict with existing sessions or other availability constraints exist.\nRequired for services of type `APPOINTMENT` to allow the customer to book a session of the service. Not relevant for other service types.\n\n\nMin: 1 minute\n" + "doc": "A list of duration options for sessions, in minutes.\n\nThe availability calculation generates slots for sessions with these durations, unless there is a conflict with existing sessions or other availability constraints exist.\nRequired for services of type `APPOINTMENT` to allow the customer to book a session of the service. Not relevant for other service types.\n\n\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes\n" }, { "name": "timeBetweenSessions", @@ -934,6 +2986,17 @@ ], "doc": "Policy for rescheduling a booked entity." }, + { + "name": "resourcesPolicy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.ResourcesPolicy" + } + ], + "doc": "Policy for allocating resources." + }, { "name": "revision", "readOnly": true, @@ -976,6 +3039,26 @@ ], "doc": "The booking policy." }, + { + "name": "countOfServices", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of services associated with the booking policy." + }, + { + "name": "hasMoreServices", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more services associated with the booking policy." + }, { "name": "services", "optional": true, @@ -991,7 +3074,7 @@ } } ], - "doc": "The services associated with the booking policy." + "doc": "The services associated with the booking policy. Up to 5 services are returned per policy." } ], "docs": { @@ -1144,7 +3227,7 @@ "referenceType": "wix-bookings-v2.Services.ParticipantNotification" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`.\n" }, { "name": "preserveFutureSessionsWithParticipants", @@ -1154,7 +3237,7 @@ "nativeType": "boolean" } ], - "doc": "Whether to preserve future sessions with participants. Optional, default is false." + "doc": "" } ], "docs": { @@ -1190,7 +3273,7 @@ "referenceType": "wix-bookings-v2.Services.ParticipantNotification" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`.\n" }, { "name": "preserveFutureSessionsWithParticipants", @@ -1200,7 +3283,7 @@ "nativeType": "boolean" } ], - "doc": "Whether to preserve future sessions with participants. Optional, default is false." + "doc": "" } ], "docs": { @@ -1387,6 +3470,26 @@ ] } }, + { + "name": "BusinessLocation", + "members": [ + { + "name": "locationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the business location. Has to be non-empty" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "BusinessLocationOptions", "members": [ @@ -1677,27 +3780,7 @@ "nativeType": "string" } ], - "doc": "Category ID. Read-only." - }, - { - "name": "customProperties", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Custom properties that can be associated with the category." + "doc": "Category ID." }, { "name": "name", @@ -1717,7 +3800,7 @@ "nativeType": "number" } ], - "doc": "Sorting order of the category for Wix Bookings UI." + "doc": "Sort order of the category in the Dashboard." }, { "name": "status", @@ -1728,7 +3811,7 @@ "nativeType": "string" } ], - "doc": "Category status Read-only." + "doc": "Category status.\nSupported values:\n- \"CREATED\". The category is created.\n- \"DELETED\". The category is deleted.\nDefault: \"CREATED\"" } ], "docs": { @@ -2391,7 +4474,7 @@ "nativeType": "Object" } ], - "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`" }, { "name": "sort", @@ -2521,63 +4604,149 @@ "name": "DeleteServiceOptions", "members": [ { - "name": "participantNotification", + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message." + }, + { + "name": "preserveFutureSessionsWithParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteServiceRequest", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message." + }, + { + "name": "preserveFutureSessionsWithParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`\n" + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteServiceResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DiffmatokyPayload", + "members": [ + { + "name": "compareChannel", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "entityId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "" }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "errorInformation", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.ErrorInformation" } ], - "doc": "Whether to preserve future sessions with participants. Optional, default is false." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteServiceRequest", - "members": [ + "doc": "" + }, { - "name": "participantNotification", + "name": "left", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "" }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "right", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether to preserve future sessions with participants. Optional, default is false." + "doc": "" }, { - "name": "serviceId", + "name": "tags", + "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "ID of the service to delete." + "doc": "" } ], "docs": { @@ -2586,15 +4755,6 @@ ] } }, - { - "name": "DeleteServiceResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, { "name": "DisablePricingPlansForServiceOptions", "members": [ @@ -2660,7 +4820,18 @@ }, { "name": "DisablePricingPlansForServiceResponse", - "members": [], + "members": [ + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ], + "doc": "The service after the pricing plans update." + } + ], "docs": { "description": [ "" @@ -2749,7 +4920,7 @@ "nativeType": "string" } ], - "doc": "random GUID so clients can tell if event was already handled" + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { "name": "actionEvent", @@ -2809,7 +4980,7 @@ "nativeType": "string" } ], - "doc": "Assuming that all messages including Actions have id\nExample: The id of the specific order, the id of a specific campaign" + "doc": "ID of the entity associated with the event." }, { "name": "eventTime", @@ -2819,17 +4990,7 @@ "nativeType": "Date" } ], - "doc": "The time of the event. Useful if there was a delay in dispatching" - }, - { - "name": "extendedFieldsUpdatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.ExtendedFieldsUpdatedEvent" - } - ], - "doc": "" + "doc": "Event timestamp." }, { "name": "originatedFrom", @@ -2859,7 +5020,7 @@ "nativeType": "boolean" } ], - "doc": "A field that should be set if this event was triggered by an anonymize request.\nFor example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.\nNOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers." + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { "name": "updatedEvent", @@ -2880,7 +5041,6 @@ "actionEvent", "createdEvent", "deletedEvent", - "extendedFieldsUpdatedEvent", "updatedEvent" ] } @@ -2925,16 +5085,6 @@ ], "doc": "" }, - { - "name": "extendedFieldsUpdatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.ExtendedFieldsUpdatedEvent" - } - ], - "doc": "" - }, { "name": "updatedEvent", "optional": true, @@ -3014,7 +5164,17 @@ } } ], - "doc": "IDs of the pricing plans connect to the service." + "doc": "IDs of the pricing plans connected to the service." + }, + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ], + "doc": "The service after the pricing plans update." } ], "docs": { @@ -3045,7 +5205,18 @@ }, { "name": "EntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -3082,27 +5253,17 @@ } }, { - "name": "ExtendedFields", + "name": "ErrorInformation", "members": [ { - "name": "namespaces", + "name": "stackTrace", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "Object" - } - ] - } + "nativeType": "string" } ], - "doc": "Data Extensions extended fields\nKey: Namespace\nValue: extended fields data in Struct format" + "doc": "" } ], "docs": { @@ -3112,17 +5273,27 @@ } }, { - "name": "ExtendedFieldsUpdatedEvent", + "name": "ExtendedFields", "members": [ { - "name": "currentEntityAsJson", + "name": "namespaces", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "Object" + } + ] + } } ], - "doc": "" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -3271,6 +5442,54 @@ ] } }, + { + "name": "GetServiceAvailabilityConstraintsRequest", + "members": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetServiceAvailabilityConstraintsResponse", + "members": [ + { + "name": "constraints", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.ServiceAvailabilityConstraints" + } + ], + "doc": "The retrieved availability constraints of the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetServiceOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, { "name": "GetServiceRequest", "members": [ @@ -3310,6 +5529,103 @@ ] } }, + { + "name": "HtmlSitePublished", + "members": [ + { + "name": "appInstanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Application instance ID" + }, + { + "name": "appType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Application type" + }, + { + "name": "branchId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "optional branch id if publish is done from branch" + }, + { + "name": "lastTransactionId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The site's last transactionId" + }, + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "MSID" + }, + { + "name": "pages", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Page" + } + ] + } + } + ], + "doc": "A list of the site's pages" + }, + { + "name": "publishDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site's publish date" + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Interval", "members": [ @@ -3803,6 +6119,26 @@ ], "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." }, + { + "name": "formatted", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Full address of the location." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.LocationsAddressLocation" + } + ], + "doc": "Geographic coordinates of location." + }, { "name": "postalCode", "optional": true, @@ -3964,7 +6300,24 @@ "nativeType": "string" } ], - "doc": "Location type. **Note:** Currently not supported." + "doc": "Location type.\n\n**Note:** Currently not supported.\n" + }, + { + "name": "locationTypes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Location types." }, { "name": "name", @@ -4066,23 +6419,6 @@ { "name": "MaskedService", "members": [ - { - "name": "mask", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Explicit list of fields to update." - }, { "name": "service", "optional": true, @@ -4314,6 +6650,15 @@ ] } }, + { + "name": "MultiServiceEnabledNotification", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, { "name": "MultipleSessionsCreated", "members": [ @@ -4381,6 +6726,26 @@ ] } }, + { + "name": "Page", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Page's Id" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Paging", "members": [ @@ -4583,7 +6948,7 @@ "nativeType": "boolean" } ], - "doc": "Whether to send the message about the changes to the customer. `false` by default" + "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" } ], "docs": { @@ -4595,16 +6960,6 @@ { "name": "ParticipantsPolicy", "members": [ - { - "name": "enabled", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the maximum number of participants applies. When `false`, there is\nno maximum.\n\nDefault: `false`\n" - }, { "name": "maxParticipantsPerBooking", "optional": true, @@ -4673,24 +7028,6 @@ ], "doc": "IDs of pricing plans that can be used as payment for the service." }, - { - "name": "pricingPlansIds", - "readOnly": true, - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "IDs of pricing plans that can be used as payment for the service." - }, { "name": "rateType", "optional": true, @@ -4946,6 +7283,15 @@ ] } }, + { + "name": "QueryServicesOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, { "name": "QueryServicesRequest", "members": [ @@ -5013,7 +7359,7 @@ "nativeType": "Object" } ], - "doc": "Filter object in the following format:\n\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\n\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n\nRead more about [supported fields and operators](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting).\n" + "doc": "Filter object in the following format:\n\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\n\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`\n\nRead more about [supported fields and operators](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting).\n" }, { "name": "paging", @@ -5320,7 +7666,7 @@ "nativeType": "string" } ], - "doc": "The action to perform on sessions currently set to a removed location." + "doc": "The action to perform on sessions currently set to a removed location. For example, move existing sessions to a new specified location." }, { "name": "moveToLocationOptions", @@ -5571,6 +7917,84 @@ ] } }, + { + "name": "ResourceGroup", + "members": [ + { + "name": "requiredResourcesNumber", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "How many resources of the group / resource ids are required in order to book the service.\nDefaults to 1." + }, + { + "name": "resourceGroupId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An optional resource group id, if provided it references a resource group in the resource groups API.\nTODO - referenced_entity annotation" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.ResourceIds" + } + ], + "doc": "Resource ids, each referencing a resource in resources API. may be a subset of resources within a resource group.\nTODO - referenced_entity annotation" + }, + { + "name": "selectableResource", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If set to `true`, the custom can select the specific resources while booking the service.\nIf set to `false`, the resources required for to book the service would be auto selected at the time of the booking.\nDefaults to false." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ResourceIds", + "members": [ + { + "name": "values", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Values of the resource ids. TODO - referenced_entity annotation" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ResourceNotification", "members": [ @@ -5601,6 +8025,67 @@ ] } }, + { + "name": "ResourceType", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the resource." + }, + { + "name": "name", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the resource type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ResourcesPolicy", + "members": [ + { + "name": "autoAssignAllowed", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "`true`, if it is allowed to automatically assign a resource when booking an appointment,\n`false`, if the client must always select a resource.\n\nDefault: `false`\n" + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "`true` if this policy is enabled, `false` otherwise.\nWhen `false` then the client must always select a resource when booking an appointment." + } + ], + "docs": { + "description": [ + "The policy regarding the allocation of resources (e.g. staff members)." + ] + } + }, { "name": "Schedule", "members": [ @@ -5725,26 +8210,6 @@ ], "doc": "" }, - { - "name": "migrationEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.MigrationEvent" - } - ], - "doc": "supported only for schedule migration apis." - }, - { - "name": "multipleSessionsCreated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.MultipleSessionsCreated" - } - ], - "doc": "supported only for schedule migration apis." - }, { "name": "notifyParticipants", "optional": true, @@ -5901,30 +8366,10 @@ "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.IntervalSplit" - } - ], - "doc": "" - }, - { - "name": "migrationEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.MigrationEvent" - } - ], - "doc": "supported only for schedule migration apis." - }, - { - "name": "multipleSessionsCreated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.MultipleSessionsCreated" + "referenceType": "wix-bookings-v2.Services.IntervalSplit" } ], - "doc": "supported only for schedule migration apis." + "doc": "" }, { "name": "recurringSessionSplit", @@ -6150,6 +8595,92 @@ ] } }, + { + "name": "SearchServicesOptions", + "members": [ + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Paging" + } + ], + "doc": "Pagination, including offset, and limit." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SearchServicesRequest", + "members": [ + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Paging" + } + ], + "doc": "Pagination, including offset, and limit." + }, + { + "name": "query", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The search term used to match services." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SearchServicesResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.PagingMetadataV2" + } + ], + "doc": "Paging metadata, including offset and count." + }, + { + "name": "services", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ] + } + } + ], + "doc": "The retrieved services." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "SeoSchema", "members": [ @@ -6273,6 +8804,17 @@ ], "doc": "Service description, such as `High-class hair styling, cuts, straightening and color.`" }, + { + "name": "extendedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.ExtendedFields" + } + ], + "doc": "Extensions enabling users to save custom data related to the service." + }, { "name": "form", "optional": true, @@ -6295,7 +8837,6 @@ }, { "name": "locations", - "readOnly": true, "optional": true, "type": [ { @@ -6309,7 +8850,7 @@ } } ], - "doc": "The locations this service is offered at.\nOnly multiple locations of type `BUSINESS` are supported. multiple locations of type `CUSTOM` or `CUSTOMER` are not supported.\nFor courses only: Currently, only 1 location is supported, for all location types.\nUse `setServiceLocations` method to change the locations this service is offered at." + "doc": "The locations this service is offered at.\nIn case of multiple (more than 1) location, All locations must be of type `BUSINESS`.\nFor courses only: Currently, only 1 location is supported, for all location types." }, { "name": "mainSlug", @@ -6353,25 +8894,189 @@ "doc": "Online booking settings." }, { - "name": "payment", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.Payment" - } - ], - "doc": "Payment options for booking the service." - }, - { - "name": "revision", + "name": "payment", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Payment" + } + ], + "doc": "Payment options for booking the service." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the service is updated. To prevent conflicting changes, the existing revision must be used when updating a service." + }, + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Schedule" + } + ], + "doc": "The service's schedule, which can be used to manage the service's sessions." + }, + { + "name": "seoData", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.SeoSchema" + } + ], + "doc": "Custom SEO data for the service." + }, + { + "name": "sortOrder", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Order of a service within a category." + }, + { + "name": "staffMemberIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the staff members providing the service. For appointments only." + }, + { + "name": "supportedSlugs", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Slug" + } + ] + } + } + ], + "doc": "A slug is the last part of the URL address that serves as a unique identifier of the service.\nThe list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner." + }, + { + "name": "tagLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Short service description, such as `Hair styling.`" + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service type.\n\nSupported Values:\n- \"APPOINTMENT\"\n- \"CLASS\"\n- \"COURSE\"\n\n" + }, + { + "name": "urls", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.URLs" + } + ], + "doc": "URLs to various service-related pages, such as the calendar page and the booking page." + } + ], + "docs": { + "description": [ + "The `Service` object represents the business offering that a business provides to its customers." + ] + } + }, + { + "name": "ServiceAvailabilityConstraints", + "members": [ + { + "name": "bookingPolicy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.BookingPolicy" + } + ], + "doc": "The booking policy." + }, + { + "name": "locations", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Location" + } + ] + } + } + ], + "doc": "The locations this service is offered at.\nOnly multiple locations of type `BUSINESS` are supported. multiple locations of type `CUSTOM` or `CUSTOMER` are not supported.\nFor courses only: Currently, only 1 location is supported, for all location types.\nUse `setServiceLocations` method to change the locations this service is offered at." + }, + { + "name": "onlineBooking", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.OnlineBooking" + } + ], + "doc": "Online booking settings." + }, + { + "name": "resourceGroups", "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.ResourceGroup" + } + ] + } } ], - "doc": "Revision number, which increments by 1 each time the service is updated. To prevent conflicting changes, the existing revision must be used when updating a service." + "doc": "" }, { "name": "schedule", @@ -6382,116 +9087,132 @@ "referenceType": "wix-bookings-v2.Services.Schedule" } ], - "doc": "The service's schedule, which can be used to manage the service's sessions." + "doc": "The service schedule, including the schedule id and availability constraints." }, { - "name": "seoData", + "name": "serviceResources", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.SeoSchema" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.ServiceResource" + } + ] + } } ], - "doc": "Custom SEO data for the service." + "doc": "Resource groups required to book the service" }, { - "name": "sortOrder", + "name": "slotsSplitInterval", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.V1SplitInterval" } ], - "doc": "Order of a service within a category." - }, + "doc": "The time between available slots' start times.\nFor example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc.\nIs applied to all schedules of the site.\nFor appointment only." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ServiceResource", + "members": [ { - "name": "staffMemberIds", + "name": "_id", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "IDs of the staff members providing the service. For appointments only." + "doc": "The unique identifier for the service resource, if not provided, would default to the resource type id." }, { - "name": "staffMembersIds", - "readOnly": true, + "name": "requiredResourcesNumber", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "number" } ], - "doc": "IDs of the staff members providing the service. For appointments only." + "doc": "How many resources of the are required in order to book the service.\nDefaults to 1." }, { - "name": "supportedSlugs", - "readOnly": true, + "name": "resourceIds", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Slug" - } - ] - } + "referenceType": "wix-bookings-v2.Services.ResourceIds" } ], - "doc": "A slug is the last part of the URL address that serves as a unique identifier of the service.\nThe list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner." + "doc": "Resource ids, each referencing a resource in resources API. Must be a subset of resources within the selected resource type." }, { - "name": "tagLine", + "name": "resourceType", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.ResourceType" } ], - "doc": "Short service description, such as `Hair styling.`" + "doc": "" }, { - "name": "type", + "name": "selectableResource", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Service type." - }, + "doc": "If set to `true`, the customer can select the specific resources while booking the service.\nIf set to `false`, the resources required for to book the service would be auto selected at the time of the booking.\nDefaults to false." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfServiceResourceSelectionOneOf", + "members": [ + "resourceIds" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ServiceResourceSelectionOneOf", + "members": [ { - "name": "urls", - "readOnly": true, + "name": "resourceIds", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.URLs" + "referenceType": "wix-bookings-v2.Services.ResourceIds" } ], - "doc": "URLs to various service-related pages, such as the calendar page and the booking page." + "doc": "Resource ids, each referencing a resource in resources API. Must be a subset of resources within the selected resource type." } ], "docs": { "description": [ - "The `Service` object represents the business offering that a business provides to its customers." + "" ] } }, @@ -6534,7 +9255,7 @@ "referenceType": "wix-bookings-v2.Services.CalendarConference" } ], - "doc": "A conference created for the session according to the details set in the schedule's conference provider information.\nIf the session is a recurring session, this field is inherited from the schedule." + "doc": "A conference created for the session according to the details set in the schedule's conference provider information.\nIf the session is a recurring session, this field is inherited from the schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." }, { "name": "capacity", @@ -6564,7 +9285,7 @@ "referenceType": "wix-bookings-v2.Services.ExternalCalendarOverrides" } ], - "doc": "Title and description values to override session defaults when syncing to an external calendar.\nLearn more about [syncing calendars](https://support.wix.com/en/article/wix-bookings-important-information-about-syncing-google-calendars-with-wix-bookings).\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "__Deprecated.__" }, { "name": "inheritedFields", @@ -6640,7 +9361,7 @@ } } ], - "doc": "List of participants booked for the session.\nThe list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.\nIf the session is a recurring session, this field must be empty." + "doc": "*Partial list** list of participants booked for the session.\nThe list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.\nIf the session is a recurring session, this field must be empty.\nTo retrieve the full list of session participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." }, { "name": "rate", @@ -6650,7 +9371,7 @@ "referenceType": "wix-bookings-v2.Services.Rate" } ], - "doc": "The price options offered for the session. Defaults to the schedule rate.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." }, { "name": "recurrence", @@ -6741,7 +9462,7 @@ } } ], - "doc": "Tags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "__Deprecated.__\nTags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." }, { "name": "timeReservedAfter", @@ -7001,7 +9722,7 @@ "referenceType": "wix-bookings-v2.Services.ParticipantNotification" } ], - "doc": "Whether to notify participants about the change, and an optional custom message." + "doc": "Whether to notify participants about the change of location, and an optional custom message." }, { "name": "removedLocationSessionsAction", @@ -7011,7 +9732,7 @@ "referenceType": "wix-bookings-v2.Services.RemovedLocationSessionsAction" } ], - "doc": "The action to perform on sessions currently set to a removed location." + "doc": "The action to perform on sessions currently set to a removed location. For example, move existing sessions to a new specified location." } ], "docs": { @@ -7047,7 +9768,7 @@ "referenceType": "wix-bookings-v2.Services.ParticipantNotification" } ], - "doc": "Whether to notify participants about the change, and an optional custom message." + "doc": "Whether to notify participants about the change of location, and an optional custom message." }, { "name": "removedLocationSessionsAction", @@ -7057,7 +9778,7 @@ "referenceType": "wix-bookings-v2.Services.RemovedLocationSessionsAction" } ], - "doc": "The action to perform on sessions currently set to a removed location." + "doc": "The action to perform on sessions currently set to a removed location. For example, move existing sessions to a new specified location." }, { "name": "serviceId", @@ -7344,6 +10065,37 @@ ] } }, + { + "name": "StaffMember", + "members": [ + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the staff member" + }, + { + "name": "staffMemberId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the staff member providing the service, can be used to retrieve resource information using wix-bookings-backend resources API." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "StreetAddress", "members": [ @@ -7663,6 +10415,17 @@ ], "doc": "Service description, such as `High-class hair styling, cuts, straightening and color.`" }, + { + "name": "extendedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.ExtendedFields" + } + ], + "doc": "Extensions enabling users to save custom data related to the service." + }, { "name": "form", "optional": true, @@ -7685,7 +10448,6 @@ }, { "name": "locations", - "readOnly": true, "optional": true, "type": [ { @@ -7699,7 +10461,7 @@ } } ], - "doc": "The locations this service is offered at.\nOnly multiple locations of type `BUSINESS` are supported. multiple locations of type `CUSTOM` or `CUSTOMER` are not supported.\nFor courses only: Currently, only 1 location is supported, for all location types.\nUse `setServiceLocations` method to change the locations this service is offered at." + "doc": "The locations this service is offered at.\nIn case of multiple (more than 1) location, All locations must be of type `BUSINESS`.\nFor courses only: Currently, only 1 location is supported, for all location types." }, { "name": "mainSlug", @@ -7765,7 +10527,6 @@ }, { "name": "schedule", - "readOnly": true, "optional": true, "type": [ { @@ -7811,24 +10572,6 @@ ], "doc": "IDs of the staff members providing the service. For appointments only." }, - { - "name": "staffMembersIds", - "readOnly": true, - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "IDs of the staff members providing the service. For appointments only." - }, { "name": "supportedSlugs", "readOnly": true, @@ -7865,7 +10608,7 @@ "nativeType": "string" } ], - "doc": "Service type." + "doc": "Service type.\n\nSupported Values:\n- \"APPOINTMENT\"\n- \"CLASS\"\n- \"COURSE\"\n\n" }, { "name": "urls", @@ -7933,6 +10676,56 @@ ] } }, + { + "name": "UserDomainInfoChangedEvent", + "members": [ + { + "name": "changeTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "" + }, + { + "name": "crudType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'CREATE'`\n- `'CREATE_OR_UPDATE'`\n- `'DELETE'`\n- `'INVALID_CRUD_TYPE'`\n- `'UPDATE'`" + }, + { + "name": "domainName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "V1AvailabilityConstraints", "members": [ @@ -8004,16 +10797,6 @@ ], "doc": "Free text address used when locationType is `OWNER_CUSTOM`." }, - { - "name": "businessLocation", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.LocationsLocation" - } - ], - "doc": "Valid when `locationType` is `OWNER_BUSINESS`. Defaults to the business's location.\n\n`businessSchedule` is not supported by Wix Bookings\n" - }, { "name": "customAddress", "optional": true, @@ -8092,7 +10875,7 @@ "referenceType": "wix-bookings-v2.Services.Availability" } ], - "doc": "An object describing how to calculate the schedule's availability.\nAn empty object indicates that the schedule is not available for booking." + "doc": "__Deprecated.__" }, { "name": "calendarConference", @@ -8102,7 +10885,7 @@ "referenceType": "wix-bookings-v2.Services.CalendarConference" } ], - "doc": "A conference created for the schedule. This is used when a participant is added to a schedule." + "doc": "A conference created for the schedule. This is used when a participant is added to a schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." }, { "name": "capacity", @@ -8122,7 +10905,7 @@ "referenceType": "wix-bookings-v2.Services.ConferenceProvider" } ], - "doc": "Conferencing Provider. A schedule with a conferencing provider will use to provider information to create a conference on the provider's system when a session is created on the schedule or on one of its linked schedule's." + "doc": "__Deprecated.__" }, { "name": "created", @@ -8143,7 +10926,7 @@ "referenceType": "wix-bookings-v2.Services.ExternalCalendarOverrides" } ], - "doc": "Title and description values to override session defaults when syncing to an external calendar.\nLearn more about [syncing calendars](https://support.wix.com/en/article/wix-bookings-important-information-about-syncing-google-calendars-with-wix-bookings)." + "doc": "__Deprecated.__" }, { "name": "inheritedFields", @@ -8178,7 +10961,7 @@ } } ], - "doc": "Specifies the intervals for the sessions calculation. Optional. e.g. when creating class service you can add\npattern for recurring intervals, these intervals can be returned as schedule's sessions or available slots if\nthere are no other availability calculation constraints and the capacity is bigger then the current total number of sessions' participants." + "doc": "Deprecated. Please use the [Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/session) instead." }, { "name": "location", @@ -8206,7 +10989,7 @@ } } ], - "doc": "Participants currently registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule." + "doc": "*Partial list** of participants which are registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule.\nTo retrieve the full list of schedule participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." }, { "name": "rate", @@ -8216,7 +10999,7 @@ "referenceType": "wix-bookings-v2.Services.Rate" } ], - "doc": "Price options offered when booking this schedule's slots. Default is no rate." + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." }, { "name": "scheduleOwnerId", @@ -8254,17 +11037,18 @@ } } ], - "doc": "Tags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." + "doc": "__Deprecated.__\nTags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." }, { "name": "timeZone", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Schedule's time zone in [Area/Location](https://en.wikipedia.org/wiki/Tz_database) format. Read-only.\nDerived from the Wix Business time zone." }, { "name": "title", @@ -8316,6 +11100,36 @@ ] } }, + { + "name": "V1SplitInterval", + "members": [ + { + "name": "sameAsDuration", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slot duration is used as the split interval value.\nIf `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in\n`schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field." + }, + { + "name": "valueInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of minutes between available slots' start times when `same_as_duration` is `false`." + } + ], + "docs": { + "description": [ + "The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc." + ] + } + }, { "name": "V2Category", "members": [ diff --git a/wix-crm-backend/wix-crm-backend.service.json b/wix-crm-backend/wix-crm-backend.service.json index 1e3f77d97e..9427fee194 100644 --- a/wix-crm-backend/wix-crm-backend.service.json +++ b/wix-crm-backend/wix-crm-backend.service.json @@ -107,7 +107,7 @@ "set": false, "type": "wix-crm-backend.Workflows", "locations": - [ { "lineno": 54, + [ { "lineno": 59, "filename": "workflows.js" } ], "docs": { "summary": "The Workflows API is used to manage your site's\n[workflows](https://support.wix.com/en/article/about-workflows).", diff --git a/wix-crm-backend/wix-crm-backend/Contacts.service.json b/wix-crm-backend/wix-crm-backend/Contacts.service.json index 9dca471f16..c53bde67e4 100644 --- a/wix-crm-backend/wix-crm-backend/Contacts.service.json +++ b/wix-crm-backend/wix-crm-backend/Contacts.service.json @@ -1,8 +1,7 @@ { "name": "Contacts", "memberOf": "wix-crm-backend", "mixes": [], - "labels": - [ "changed" ], + "labels": [], "location": { "lineno": 5, "filename": "index.js" }, @@ -100,7 +99,7 @@ [ { "lineno": 22, "filename": "appendOrCreateContact.js" } ], "docs": - { "summary": "Appends an existing contact or creates a contact if it doesn't exist.", + { "summary": "Appends `contactInfo` to an existing contact or creates a new contact if it doesn't already exist.", "description": [ "The `appendOrCreateContact()` function returns a Promise", "that resolves to a contact ID and identity type when a contact is found or created.", @@ -110,9 +109,9 @@ "[data is handled](wix-crm-backend/contacts/appendorcreatecontact#how-the-data-is-handled):", "", "1. **If the current visitor is a logged-in member:** `appendOrCreateContact()` reconciles with the member's associated contact.", - "2. **If the visitor is not a logged-in member:** `appendOrCreateContact()` tries to reconcile any specified email addresses and/or phone numbers with an existing contact.", - "3. **If no contact can be reconciled in the previous steps:** `appendOrCreateContact()` tries to reconcile the visitor's session identity with an existing contact.", - "4. **If no contact can be reconciled and an email address, phone number, or name are provided:** A new contact is created and `appendOrCreateContact()` reconciles with the new contact.", + "2. **If the current visitor is not a logged-in member:** `appendOrCreateContact()` tries to reconcile any specified email addresses and/or phone numbers with an existing contact.", + "3. **If an email address, phone number, and/or name has been provided, but the contact can't be reconciled:** A new contact is created and `appendOrCreateContact()` reconciles with the new contact.", + "4. **If a contact can't be reconciled by email or phone and a new contact isn't created:** `appendOrCreateContact()` tries to reconcile the visitor's session identity with an existing contact.", "5. **If no contact can be created:** The Promise is rejected.", "", "`appendOrCreateContact()` does not require member authentication,", @@ -120,7 +119,7 @@ "The contact's data can be retrieved with", "[`getContact()`](wix-crm-backend/contacts/getcontact).", "", - "#### How the Data Is Handled", + "#### How the Data is Handled", "", "If an **existing contact** is found:", "", @@ -594,8 +593,7 @@ "extra": { } }, { "name": "deleteExtendedField", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "key", @@ -1358,8 +1356,7 @@ "extra": { } }, { "name": "getExtendedField", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "key", @@ -2980,8 +2977,7 @@ "extra": { } }, { "name": "renameExtendedField", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "key", @@ -3795,8 +3791,7 @@ "optional": true } ], "extra": { }, - "labels": - [ "changed" ] }, + "labels": [] }, { "name": "ContactPicture", "locations": [ { "lineno": 345, @@ -3904,8 +3899,7 @@ "doc": "Field description, if the field is a system field." } ], "extra": { }, - "labels": - [ "changed" ] }, + "labels": [] }, { "name": "ExtendedFieldInfo", "locations": [ { "lineno": 1, @@ -4080,8 +4074,7 @@ "optional": true } ], "extra": { }, - "labels": - [ "changed" ] }, + "labels": [] }, { "name": "Label", "locations": [ { "lineno": 544, diff --git a/wix-crm-backend/wix-crm-backend/Workflows.service.json b/wix-crm-backend/wix-crm-backend/Workflows.service.json index 8b0120b922..cfbaade819 100644 --- a/wix-crm-backend/wix-crm-backend/Workflows.service.json +++ b/wix-crm-backend/wix-crm-backend/Workflows.service.json @@ -1,15 +1,18 @@ { "name": "Workflows", "memberOf": "wix-crm-backend", "mixes": [], - "labels": [], + "labels": + [ "changed" ], "location": { "lineno": 1, "filename": "workflows.js" }, "docs": - { "summary": "**Deprecated.**\nThe Workflows module will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThe Workflows product and APIs are being discontinued and will stop working \non June 30, 2024. There will not be a direct replacement for this API. \nHowever, our team is working to provide alternatives. We understand that this \nchange may pose challenges, and we appreciate your patience and understanding.", "description": - [ "> **Note:** The Workflows module is deprecated. If you're already using this module in your code, it will continue to work until June 30, 2024.", - "", + [ "> **Note:** The Workflows API is being discontinued. If you're already using this module in ", + "your code, it will continue to work until June 30, 2024. There will not be a direct replacement ", + "for this API. However, our team is working to provide alternatives. We understand that this ", + "change may pose challenges, and we appreciate your patience and understanding.", "", "The Workflows API is used to manage your site's", "[workflows](https://support.wix.com/en/article/about-workflows).", @@ -51,7 +54,7 @@ " To use the Workflows API, import `workflows` from the `wix-crm-backend` module:", "", " ```javascript", - " import {workflows} from 'wix-crm-backend';", + " import { workflows } from 'wix-crm-backend';", " ```" ], "links": [], "examples": [], @@ -60,7 +63,8 @@ "properties": [], "operations": [ { "name": "archiveCard", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "cardId", @@ -73,10 +77,10 @@ [ "void" ] }, "doc": "Fulfilled - When the card has been archived." }, "locations": - [ { "lineno": 122, + [ { "lineno": 132, "filename": "cards.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Archives a workflow card.", "", @@ -103,7 +107,8 @@ "extra": { } }, { "name": "createCard", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "workflowId", @@ -129,7 +134,7 @@ [ { "lineno": 1, "filename": "cards.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Creates a new workflow card.", "", @@ -175,7 +180,8 @@ "extra": { } }, { "name": "createPhase", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "workflowId", @@ -198,7 +204,7 @@ [ { "lineno": 1, "filename": "phases.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Creates a new workflow phase.", "", @@ -236,7 +242,8 @@ "extra": { } }, { "name": "createWorkflow", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "workflowInfo", @@ -249,10 +256,10 @@ [ "string" ] }, "doc": "Fulfilled - ID of the newly created workflow." }, "locations": - [ { "lineno": 183, + [ { "lineno": 196, "filename": "workflows.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Creates a new workflow.", "", @@ -282,7 +289,8 @@ "extra": { } }, { "name": "deleteCard", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "cardId", @@ -295,10 +303,10 @@ [ "void" ] }, "doc": "Fulfilled - When the card has been deleted." }, "locations": - [ { "lineno": 34, + [ { "lineno": 36, "filename": "cards.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Deletes a workflow card by ID.", "", @@ -325,7 +333,8 @@ "extra": { } }, { "name": "deletePhase", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "phaseId", @@ -338,10 +347,10 @@ [ "void" ] }, "doc": "" }, "locations": - [ { "lineno": 27, + [ { "lineno": 29, "filename": "phases.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Deletes a workflow phase.", "", @@ -368,7 +377,8 @@ "extra": { } }, { "name": "deleteWorkflow", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "workflowId", @@ -381,10 +391,10 @@ [ "void" ] }, "doc": "" }, "locations": - [ { "lineno": 163, + [ { "lineno": 174, "filename": "workflows.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Deletes a workflow.", "", @@ -411,7 +421,8 @@ "extra": { } }, { "name": "getCard", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "cardId", @@ -424,10 +435,10 @@ [ "wix-crm-backend.Workflows.Card" ] }, "doc": "Fulfilled - Retrieved card." }, "locations": - [ { "lineno": 54, + [ { "lineno": 58, "filename": "cards.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Retrieves a workflow card by ID.", "", @@ -463,7 +474,8 @@ "extra": { } }, { "name": "getPhaseInfo", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "phaseId", @@ -476,10 +488,10 @@ [ "wix-crm-backend.Workflows.Phase" ] }, "doc": "Fulfilled - Retrieved phase." }, "locations": - [ { "lineno": 47, + [ { "lineno": 51, "filename": "phases.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Retrieves a phase by ID.", "", @@ -510,7 +522,8 @@ "extra": { } }, { "name": "getWorkflowInfo", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "workflowId", @@ -523,10 +536,10 @@ [ "wix-crm-backend.Workflows.Workflow" ] }, "doc": "Fulfilled - Retrieved workflow." }, "locations": - [ { "lineno": 97, + [ { "lineno": 102, "filename": "workflows.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Retrieves a workflow by ID.", "", @@ -561,7 +574,8 @@ "extra": { } }, { "name": "listCards", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "workflowId", @@ -577,10 +591,10 @@ [ "wix-crm-backend.Workflows.CardList" ] }, "doc": "Fulfilled - List of retrieved cards." }, "locations": - [ { "lineno": 169, + [ { "lineno": 183, "filename": "cards.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Retrieves a list of a workflow's cards.", "", @@ -652,7 +666,8 @@ "extra": { } }, { "name": "listPhasesInfo", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "workflowId", @@ -669,10 +684,10 @@ [ "wix-crm-backend.Workflows.PhaseList" ] }, "doc": "Fulfilled - List of retrieved phases." }, "locations": - [ { "lineno": 116, + [ { "lineno": 126, "filename": "phases.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Retrieves a list of a workflow's phases.", "", @@ -732,7 +747,8 @@ "extra": { } }, { "name": "listWorkflowsInfo", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "options", @@ -746,10 +762,10 @@ [ "wix-crm-backend.Workflows.WorkflowList" ] }, "doc": "Fulfilled - List of retrieved workflows." }, "locations": - [ { "lineno": 141, + [ { "lineno": 150, "filename": "workflows.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Retrieves a list of the site's workflows info.", "", @@ -810,7 +826,8 @@ "extra": { } }, { "name": "moveCard", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "cardId", @@ -826,10 +843,10 @@ [ "void" ] }, "doc": "Fulfilled - When the card has moved." }, "locations": - [ { "lineno": 74, + [ { "lineno": 80, "filename": "cards.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Moves a card to a new position within a workflow.", "", @@ -865,7 +882,8 @@ "extra": { } }, { "name": "movePhase", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "phaseId", @@ -881,10 +899,10 @@ [ "void" ] }, "doc": "Fulfilled - When the phase has moved." }, "locations": - [ { "lineno": 67, + [ { "lineno": 73, "filename": "phases.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Moves a phase to a new position with a workflow.", "", @@ -921,7 +939,8 @@ "extra": { } }, { "name": "restoreCard", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "cardId", @@ -937,10 +956,10 @@ [ "void" ] }, "doc": "Fulfilled - When the card has been restored." }, "locations": - [ { "lineno": 142, + [ { "lineno": 154, "filename": "cards.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Restores an archived workflow card.", "", @@ -979,7 +998,8 @@ "extra": { } }, { "name": "updateCardFields", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "cardId", @@ -995,10 +1015,10 @@ [ "void" ] }, "doc": "Fulfilled - When the card has been updated." }, "locations": - [ { "lineno": 99, + [ { "lineno": 107, "filename": "cards.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Updates an existing workflow card.", "", @@ -1033,7 +1053,8 @@ "extra": { } }, { "name": "updatePhaseFields", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "phaseId", @@ -1049,10 +1070,10 @@ [ "void" ] }, "doc": "Fulfilled - When the phase has been updated." }, "locations": - [ { "lineno": 92, + [ { "lineno": 100, "filename": "phases.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Updates an existing workflow phase.", "", @@ -1087,7 +1108,8 @@ "extra": { } }, { "name": "updateWorkflowFields", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "workflowId", @@ -1103,10 +1125,10 @@ [ "void" ] }, "doc": "Fulfilled - When the workflow has been updated." }, "locations": - [ { "lineno": 117, + [ { "lineno": 124, "filename": "workflows.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024.", + { "summary": "**Deprecated.**\nThis function is being discontinued and will stop working after June 30, 2024.\nAlthough there will not be a direct replacement for this function, we are working \nto provide alternative solutions.", "description": [ "Updates an existing workflow.", "", diff --git a/wix-crm-v2/wix-crm-v2.service.json b/wix-crm-v2/wix-crm-v2.service.json index af1e0ba09a..7dbe1c9605 100644 --- a/wix-crm-v2/wix-crm-v2.service.json +++ b/wix-crm-v2/wix-crm-v2.service.json @@ -52,6 +52,21 @@ "extra": {} }, "hidden": true + }, + { + "name": "tasks", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true } ], "operations": [], diff --git a/wix-crm-v2/wix-crm-v2/Contacts.service.json b/wix-crm-v2/wix-crm-v2/Contacts.service.json index 094656b874..e427545c67 100644 --- a/wix-crm-v2/wix-crm-v2/Contacts.service.json +++ b/wix-crm-v2/wix-crm-v2/Contacts.service.json @@ -54,26 +54,348 @@ "docs": { "summary": "Creates a new contact.", "description": [ - "The `createContact()` function returns a Promise\nthat resolves to the new contact when it is created.\n\nThe `info` parameter object must include a name, phone number, or email address.\n If all 3 of these parameters are missing,\n the contact won't be created.\n\n\n By default,\n if the call contains an email already in use by another contact,\n the new contact won't be created.\n To override this behavior,\n set `allowDuplicates` in the `options` object to `true`." + "The `createContact()` function returns a Promise\nthat resolves to the new contact when it is created.\n\nThe `info` parameter object must include a name, phone number, or email address.\n If all 3 of these parameters are missing,\n the contact won't be created.\n\nBy default, if the call contains an email already in use by another contact, the new contact won't be created. To override this behavior, set `allowDuplicates` in the `options` object to `true`.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can run this function." ], "examples": [ { - "title": "createContact example", + "title": "Create a new contact using a name and email (dashboard page code)", "body": [ "import { contacts } from 'wix-crm.v2';", + "", + "/* Sample contact info value:", + " * {", + " * name: {", + " * first: 'John',", + " * last: 'Doe'", + " * },", + " * emails: {", + " * items: [", + " * {", + " * email: 'johndoe1@example.com',", + " * }", + " * ]", + " * }", + " * }", + " */", + "", + "export async function myCreateContactFunction(info) {", + " ", + " try {", + " const newContact = await contacts.createContact(info); ", + " console.log('Successfully created a new contact:', newContact);", + " ", + " return newContact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"revision\": 1,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * }", + " * ]", + " * },", + " * \"phones\": {},", + " * \"addresses\": {},", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-24T12:50:46.047Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Create a new contact using a name and email (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { contacts } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample contact info value:", + " * {", + " * name: {", + " * first: 'John',", + " * last: 'Doe'", + " * },", + " * emails: {", + " * items: [", + " * {", + " * email: 'johndoe1@example.com',", + " * }", + " * ]", + " * }", + " * }", + " */", + "", + "export const myCreateContactFunction = webMethod(Permissions.Anyone, async (info) => {", + " ", + " try {", + " const elevatedCreateContact = elevate(contacts.createContact);", + " const newContact = await elevatedCreateContact(info); ", + " console.log('Successfully created a new contact:', newContact);", + " ", + " return newContact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"revision\": 1,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * }", + " * ]", + " * },", + " * \"phones\": {},", + " * \"addresses\": {},", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-24T12:50:46.047Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Create a new contact, full object with options ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { contacts } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample info value:", + " * {", + " * name: {", + " * first: 'John',", + " * last: 'Doe'", + " * },", + " * emails: {", + " * items: [", + " * {", + " * tag: 'UNTAGGED',", + " * email: 'johndoe1@example.com',", + " * _id: '37db3bde-83c0-4ca2-8097-88964a2f343b'", + " * }", + " * ]", + " * },", + " * company: 'Wix',", + " * jobTitle: 'Writer',", + " * phones: {", + " * items: [", + " * {", + " * phone: '6465676359',", + " * countryCode: 'US',", + " * primary: 'true',", + " * tag: 'MOBILE' ", + " * }", + " * ]", + " * },", + " * birthdate: '1995-04-25',", + " * locale: 'en-us',", + " * labelKeys: {", + " * items: [", + " * 'custom.contact'", + " * ]", + " * },", + " * extendedFields': {", + " * items: {", + " * custom.nickname: 'Jonny'", + " * }", + " * },", + " * addresses: {", + " * items: [", + " * {", + " * tag: 'HOME',", + " * address: {", + " * addressLine1: '3 Park Ave',", + " * city: 'NY',", + " * subdivision: 'US-NY',", + " * country: 'US',", + " * postalCode: '10010'", + " * }", + " * ]", + " * }", + " * }", + " * }", + " * ", + " * Sample options value: ", + " * { ", + " * allowDuplicates: true ", + " * }", + " */", + "", + "export const myCreateContactFunction = webMethod(Permissions.Anyone, async (info, options) => {", " ", - " async function createContact(info, options) {", - " try {", - " const result = await contacts.createContact(info, options);", + " try {", + " const elevatedCreateContact = elevate(contacts.createContact);", + " const newContact = await elevatedCreateContact(info, options);", + " console.log('Successfully created a new contact:', newContact);", + "", + " return newContact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Promise resolves to:", + " * {", + " * \"revision\": 1,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * },", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"ed1d7da0-b4a1-4164-81b7-c49dedc25dd7\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-24T12:50:46.047Z\"", + " * }", + " */" ] + } ] }, @@ -121,25 +443,52 @@ "docs": { "summary": "Deletes a contact who is not a site member or contributor.", "description": [ - "The `deleteContact()` function returns a Promise\nthat resolves when the specified contact is deleted.\n\n Deleting a contact permanently removes them from your Contact List.\n\n If the contact is also a site member,\nthe member must be deleted first,\nand then the contact can be deleted.\n\n" + "The `deleteContact()` function returns a Promise\nthat resolves when the specified contact is deleted.\n\n Deleting a contact permanently removes them from your Contact List.\n\n If the contact is also a site member,\nthe member must be deleted first,\nand then the contact can be deleted.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can run this function." ], "examples": [ { - "title": "deleteContact example", + "title": "Delete a contact (dashboard page code)", "body": [ "import { contacts } from 'wix-crm.v2';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847' */", + "", + "export async function myDeleteContactFunction(contactId) {", " ", - " async function deleteContact(contactId) {", - " try {", - " const result = await contacts.deleteContact(contactId);", + " try {", + " await contacts.deleteContact(contactId);", + " console.log('Contact deleted.');", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */" + ] + }, + { + "title": "Delete a contact (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { contacts } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847' */", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "export const myDeleteContactFunction = webMethod(Permissions.Anyone, async (contactId) => {", + " try {", + " const elevatedDeleteContact = elevate(contacts.deleteContact);", + " await elevatedDeleteContact(contactId);", + " console.log('Contact deleted.');", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to void */", + "" ] } ] @@ -198,26 +547,225 @@ "docs": { "summary": "Retrieves a contact.", "description": [ - "The `getContact()` function returns a Promise\nthat resolves when the contact is found.\n#### Getting Merged Contacts\nWhen a source contact is merged\nwith a target contact, the source contact is deleted.\nWhen calling `getContact()` for a merged contact,\nyou can use the source or target contact ID.\nIn both cases, the target contact is returned.\n\nThis is supported only when calling `getContact()`,\nand only for merged contacts.\nDeleted source contact IDs are not supported on any other function.\n\n" + "The `getContact()` function returns a Promise\nthat resolves when the contact is found.\n\n#### Getting Merged Contacts\nWhen a source contact is merged into a target contact, the source contact is deleted. When calling `getContact()` for a merged contact,\nyou can use the source or target contact ID. In both cases, the target contact is returned.\n\nThis is supported only when calling `getContact()`on merged contacts. Previously deleted source contact IDs can't be passed to any other function.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can run this function." ], "examples": [ { - "title": "getContact example", + "title": "Get a contact by ID (dashboard page code)", + "body": [ + "import { contacts } from 'wix-crm.v2';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847' */", + "", + "export async function myGetContactFunction(id) {", + " ", + " try {", + " const contact = await contacts.getContact(id); ", + " const contactId = contact._id;", + " const contactName = contact.info.name.first;", + " ", + " return contact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"revision\": 1,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * },", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"ed1d7da0-b4a1-4164-81b7-c49dedc25dd7\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-24T12:50:46.047Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Get a contact by ID (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { contacts } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847' */", + "", + "export const myGetContactFunction = webMethod(Permissions.Anyone, async (id) => {", " ", - " async function getContact(id, options) {", - " try {", - " const result = await contacts.getContact(id, options);", + " try {", + " const elevatedGetContact = elevate(contacts.getContact);", + " const contact = await elevatedGetContact(id); ", + " const contactId = contact._id;", + " const contactName = contact.info.name.first;", + " ", + " return contact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Promise resolves to:", + " * {", + " * \"revision\": 1,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * },", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"ed1d7da0-b4a1-4164-81b7-c49dedc25dd7\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-24T12:50:46.047Z\"", + " * }", + " */" ] + } ] }, @@ -229,7 +777,6 @@ ], "syntaxName": "getContact", "isAdminMethod": true - }, { "name": "labelContact", @@ -258,7 +805,7 @@ } } ], - "doc": "List of label keys to add to the contact.\n\nLabel keys must exist to be added to the contact.\n Contact labels can be created or retrieved with\n [`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel)\n or\n [`queryLabels()`](wix-crm-backend/contacts/queryLabels).", + "doc": "List of label keys to add to the contact.\n\nLabel keys must exist to be added to the contact.\nContact labels can be created with the\n`findOrCreateLabel()` function. You can use the\n `queryLabels()` function to view the currently existing labels.", "required": true } ], @@ -284,26 +831,296 @@ "docs": { "summary": "Adds labels to a contact.", "description": [ - "The `labelContact()` function returns a Promise\nthat resolves when the specified labels are added to the contact.\n - **To create new labels:** Use [`findOrCreateLabel()`](#contacts/findorcreatelabel).\n- **To find labels:** Use [`findOrCreateLabel()`](#contacts/findorcreatelabel), [`getLabel()`](#contacts/getlabel), or [`queryLabels()`](#contacts/queryLabels).\n\n" + "The `labelContact()` function returns a Promise\nthat resolves when the specified labels are added to the contact.\n - **To create new labels:** Use `findOrCreateLabel()`.\n- **To find labels:** Use `findOrCreateLabel()`, `getLabel()`, or `queryLabels()`.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can run this function." ], "examples": [ { - "title": "labelContact example", + "title": "Add a label to a contact (dashboard page code)", + "body": [ + "import { contacts } from 'wix-crm.v2';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847'", + " * ", + " * Sample labelKeys value:", + " * [", + " * 'custom.at-risk',", + " * 'custom.active-customer'", + " * ]", + " * ", + " */", + "", + "export async function myLabelContactFunction(contactId, labelKeys) {", + " ", + " try {", + " const labeledContact = await contacts.labelContact(contactId, labelKeys); ", + " console.log('Successfully added labels to contact');", + " ", + " return labeledContact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"contact\": {", + " * \"revision\": 2,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"ed1d7da0-b4a1-4164-81b7-c49dedc25dd7\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\",", + " * \"custom.at-risk\",", + " * \"custom.active-customer\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-25T06:13:54.362Z\"", + " * }", + " * }", + " * ", + " */", + "" + ] + }, + { + "title": "Add a label to a contact (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { contacts } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847'", + " * ", + " * Sample labelKeys value:", + " * [", + " * 'custom.at-risk',", + " * 'custom.active-customer'", + " * ]", + " * ", + " */", + "", + "export const myLabelContactFunction = webMethod(Permissions.Anyone, async (contactId, labelKeys) => {", " ", - " async function labelContact(contactId, labelKeys, options) {", - " try {", - " const result = await contacts.labelContact(contactId, labelKeys, options);", + " try {", + " const elevatedLabelContact = elevate(contacts.labelContact);", + " const labeledContact = await elevatedLabelContact(contactId, labelKeys); ", + " console.log('Successfully added labels to contact');", + " ", + " return labeledContact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Promise resolves to:", + " * {", + " * \"contact\": {", + " * \"revision\": 2,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"ed1d7da0-b4a1-4164-81b7-c49dedc25dd7\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\",", + " * \"custom.at-risk\",", + " * \"custom.active-customer\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-25T06:13:54.362Z\"", + " * }", + " * ", + " */", + "" ] + }, + { + "title": "Create a new label and add it to a contact ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { contacts, labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847'", + " * ", + " * Sample displayName value: 'Supplier'", + " */", + "", + "export const addNewLabelToContact = webMethod(Permissions.Anyone, async (displayName, contactId) => {", + " ", + " try {", + " const elevatedCreateLabel = elevate(labels.findOrCreateLabel);", + " const elevatedLabelContact = elevate(contacts.labelContact);", + " const newLabel = await elevatedCreateLabel(displayName);", + " const labelKeys = [newLabel.label.key];", + " // Extract label key from new label", + " if (newLabel.newLabel) {", + " // Label contact", + " const contact = await elevatedLabelContact(contactId, labelKeys);", + " const contactLabels = contact.contact.info.labelKeys.items", + "", + " return contactLabels", + " }", + " else {", + " return \"Label was not added to contact.\"", + " }", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to: ", + " * [", + " * \"custom.contact\",", + " * \"custom.supplier\"", + " * ]", + " */", + "" + ], + "extra": { + "description": "This function creates a new label, extracts the label key, and then labels a contact." + } } ] }, @@ -346,7 +1163,7 @@ "referenceType": "wix-crm-v2.Contacts.MergeContactsOptions" } ], - "doc": "Merge contacts options.\n", + "doc": "Merge contacts options.", "required": false } ], @@ -372,26 +1189,292 @@ "docs": { "summary": "Merges source contacts into a target contact.", "description": [ - "Merging contacts has these effects on the target contact:\n\n- No target contact data is overwritten or deleted.\n- Arrays (emails, phones, addresses, and labels) are merged from the source contacts.\n- If merging more than one source contact, the 1st source is given precedence, then the 2nd, and so on.\n\n
\n\n__Important:__\nMerges cannot be undone.\nUse [Preview Merge Contacts](#preview-merge-contacts)\nto test before merging.\n\n
\n\nSource contacts are deleted when merging.\nHowever, if a source contact is a site member or contributor,\nthe merge fails because site contributors and members can't be deleted.\nSite members and contributors can be target contacts only.\n\nAfter merging,\nif you call [Get Contact](#get-contact) with a deleted source contact ID,\nthe target contact ID is returned.\nThis is supported when calling Get Contact only.\nDeleted source contact IDs are not supported on any other endpoint.\n\nMerging contacts triggers these webhooks:\n\n- Contact Merged is triggered.\n- Contact Updated is triggered for the target contact. `originatedFrom` is set to `merge`.\n- Contact Deleted is triggered for each source contact. `originatedFrom` is set to `merge`.\n\nThis function is not a universal function and runs only on the backend." + "Merging contacts has these effects on the target contact:\n\n- No target contact data is overwritten or deleted.\n- Arrays (emails, phones, addresses, and labels) are merged from the source contacts into the target contact.\n- If merging more than one source contact, the 1st source is given precedence, then the 2nd, and so on.\n\nSource contacts are deleted when merging.\nHowever, if a source contact is a site member or collaborator,\nthe `mergeContacts()` function fails because site collaborators and members can't be deleted.\nSite members and collaborators can only be target contacts.\n\nAfter merging, if you call the `getContact()` function with a deleted source contact ID, the target contact ID is returned. This is only supported when calling `getContact()`. Previously deleted source contact IDs can't be passed in any other function.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can run this function." ], "examples": [ { - "title": "mergeContacts example", + "title": "Get revision ID and merge contacts (dashboard page code)", "body": [ "import { contacts } from 'wix-crm.v2';", + "", + "/*", + " * Sample targetContactId value: '5518ee7f-270e-40c4-b756-dad56e8f0ffc'", + " * ", + " * Sample targetContactRevision value: Extract from `getContact()` return object", + " * ", + " * Sample options value:", + " * {", + " * sourceContactIds: [", + " * 'ce6475cf-55d7-411c-8cb1-7f62be2429dd',", + " * 'cb591d0e-a308-4f19-a9b9-5fb26ee7a11f'", + " * ]", + " * }", + "*/", + "", + "export async function mergeContactsFunction(targetContactId, targetContactRevision, options) {", " ", - " async function mergeContacts(targetContactId, targetContactRevision, options) {", - " try {", - " const result = await contacts.mergeContacts(targetContactId, targetContactRevision, options);", + " try{", + " const targetContact = await contacts.getContact(targetContactId);", + " ", + " // Extract revision from target contact", + " targetContactRevision = targetContact.revision;", + " const mergedContact = await contacts.mergeContacts(targetContactId, targetContactRevision, options);", + " console.log(\"successfully merged contacts!\");", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " - ] + " return mergedContact.contact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"revision\": 3,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2024-01-09T12:41:24.295Z\",", + " * \"activityType\": \"CONTACT_MERGED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"524-624-2486\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"Sally\",", + " * \"last\": \"Smith\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"fa2a8be4-b0d9-4926-adb3-463ef487787b\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"524-624-2486\",", + " * \"e164Phone\": \"+15246242486\",", + " * \"primary\": true,", + " * \"_id\": \"73382a58-55c6-4b1c-8af1-ffe60a7e5485\"", + " * },", + " * {", + " * \"tag\": \"WORK\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"214-268-2998\",", + " * \"e164Phone\": \"+12142682998\",", + " * \"primary\": false,", + " * \"_id\": \"69bd9ea5-31e3-4e68-97a7-1c74031f26cd\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"NY\",", + " * \"city\": \"NY\"", + " * },", + " * \"_id\": \"f22294bf-349b-47bb-9229-8a0d2ca9cb78\"", + " * },", + " * {", + " * \"tag\": \"WORK\",", + " * \"address\": {", + " * \"formatted\": \"12 Park Ave\\nNY\\nUnited States\",", + " * \"addressLine1\": \"12 Park Ave\",", + " * \"city\": \"NY\",", + " * \"country\": \"US\"", + " * },", + " * \"_id\": \"471391d8-285f-405b-ae44-bda559088ac1\"", + " * }", + " * ]", + " * },", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.active-customer\",", + " * \"custom.contact\",", + " * \"contacts.customers\",", + " * \"custom.anonymous\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Smith Sally\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.effectiveEmail\": \"sally.smith@example.com\",", + " * \"custom.age\": 24,", + " * \"contacts.displayByFirstName\": \"Sally Smith\",", + " * \"custom.nickname\": \"Silly\"", + " * }", + " * }", + " * },", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\",", + " * \"_createdDate\": \"2023-12-28T11:44:11.331Z\",", + " * \"_updatedDate\": \"2024-01-09T12:41:24.295Z\"", + " * }", + " */", + "" + ], + "extra": { + "description": "This function uses `getContact()` to extract the `revision` for the target contact, then merges the source contacts into the target contact." + } + }, + { + "title": "Get revision ID and merge contacts (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { contacts } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/*", + " * Sample targetContactId value: '5518ee7f-270e-40c4-b756-dad56e8f0ffc'", + " * ", + " * Sample targetContactRevision value: Extract from `getContact()` return object", + " * ", + " * Sample options value:", + " * {", + " * sourceContactIds: [", + " * 'ce6475cf-55d7-411c-8cb1-7f62be2429dd',", + " * 'cb591d0e-a308-4f19-a9b9-5fb26ee7a11f'", + " * ]", + " * }", + "*/", + "", + "export const mergeContactsFunction = webMethod(Permissions.Anyone, async (targetContactId, targetContactRevision, options) => {", + " ", + " try{", + " const elevateGetContactRevision = elevate(contacts.getContact);", + " const elevatedMergeContacts = elevate(contacts.mergeContacts);", + " const targetContact = await elevateGetContactRevision(targetContactId);", + " ", + " // Extract revision from target contact", + " targetContactRevision = targetContact.revision;", + " const mergedContact = await elevatedMergeContacts(targetContactId, targetContactRevision, options);", + " console.log(\"successfully merged contacts!\");", + "", + " return mergedContact.contact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"revision\": 3,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2024-01-09T12:41:24.295Z\",", + " * \"activityType\": \"CONTACT_MERGED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"524-624-2486\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"Sally\",", + " * \"last\": \"Smith\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"fa2a8be4-b0d9-4926-adb3-463ef487787b\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"524-624-2486\",", + " * \"e164Phone\": \"+15246242486\",", + " * \"primary\": true,", + " * \"_id\": \"73382a58-55c6-4b1c-8af1-ffe60a7e5485\"", + " * },", + " * {", + " * \"tag\": \"WORK\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"214-268-2998\",", + " * \"e164Phone\": \"+12142682998\",", + " * \"primary\": false,", + " * \"_id\": \"69bd9ea5-31e3-4e68-97a7-1c74031f26cd\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"NY\",", + " * \"city\": \"NY\"", + " * },", + " * \"_id\": \"f22294bf-349b-47bb-9229-8a0d2ca9cb78\"", + " * },", + " * {", + " * \"tag\": \"WORK\",", + " * \"address\": {", + " * \"formatted\": \"12 Park Ave\\nNY\\nUnited States\",", + " * \"addressLine1\": \"12 Park Ave\",", + " * \"city\": \"NY\",", + " * \"country\": \"US\"", + " * },", + " * \"_id\": \"471391d8-285f-405b-ae44-bda559088ac1\"", + " * }", + " * ]", + " * },", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.active-customer\",", + " * \"custom.contact\",", + " * \"contacts.customers\",", + " * \"custom.anonymous\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Smith Sally\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.effectiveEmail\": \"sally.smith@example.com\",", + " * \"custom.age\": 24,", + " * \"contacts.displayByFirstName\": \"Sally Smith\",", + " * \"custom.nickname\": \"Silly\"", + " * }", + " * }", + " * },", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\",", + " * \"_createdDate\": \"2023-12-28T11:44:11.331Z\",", + " * \"_updatedDate\": \"2024-01-09T12:41:24.295Z\"", + " * }", + " */", + "" + ], + "extra": { + "description": "This function uses `getContact()` to extract the `revision` for the target contact, then merges the source contacts into the target contact." + } } ] }, @@ -457,25 +1540,243 @@ "docs": { "summary": "Removes labels from a contact.", "description": [ - " The `unlabelContact()` function returns a Promise\n that resolves when the specified labels are removed from the contact.\n\n If a label is no longer needed\n and you want to remove it from all contacts,\n you can delete it with Labels\n `deleteLabel()`.\n\n" + " The `unlabelContact()` function returns a Promise\n that resolves when the specified labels are removed from the contact.\n\nIf a label is no longer needed and you want to remove it from all contacts, you can remove it with the Labels `deleteLabel()` function.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can run this function." ], "examples": [ { - "title": "unlabelContact example", + "title": "Remove a label from a contact (dashboard page code)", + "body": [ + "import { contacts } from 'wix-crm.v2';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847'", + " * ", + " * Sample labelKeys value:", + " * [", + " * 'custom.at-risk'", + " * ]", + " * ", + " */", + "", + "export async function myUnlabelContactFunction(contactId, labelKeys) {", + " ", + " try {", + " const contact = await contacts.unlabelContact(contactId, labelKeys);", + " console.log('Successfully removed label from contact');", + " ", + " return contact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "", + "/* Promise resolves to:", + " * {", + " * \"contact\": {", + " * \"revision\": 3,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"ed1d7da0-b4a1-4164-81b7-c49dedc25dd7\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\" ", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-25T06:13:54.362Z\"", + " * }", + " * }", + " * ", + " */", + "" + ] + }, + { + "title": "Remove a label from a contact (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { contacts } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847'", + " * ", + " * Sample labelKeys value:", + " * [", + " * 'custom.at-risk'", + " * ]", + " * ", + " */", + "", + "export const myUnlabelContactFunction = webMethod(Permissions.Anyone, async (contactId, labelKeys) => {", " ", - " async function unlabelContact(contactId, labelKeys, options) {", - " try {", - " const result = await contacts.unlabelContact(contactId, labelKeys, options);", + " try {", + " const elevatedUnlabelContact = elevate(contacts.unlabelContact);", + " const contact = await elevatedUnlabelContact(contactId, labelKeys);", + " console.log('Successfully removed label from contact');", + " ", + " return contact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Promise resolves to:", + " * {", + " * \"contact\": {", + " * \"revision\": 3,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"6465676359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"ed1d7da0-b4a1-4164-81b7-c49dedc25dd7\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\" ", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-25T06:13:54.362Z\"", + " * }", + " * }", + " * ", + " */" ] } ] @@ -512,6 +1813,16 @@ "doc": "Contact info.", "required": true }, + { + "name": "revision", + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Revision number.\nWhen updating, include the existing `revision`\nto prevent conflicting updates.", + "required": true + }, { "name": "options", "type": [ @@ -520,13 +1831,13 @@ } ], "doc": "Contact update options.", - "required": true + "required": false } ], "requiredFields": [ "contactId", "info", - "options.revision" + "revision" ], "ret": { "type": [ @@ -546,26 +1857,302 @@ "docs": { "summary": "Updates a contact's properties.", "description": [ - "The `updateContact()` function returns a Promise that resolves\nwhen the specified contact's information is updated.\n\n Each time the contact is updated,\n`revision` increments by 1.\nThe existing `revision` must be included when updating the contact.\nThis ensures you're working with the latest contact information,\nand it prevents unintended overwrites.\n\n" + "The `updateContact()` function returns a Promise that resolves\nwhen the specified contact's information is updated.\n\nEach time the contact is updated, `revision` increments by 1. The existing `revision` must be included when updating the contact. This ensures you're working with the latest contact information, and prevents unintended overwrites.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can run this function." ], "examples": [ { - "title": "updateContact example", + "title": "Update a contact by adding a phone number (dashboard page code)", + "body": [ + "import { contacts } from 'wix-crm.v2';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847'", + " * ", + " * Sample revision value: '5'", + " * ", + " * Sample info object:", + " * {", + " * phones: {", + " * items: [", + " * {", + " * countryCode:\"US\",", + " * phone:\"6465676359\",", + " * primary:true,", + " * tag:\"MOBILE\"", + " * },", + " * {", + " * phone: \"2421642341\",", + " * countryCode: \"US\",", + " * primary: false,", + " * tag: \"HOME\"", + " * }", + " * ]", + " * }", + " * }", + " */", + "", + "export async function myUpdateContactFunction(contactId, info, revision, options) {", + " ", + " try {", + " const updatedContact = await contacts.updateContact(contactId, info, revision, options); ", + " console.log('Successfully updated contact:', updatedContact)", + " ", + " return updatedContact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "", + "/* Promise resolves to:", + " * {", + " * \"contact\": {", + " * \"revision\": 17,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"646-567-6359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * },", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"john.doe.at.home@example.com\",", + " * \"primary\": false,", + " * \"_id\": \"06eef938-13d2-49f3-8097-60686ab4ddd2\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"01e597c0-76c6-4791-bb77-8b3309f893d1\"", + " * },", + " * {", + " * \"tag\": \"HOME\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"2421642341\",", + " * \"primary\": false,", + " * \"_id\": \"cbbae95c-e1d5-48c4-a3ec-531ee2bf51fb\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-25T07:31:48.270Z\"", + " * }", + " * }", + " */", + "" + ] + }, + { + "title": "Update a contact by adding a phone number (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { contacts } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847'", + " * ", + " * Sample revision value: '5'", + " * ", + " * Sample info object:", + " * {", + " * phones: {", + " * items: [", + " * {", + " * countryCode:\"US\",", + " * phone:\"6465676359\",", + " * primary:true,", + " * tag:\"MOBILE\"", + " * },", + " * {", + " * phone: \"2421642341\",", + " * countryCode: \"US\",", + " * primary: false,", + " * tag: \"HOME\"", + " * }", + " * ]", + " * }", + " * }", + " */", + "", + "export const myUpdateContactFunction = webMethod(Permissions.Anyone, async (contactId, info, revision, options) => {", " ", - " async function updateContact(contactId, info, options) {", - " try {", - " const result = await contacts.updateContact(contactId, info, options);", + " try {", + " const elevatedUpdateContact = elevate(contacts.updateContact);", + " const updatedContact = await elevatedUpdateContact(contactId, info, revision, options); ", + " console.log('Successfully updated contact:', updatedContact)", + " ", + " return updatedContact; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "", + "/* Promise resolves to:", + " * {", + " * \"contact\": {", + " * \"revision\": 17,", + " * \"source\": {", + " * \"sourceType\": \"WIX_CODE\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2023-12-24T11:50:46.048Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"johndoe1@example.com\",", + " * \"phone\": \"646-567-6359\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"John\",", + " * \"last\": \"Doe\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"johndoe1@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"37db3bde-83c0-4ca2-8097-88964a2f343b\"", + " * },", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"john.doe.at.home@example.com\",", + " * \"primary\": false,", + " * \"_id\": \"06eef938-13d2-49f3-8097-60686ab4ddd2\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-567-6359\",", + " * \"e164Phone\": \"+16465676359\",", + " * \"primary\": true,", + " * \"_id\": \"01e597c0-76c6-4791-bb77-8b3309f893d1\"", + " * },", + " * {", + " * \"tag\": \"HOME\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"2421642341\",", + " * \"primary\": false,", + " * \"_id\": \"cbbae95c-e1d5-48c4-a3ec-531ee2bf51fb\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"3 Park Ave\\nNY, New York 10010\\nUnited States\",", + " * \"addressLine1\": \"3 Park Ave\",", + " * \"city\": \"NY\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10010\"", + " * },", + " * \"_id\": \"eeb4e174-fd0f-4ce8-8cac-dc152f284228\"", + " * }", + " * ]", + " * },", + " * \"company\": \"Wix\",", + " * \"jobTitle\": \"Writer\",", + " * \"birthdate\": \"1995-04-25\",", + " * \"locale\": \"en-us\",", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.contact\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Doe John\",", + " * \"invoices.vatId\": \"\",", + " * \"emailSubscriptions.deliverabilityStatus\": \"NOT_SET\",", + " * \"emailSubscriptions.subscriptionStatus\": \"UNSUBSCRIBED\",", + " * \"contacts.displayByFirstName\": \"John Doe\",", + " * \"custom.nickname\": \"Jonny\"", + " * }", + " * }", + " * },", + " * \"_id\": \"2712ae1d-3f64-46c2-ac3a-94a6c2e29847\",", + " * \"_createdDate\": \"2023-12-24T11:50:46.049Z\",", + " * \"_updatedDate\": \"2023-12-25T07:31:48.270Z\"", + " * }", + " * }", + " */", + "" ] + } ] }, @@ -1559,17 +3146,6 @@ ], "doc": "Details about the contact's last action in the site." }, - { - "name": "picture", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's profile picture.\nThis can contain an image URL and a Wix Media image ID.\n\n> **Deprecation Notice:**\n> This property has been replaced with\n> `info.picture`\n> and will be removed on March 31, 2022. If your app uses this property,\n> we recommend updating your code as soon as possible." - }, { "name": "primaryInfo", "readOnly": true, @@ -1631,7 +3207,7 @@ "nativeType": "string" } ], - "doc": "Contact's last action in the site.\n\nSome possible values:\n`\"GENERAL\"`, `\"CONTACT_CREATED\"`, `\"MEMBER_LOGIN\"`, `\"MEMBER_REGISTER\"`,\n`\"MEMBER_STATUS_CHANGED\"`, `\"FORM_SUBMITTED\"`, `\"INBOX_FORM_SUBMITTED\"`,\n`\"INBOX_PAYMENT_REQUEST_PAID\"`, `\"INBOX_MESSAGE_TO_CUSTOMER\"`,\n`\"INBOX_MESSAGE_FROM_CUSTOMER\"`, `\"NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED\"`,\n`\"NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE\"`, `\"ECOM_PURCHASE\"`,\n`\"ECOM_CART_ABANDON\"`, `\"ECOM_CHECKOUT_BUYER\"`, `\"BOOKINGS_APPOINTMENT\"`,\n`\"HOTELS_RESERVATION\"`, `\"HOTELS_PURCHASE\"`, `\"HOTELS_CONFIRMATION\"`,\n`\"HOTELS_CANCEL\"`, `\"VIDEO_PURCHASE\"`, `\"VIDEO_RENT\"`,\n`\"CASHIER_BUTTON_PURCHASE\"`, `\"ARENA_NEW_LEAD\"`, `\"EVENTS_RSVP\"`,\n`\"INVOICE_PAY\"`, `\"INVOICE_OVERDUE\"`, `\"PRICE_QUOTE_ACCEPT\"`,\n`\"PRICE_QUOTE_EXPIRE\"`, `\"RESTAURANTS_ORDER\"`, `\"RESTAURANTS_RESERVATION\"`,\n`\"SHOUTOUT_OPEN\"`, `\"SHOUTOUT_CLICK\"`, `\"CONTACT_MERGED\"`.\n" + "doc": "Contact's last action in the site.\n\nSome possible values:\n`\"GENERAL\"`, `\"CONTACT_CREATED\"`, `\"MEMBER_LOGIN\"`, `\"MEMBER_REGISTER\"`,\n`\"MEMBER_STATUS_CHANGED\"`, `\"FORM_SUBMITTED\"`, `\"INBOX_FORM_SUBMITTED\"`,\n`\"INBOX_PAYMENT_REQUEST_PAID\"`, `\"INBOX_MESSAGE_TO_CUSTOMER\"`,\n`\"INBOX_MESSAGE_FROM_CUSTOMER\"`, `\"NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED\"`,\n`\"NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE\"`, `\"NEWSLETTER_SUBSCRIPTION_SUBSCRIBE\"`,\n`\"NEWSLETTER_SUBSCRIPTION_PENDING\"`, `\"NEWSLETTER_SUBSCRIPTION_NOT_SET\"`, `\"ECOM_PURCHASE\"`,\n`\"ECOM_CART_ABANDON\"`, `\"ECOM_CHECKOUT_BUYER\"`, `\"BOOKINGS_APPOINTMENT\"`,\n`\"HOTELS_RESERVATION\"`, `\"HOTELS_PURCHASE\"`, `\"HOTELS_CONFIRMATION\"`,\n`\"HOTELS_CANCEL\"`, `\"VIDEO_PURCHASE\"`, `\"VIDEO_RENT\"`,\n`\"CASHIER_BUTTON_PURCHASE\"`, `\"ARENA_NEW_LEAD\"`, `\"EVENTS_RSVP\"`,\n`\"INVOICE_PAY\"`, `\"INVOICE_OVERDUE\"`, `\"PRICE_QUOTE_ACCEPT\"`,\n`\"PRICE_QUOTE_EXPIRE\"`, `\"RESTAURANTS_ORDER\"`, `\"RESTAURANTS_RESERVATION\"`,\n`\"SHOUTOUT_OPEN\"`, `\"SHOUTOUT_CLICK\"`, `\"CONTACT_MERGED\"`,\n`\"PHONE_SUBSCRIPTION_SUBSCRIBE\"`, `\"PHONE_SUBSCRIPTION_PENDING\"`, `\"PHONE_SUBSCRIPTION_NOT_SET\"`,\n`\"PHONE_SUBSCRIPTION_UNSUBSCRIBE\"`.\n" } ], "docs": { @@ -1702,7 +3278,7 @@ "nativeType": "string" } ], - "doc": " Address type.\n\n `\"UNTAGGED\"` is shown as \"Other\" in the Contact List.\n\n One of:\n\n - `\"UNTAGGED\"`\n - `\"HOME\"`\n - `\"WORK\"`\n - `\"BILLING\"`\n - `\"SHIPPING\"`\n" + "doc": "Address type.\n\n`\"UNTAGGED\"` is shown as \"Other\" in the Contact List.\n\nSupported values: `\"UNTAGGED\"`, `\"HOME\"`, `\"WORK\"`, `\"BILLING\"`, `\"SHIPPING\"`.\n" } ], "docs": { @@ -1800,7 +3376,7 @@ "nativeType": "boolean" } ], - "doc": "Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`." + "doc": "Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nIt also affects the subscription status to marketing emails that are decided based on the primary email." }, { "name": "tag", @@ -1810,7 +3386,57 @@ "nativeType": "string" } ], - "doc": "Email type.\n\n`\"UNTAGGED\"` is shown as \"Other\" in the Contact List.\n\n One of:\n\n - `\"UNTAGGED\"`\n- `\"MAIN\"`\n- `\"HOME\"`\n- `\"WORK\"`\n" + "doc": "Email type.\n\n`\"UNTAGGED\"` is shown as \"Other\" in the Contact List.\n\nSupported values: `\"UNTAGGED\"`, `\"MAIN\"`, `\"HOME\"`, `\"WORK\"`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ContactEmailSubscriptionUpdated", + "members": [ + { + "name": "_updatedDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the contact was updated with the email subscription or deliverability status." + }, + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The updated contact ID." + }, + { + "name": "primaryEmail", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Contacts.PrimaryEmail" + } + ], + "doc": "The primary email of the contact with the updated subscription and deliverability status." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The revision of the contact." } ], "docs": { @@ -1917,7 +3543,7 @@ "referenceType": "wix-crm-v2.Contacts.LabelsWrapper" } ], - "doc": "List of contact label keys.\n [Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)\n help categorize contacts.\n\n Label keys must exist to be added to the contact.\n Contact labels can be created or retrieved with\n [`findOrCreateLabel()`](wix-crm-v2/labels/findorcreatelabel)\n or\n [`queryLabels()`](wix-crm-v2/labels/queryLabels).\n\n" + "doc": "List of label keys applied to the contact.\n\nLabel keys must exist to be added to the contact.\nContact labels can be created with the\n`findOrCreateLabel()` function. You can use the\n `queryLabels()` function to view the currently existing labels.\n\n" }, { "name": "locale", @@ -2076,7 +3702,7 @@ "nativeType": "string" } ], - "doc": "[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`,\nas long as both of those values are valid." + "doc": "[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid." }, { "name": "phone", @@ -2096,7 +3722,7 @@ "nativeType": "boolean" } ], - "doc": "Whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's other phones become `false`." + "doc": "Whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nIt also affects the subscription status to SMS messages that are decided based on the primary phone." }, { "name": "tag", @@ -2106,7 +3732,57 @@ "nativeType": "string" } ], - "doc": "Phone type.\n\n`\"UNTAGGED\"` is shown as \"Other\" in the Contact List.\n\n One of:\n\n - `\"UNTAGGED\"`\n- `\"MAIN\"`\n- `\"HOME\"`\n- `\"MOBILE\"`\n- `\"WORK\"`\n- `\"FAX\"`\n" + "doc": "Phone type.\n\n`\"UNTAGGED\"` is shown as \"Other\" in the Contact List.\n\nSupported values: `\"UNTAGGED\"`, `\"MAIN\"`, `\"HOME\"`,`\"MOBILE\"`, `\"WORK\"`, `\"FAX\"`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ContactPhoneSubscriptionUpdated", + "members": [ + { + "name": "_updatedDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the contact was updated with the SMS subscription status." + }, + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The updated contact ID." + }, + { + "name": "primaryPhone", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Contacts.PrimaryPhone" + } + ], + "doc": "The primary phone of the contact with the updated subscription status." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The revision of the contact." } ], "docs": { @@ -2163,91 +3839,68 @@ } }, { - "name": "ContactRemovedFromSegment", + "name": "ContactPrimaryInfoUpdated", "members": [ { - "name": "contact", + "name": "contactId", "optional": true, "type": [ { - "referenceType": "wix-crm-v2.Contacts.Contact" + "nativeType": "string" } ], - "doc": "The contact that was removed" + "doc": "The updated contact ID." }, { - "name": "segmentId", + "name": "previousPrimaryEmailSubscriptionStatus", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-crm-v2.Contacts.PrimarySubscriptionStatus" } ], - "doc": "Id of the segment from which the contact was removed" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ContactSource", - "members": [ + "doc": "previous primary email subscription status" + }, { - "name": "appId", - "readOnly": true, + "name": "previousPrimaryPhoneSubscriptionStatus", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-crm-v2.Contacts.PrimarySubscriptionStatus" } ], - "doc": "App ID, if the contact was created by an app." + "doc": "previous primary phone subscription status" }, { - "name": "sourceType", - "readOnly": true, + "name": "primaryEmailUpdated", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Some possible values:\n\n`\"OTHER\"`, `\"ADMIN\"`, `\"WIX_APP\"`, `\"IMPORT\"`, `\"THIRD_PARTY\"`,\n`\"WIX_BOOKINGS\"`, `\"WIX_CHAT\"`, `\"WIX_EMAIL_MARKETING\"`, `\"WIX_EVENTS\"`,\n`\"WIX_FORMS\"`, `\"WIX_GROUPS\"`, `\"WIX_HOTELS\"`, `\"WIX_MARKET_PLACE\"`,\n`\"WIX_MUSIC\"`, `\"WIX_RESTAURANTS\"`, `\"WIX_SITE_MEMBERS\"`, `\"WIX_STORES\"`." + "doc": "Indication whether the primary email was updated." }, { - "name": "wixAppId", - "readOnly": true, + "name": "primaryPhoneUpdated", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "App ID, if the contact was created by a Wix app.\n\n> **Deprecation Notice:**\n> This property has been replaced with\n> `appId`\n> and will be removed on March 31, 2022. If your app uses this property,\n> we recommend updating your code as soon as possible." + "doc": "Indication whether primary phone was updated." } ], "docs": { "description": [ - "" + "This message is an internal message used by this app and it is used to trigger\nthe update of the subscription status of the contact asynchronously.\nIt is published after a contact is created/updated/merged." ] } }, { - "name": "ContactSubmitted", + "name": "ContactRemovedFromSegment", "members": [ - { - "name": "activity", - "optional": true, - "type": [ - { - "referenceType": "wix-crm-v2.Contacts.ContactActivity" - } - ], - "doc": "Submitted activity" - }, { "name": "contact", "optional": true, @@ -2256,10 +3909,82 @@ "referenceType": "wix-crm-v2.Contacts.Contact" } ], - "doc": "Submitted Contact (after processing)" + "doc": "The contact that was removed" }, { - "name": "passThroughData", + "name": "segmentId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the segment from which the contact was removed" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ContactSource", + "members": [ + { + "name": "appId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "App ID, if the contact was created by an app." + }, + { + "name": "sourceType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Some possible values:\n\n`\"OTHER\"`, `\"ADMIN\"`, `\"WIX_APP\"`, `\"IMPORT\"`, `\"THIRD_PARTY\"`,\n`\"WIX_BOOKINGS\"`, `\"WIX_CHAT\"`, `\"WIX_EMAIL_MARKETING\"`, `\"WIX_EVENTS\"`,\n`\"WIX_FORMS\"`, `\"WIX_GROUPS\"`, `\"WIX_HOTELS\"`, `\"WIX_MARKET_PLACE\"`,\n`\"WIX_MUSIC\"`, `\"WIX_RESTAURANTS\"`, `\"WIX_SITE_MEMBERS\"`, `\"WIX_STORES\"`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ContactSubmitted", + "members": [ + { + "name": "activity", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Contacts.ContactActivity" + } + ], + "doc": "Submitted activity" + }, + { + "name": "contact", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Contacts.Contact" + } + ], + "doc": "Submitted Contact (after processing)" + }, + { + "name": "passThroughData", "optional": true, "type": [ { @@ -2395,7 +4120,7 @@ "nativeType": "boolean" } ], - "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefaults to `false`.\n" + "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefault: `false`\n" } ], "docs": { @@ -2415,7 +4140,7 @@ "nativeType": "boolean" } ], - "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefaults to `false`.\n" + "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefault: `false`\n" }, { "name": "info", @@ -2542,170 +4267,142 @@ } }, { - "name": "DuplicateContactExists", + "name": "DomainEvent", "members": [ { - "name": "duplicateContactId", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { - "name": "duplicateEmail", + "name": "actionEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-crm-v2.Contacts.ActionEvent" } ], "doc": "" }, { - "name": "duplicatePhone", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-crm-v2.Contacts.EntityCreatedEvent" } ], "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Error", - "members": [ + }, { - "name": "code", + "name": "deletedEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-crm-v2.Contacts.EntityDeletedEvent" } ], - "doc": "Error code." + "doc": "" }, { - "name": "message", + "name": "entityEventSequence", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Error details." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "EstimateAudienceSizeOptions", - "members": [ + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, { - "name": "activeContactsOnly", + "name": "entityFqdn", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Should \"inactive\" contacts be excluded or not (default value \"false\")." + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" }, { - "name": "contactIds", + "name": "entityId", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Contact IDs of a campaign audience." + "doc": "ID of the entity associated with the event." }, { - "name": "contactsFilter", + "name": "eventTime", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "Date" } ], - "doc": "Contacts filter expression (json)." + "doc": "Event timestamp." }, { - "name": "labelIds", + "name": "originatedFrom", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Label IDs of a campaign audience." + "doc": "If present, indicates the action that triggered the event." }, { - "name": "resendCampaignId", + "name": "slug", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Id of a campaign that is to be resent." + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" }, { - "name": "search", + "name": "triggeredByAnonymizeRequest", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Contacts plain text search expression (searches in name, phone and email fields)." + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { - "name": "segmentIds", + "name": "updatedEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-crm-v2.Contacts.EntityUpdatedEvent" } ], - "doc": "Segment ids of a campaign audience." + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, "docs": { "description": [ "" @@ -2713,98 +4410,87 @@ } }, { - "name": "EstimateAudienceSizeRequest", + "name": "DomainEventBodyOneOf", "members": [ { - "name": "activeContactsOnly", + "name": "actionEvent", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-crm-v2.Contacts.ActionEvent" } ], - "doc": "Should \"inactive\" contacts be excluded or not (default value \"false\")." + "doc": "" }, { - "name": "contactIds", + "name": "createdEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-crm-v2.Contacts.EntityCreatedEvent" } ], - "doc": "Contact IDs of a campaign audience." + "doc": "" }, { - "name": "contactsFilter", + "name": "deletedEvent", "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-crm-v2.Contacts.EntityDeletedEvent" } ], - "doc": "Contacts filter expression (json)." + "doc": "" }, { - "name": "labelIds", + "name": "updatedEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-crm-v2.Contacts.EntityUpdatedEvent" } ], - "doc": "Label IDs of a campaign audience." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DuplicateContactExists", + "members": [ { - "name": "resendCampaignId", + "name": "duplicateContactId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Id of a campaign that is to be resent." + "doc": "" }, { - "name": "search", + "name": "duplicateEmail", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Contacts plain text search expression (searches in name, phone and email fields)." + "doc": "" }, { - "name": "segmentIds", + "name": "duplicatePhone", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Segment ids of a campaign audience." + "doc": "" } ], "docs": { @@ -2814,17 +4500,17 @@ } }, { - "name": "EstimateAudienceSizeResponse", + "name": "EntityCreatedEvent", "members": [ { - "name": "estimation", + "name": "entityAsJson", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Audience size estimation." + "doc": "" } ], "docs": { @@ -2834,27 +4520,17 @@ } }, { - "name": "EstimateFilterSizeOptions", + "name": "EntityDeletedEvent", "members": [ { - "name": "activeContactsOnly", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Should \"inactive\" contacts be excluded or not (default value \"false\")." - }, - { - "name": "search", + "name": "deletedEntityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Contacts plain text search expression (searches in name, phone and email fields)." + "doc": "Entity that was deleted" } ], "docs": { @@ -2864,36 +4540,17 @@ } }, { - "name": "EstimateFilterSizeRequest", + "name": "EntityUpdatedEvent", "members": [ { - "name": "activeContactsOnly", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Should \"inactive\" contacts be excluded or not (default value \"false\")." - }, - { - "name": "filter", - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "Contacts filter expression." - }, - { - "name": "search", + "name": "currentEntityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Contacts plain text search expression (searches in name, phone and email fields)." + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], "docs": { @@ -2903,17 +4560,27 @@ } }, { - "name": "EstimateFilterSizeResponse", + "name": "Error", "members": [ { - "name": "estimation", + "name": "code", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Mailing list size estimation." + "doc": "Error code." + }, + { + "name": "message", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error details." } ], "docs": { @@ -3138,6 +4805,63 @@ ] } }, + { + "name": "GroupInfo", + "members": [ + { + "name": "groupIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Group IDs" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "IdentityInfo", + "members": [ + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Login email" + }, + { + "name": "signupDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Signup date" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Item", "members": [ @@ -3235,7 +4959,7 @@ } } ], - "doc": "List of label keys to remove from the contact." + "doc": "List of label keys to remove from the contact.\n\nYou can use the `queryLabels()` function to view the currently existing labels.\n\n" } ], "docs": { @@ -3270,7 +4994,7 @@ } } ], - "doc": "List of label keys to add to the contact.\n\nLabel keys must exist to be added to the contact.\n Contact labels can be created or retrieved with\n [`findOrCreateLabel()`](wix-crm-v2/labels/findorcreatelabel)\n or\n [`queryLabels()`](wix-crm-v2/labels/queryLabels).\n" + "doc": "List of label keys applied to the contact.\n\nLabel keys must exist to be added to the contact.\nContact labels can be created with the\n`findOrCreateLabel()` function. You can use the\n `queryLabels()` function to view the currently existing labels.\n" }, { "name": "labelKeysToRemove", @@ -3286,7 +5010,7 @@ } } ], - "doc": "List of label keys to remove from the contact." + "doc": "List of label keys to remove from the contact.\n\nYou can use the `queryLabels()` function to view the currently existing labels.\n\n" } ], "docs": { @@ -3350,7 +5074,7 @@ } } ], - "doc": "List of label keys to add to the contact.\n\nLabel keys must exist to be added to the contact.\n Contact labels can be created or retrieved with\n [`findOrCreateLabel()`](wix-crm-v2/labels/findorcreatelabel)\n or\n [`queryLabels()`](wix-crm-v2/labels/queryLabels).\n" + "doc": "List of label keys to add to the contact.\n\nLabel keys must exist to be added to the contact.\nContact labels can be created with the\n`findOrCreateLabel()` function. You can use the\n `queryLabels()` function to view the currently existing labels.\n\n" } ], "docs": { @@ -3649,44 +5373,114 @@ } } ], - "doc": "List of facets." + "doc": "List of facets." + }, + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Contacts.PagingMetadata" + } + ], + "doc": "Details on the paged set of results returned." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "LocationsWrapper", + "members": [ + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of location ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MemberInfo", + "members": [ + { + "name": "groupInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Contacts.GroupInfo" + } + ], + "doc": "Group info. For more details see [here](https://github.com/wix-private/crm/blob/master/members-groups/api/src/main/proto/com/wixpress/members/groups/Groups.proto)" + }, + { + "name": "identityInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Contacts.IdentityInfo" + } + ], + "doc": "Identity info. For more details see [here](https://github.com/wix-private/identity/blob/master/iam/identity/identity-service/proto/wix/iam/identity/v1/identity.proto)" + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID. For more details see [here](https://github.com/wix-private/identity/blob/master/iam/memberid/proto/wix/iam/member/v1/member_id_service.proto)" + }, + { + "name": "profileInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Contacts.ProfileInfo" + } + ], + "doc": "Profile info. For more details see [here](https://github.com/wix-private/app-market/blob/master/members/members-profiles-api/proto/com/wixpress/members/profiles/profile.proto)" }, { - "name": "pagingMetadata", + "name": "sessionInfo", "optional": true, "type": [ { - "referenceType": "wix-crm-v2.Contacts.PagingMetadata" + "referenceType": "wix-crm-v2.Contacts.SessionInfo" } ], - "doc": "Details on the paged set of results returned." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "LocationsWrapper", - "members": [ + "doc": "Session info. For more details see [here](https://github.com/wix-private/identity/blob/master/iam/session/session-management/proto/wix/iam/session/v1/session.proto)" + }, { - "name": "items", + "name": "userInfo", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-crm-v2.Contacts.UserInfo" } ], - "doc": "List of location ids." + "doc": "User info. For more details see [here](https://dev.wix.com/docs/rest/internal-only/identity/user-member-connection-v1/user-member-connection-object)" } ], "docs": { @@ -4102,6 +5896,183 @@ ] } }, + { + "name": "PrimaryEmail", + "members": [ + { + "name": "deliverabilityStatus", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Indicates last reported status of sent emails.\n\n- `NOT_SET`: No status reported. Default.\n- `VALID`: Emails are being successfully delivered.\n- `BOUNCED`: The last email to the recipient bounced or was rejected.\n- `SPAM_COMPLAINT`: Recipient registered a spam complaint\nwith their email provider.\n- `INACTIVE`: Multiple emails have been delivered without any kind of engagement from the recipient." + }, + { + "name": "email", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`." + }, + { + "name": "subscriptionStatus", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Indicates the recipient's opt-in or opt-out status for marketing emails.\n\n- `NOT_SET`: No status specified. Default.\n- `PENDING`: Subscription confirmation was requested,\nbut recipient hasn't confirmed yet.\n- `SUBSCRIBED`: Recipient has opted in to marketing emails.\n- `UNSUBSCRIBED`: Recipient has opted out of marketing emails." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PrimaryPhone", + "members": [ + { + "name": "countryCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the primary phone." + }, + { + "name": "e164Phone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`,\nas long as both of those values are valid." + }, + { + "name": "formattedPhone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Formatted phone. Automatically generated using phone and countryCode." + }, + { + "name": "phone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`." + }, + { + "name": "subscriptionStatus", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Indicates the recipient's opt-in or opt-out status for SMS messages.\n\n- `NO_SUBSCRIPTION_STATUS`: No status exists. This is the status when the phone is not a valid E164 phone.\n- `NOT_SET`: No status specified. Default when the phone is a valid E164 phone.\n- `PENDING`: Subscription confirmation was requested,\nbut recipient hasn't confirmed yet.\n- `SUBSCRIBED`: Recipient has opted in to SMS messages.\n- `UNSUBSCRIBED`: Recipient has opted out of SMS messages." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PrimarySubscriptionStatus", + "members": [ + { + "name": "subscriptionStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "subscription status" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ProfileInfo", + "members": [ + { + "name": "nickname", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Nickname" + }, + { + "name": "privacyStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Privacy status" + }, + { + "name": "reported", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicate whether the member is reported" + }, + { + "name": "suspended", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicate whether the member is suspended" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Query", "members": [ @@ -4281,7 +6252,7 @@ "nativeType": "Object" } ], - "doc": "Only allowed fields:\n#info.extendedFields.emailSubscriptions.effectiveEmail ($exists)\n#info.extendedFields.emailSubscriptions.deliverabilityStatus ($eq, $ne, $in, $nin)\n#info.extendedFields.emailSubscriptions.subscriptionStatus ($eq, $ne, $in)" + "doc": "Only allowed fields:\n#info.extendedFields.emailSubscriptions.effectiveEmail ($exists)\n#info.extendedFields.emailSubscriptions.subscriptionStatus ($eq, $ne, $in, $nin)\n#info.extendedFields.emailSubscriptions.deliverabilityStatus ($eq, $ne, $in, $nin)" }, { "name": "language", @@ -4321,7 +6292,7 @@ "nativeType": "Object" } ], - "doc": "Only allowed fields:\n#info.extendedFields.emailSubscriptions.effectiveEmail ($exists)\n#info.extendedFields.emailSubscriptions.deliverabilityStatus ($eq, $ne, $in, $nin)\n#info.extendedFields.emailSubscriptions.subscriptionStatus ($eq, $ne, $in)" + "doc": "Only allowed fields:\n#info.extendedFields.emailSubscriptions.effectiveEmail ($exists)\n#info.extendedFields.emailSubscriptions.subscriptionStatus ($eq, $ne, $in, $nin)\n#info.extendedFields.emailSubscriptions.deliverabilityStatus ($eq, $ne, $in, $nin)" }, { "name": "language", @@ -4669,6 +6640,53 @@ ] } }, + { + "name": "SessionInfo", + "members": [ + { + "name": "lastMobileLogin", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Last mobile login" + }, + { + "name": "lastWebLogin", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Last web login" + }, + { + "name": "mobileAppNames", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of mobile apps that the member has ever logged in to" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Sorting", "members": [ @@ -4680,7 +6698,7 @@ "nativeType": "string" } ], - "doc": "Field to sort by.\n\nSupported properties:\n`createdDate`, `lastActivity.activityDate`, `primaryInfo.email`,\n`info.name.first`, `info.name.last`, `info.company`, `info.jobTitle`,\n`info.birthdate`\n" + "doc": "Field to sort by.\n\nSupported properties:\n`createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,\n`info.jobTitle`, `info.birthdate`\n" }, { "name": "order", @@ -4934,15 +6952,6 @@ } ], "doc": "Controls whether the call will succeed if the new contact information contains an email already used by another contact.\n\nIf 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.\n\nDefaults to `false`.\n" - }, - { - "name": "revision", - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Revision number.\nWhen updating, include the existing `revision`\nto prevent conflicting updates." } ], "docs": { @@ -4962,7 +6971,7 @@ "nativeType": "boolean" } ], - "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefaults to `false`.\n" + "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefault: `false`\n" }, { "name": "contactId", @@ -5066,6 +7075,36 @@ "" ] } + }, + { + "name": "UserInfo", + "members": [ + { + "name": "role", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User role" + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID" + } + ], + "docs": { + "description": [ + "" + ] + } } ] } diff --git a/wix-crm-v2/wix-crm-v2/Contacts/guides/contacts-intro.md b/wix-crm-v2/wix-crm-v2/Contacts/guides/contacts-intro.md new file mode 100644 index 0000000000..c970196651 --- /dev/null +++ b/wix-crm-v2/wix-crm-v2/Contacts/guides/contacts-intro.md @@ -0,0 +1,68 @@ +--- +title: Introduction +--- + +# Introduction + +  +
+ Developer Preview +
+ APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.
+
+ +  + + + +The Contacts API provides functionality for adding and managing contacts on your site. +When a new visitor shares contact information with your site, they're added to your Contact List. +You can then access their contact details using the API. + +A site visitor can become a contact through various methods, including but not limited to: + - Completing forms such as event registrations, membership sign-ups, customer support inquiries, or billing address submissions. + - Being manually added by a site collaborator. + - Engaging with 3rd-party integrations that leverage the Contacts API, for example, logging in with social media. +Learn more about how you can manage your [contact list](https://support.wix.com/en/article/about-your-contact-list). + + +With the Contacts API, you can: ++ [Create](wix-crm-v2/contacts/createcontact), [update](wix-crm-v2/contacts/updatecontact), and [remove](wix-crm-v2/contacts/deletecontact) contacts. ++ [Retrieve](wix-crm-v2/contacts/getcontact) contacts to access their contact information. ++ [Merge](wix-crm-v2/contacts/mergecontacts) duplicate contacts. ++ [Label](wix-crm-v2/contacts/labelcontact) and [unlabel](wix-crm-v2/contacts/unlabelcontact) contacts for categorization purposes. + + +## Before you begin + +It is important to note the following points before you begin to code: +- You can't label or unlabel a contact if the label does not yet exist. To create a label, use the [Labels API](wix-crm-v2/labels/introduction). +- Merging a contact is irreversible. +- Site members and collaborators can only be used as the target contact when merging contacts. + + +To use the Contacts API, import `{ contacts }` from the `wix-crm.v2` module. + +```javascript +import { contacts } from 'wix-crm.v2'; +``` + + +## Permissions information + +Functions in the Labels API are restricted and only run if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. + +
+

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

+
+ + +## Terminology + +- **Label:** A tag that enables site admins to organize and group contacts. +- **Extended field:** An additional property that store contact information. +- **Source contact:** A contact you intend to merge into a target contact. These contacts get deleted after being merged. +- **Target contact:** A contact that receives merged data from source contacts. \ No newline at end of file diff --git a/wix-crm-v2/wix-crm-v2/Events.service.json b/wix-crm-v2/wix-crm-v2/Events.service.json index ed376ae8a0..777e3481b1 100644 --- a/wix-crm-v2/wix-crm-v2/Events.service.json +++ b/wix-crm-v2/wix-crm-v2/Events.service.json @@ -40,21 +40,120 @@ ], "examples": [ { - "title": "onContactCreated example", + "title": "An event fired when a contact is created ", "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", "", - " export function wixContacts_onContactCreated(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "export function wixCrm_onContactCreated(event) {", + " const eventId = event.metadata.id;", + " const entityId = event.entity._id;", + " const lastName = event.entity.info.name.last;", + "}", "", - " " + "/* Full event object:", + " * {", + " * \"metadata\": {", + " * \"id\": \"7bdca23b-a89c-48a1-be76-6dcf46fc4edb\",", + " * \"entityId\": \"beeb8dc1-93d6-49f3-9389-18a9997f554f\",", + " * \"eventTime\": \"2024-01-10T10:30:27.479909037Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"entity\": {", + " * \"_id\": \"beeb8dc1-93d6-49f3-9389-18a9997f554f\",", + " * \"revision\": 1,", + " * \"source\": {", + " * \"sourceType\": \"ADMIN\"", + " * },", + " * \"_createdDate\": \"2024-01-10T10:30:27.447Z\",", + " * \"_updatedDate\": \"2024-01-10T10:30:27.447Z\",", + " * \"primaryInfo\": {", + " * \"email\": \"fforte@example.com\",", + " * \"phone\": \"646-446-4789\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2024-01-10T10:30:27.446Z\",", + " * \"activityType\": \"CONTACT_CREATED\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"Forrest\",", + " * \"last\": \"Forte\"", + " * },", + " * \"emails\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"fforte@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"c27570d4-fc36-4391-aeb4-216b65ebb5e9\"", + " * },", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"forrest.forte@example.com\",", + " * \"primary\": false,", + " * \"_id\": \"5377214c-d6da-4212-aa8b-2735f0ad71e7\"", + " * }", + " * ],", + " * \"phones\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-446-4789\",", + " * \"e164Phone\": \"+16464464789\",", + " * \"formattedPhone\": \"+1 646-446-4789\",", + " * \"primary\": true,", + " * \"_id\": \"412ccdb6-b5de-441f-ad9f-a32637357c98\"", + " * },", + " * {", + " * \"tag\": \"WORK\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"718-250-2680\",", + " * \"e164Phone\": \"+17182502680\",", + " * \"formattedPhone\": \"+1 718-250-2680\",", + " * \"primary\": false,", + " * \"_id\": \"90148d5d-4940-4761-9a30-6c677c92fa3e\"", + " * }", + " * ],", + " * \"addresses\": [", + " * { ", + " * \"_id\": \"19d2ab15-0c8e-4f2c-894a-eddaba1088cf\",", + " * \"tag\": \"BILLING\",", + " * \"address\": {", + " * \"formatted\": \"82 Howard Ave\\nNew York, New York 11598\\nUnited States\",", + " * \"subdivision\": \"US-NY\",", + " * \"city\": \"New York\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"11598\",", + " * \"addressLine1\": \"82 Howard Ave\"", + " * }", + " * }", + " * ],", + " * \"labelKeys\": [", + " * \"contacts.customers\"", + " * ],", + " * \"extendedFields\": {", + " * \"custom.age\": 43,", + " * \"invoices.vatId\": \"\",", + " * \"contacts.displayByFirstName\": \"Forrest Forte\",", + " * \"contacts.displayByLastName\": \"Forte Forrest\"", + " * }", + " * }", + " * }", + " * }", + " */", + "" ] } ] }, "isVeloEvent": true, - "syntaxName": "wixContacts_onContactCreated" + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixCrm_onContactCreated" }, { "name": "onContactDeleted", @@ -87,21 +186,40 @@ ], "examples": [ { - "title": "onContactDeleted example", + "title": "An event fired when a contact is deleted ", "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixCrm_onContactDeleted(event) {", + " const contactId = event.metadata.entityId;", + " console.log('Contact deleted', event);", + "}", "", - " export function wixContacts_onContactDeleted(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "/* Full event object:", + " * {", + " * \"metadata\": {", + " * \"id\": \"e252a78d-bd95-4aa2-b65f-91730da186fa\",", + " * \"entityId\": \"custom.customer-group-3\",", + " * \"eventTime\": \"2024-01-11T12:47:31.862945419Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * }", + " * }", + " */", "", - " " + "" ] } ] }, "isVeloEvent": true, - "syntaxName": "wixContacts_onContactDeleted" + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixCrm_onContactDeleted" }, { "name": "onContactMerged", @@ -134,21 +252,130 @@ ], "examples": [ { - "title": "onContactMerged example", + "title": "An event fired when a contact is merged ", "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixCrm_onContactMerged(event) {", + " const eventId = event.metadata.id;", + " const sourceContactIds = event.data.sourceContactIds;", + " const firstSourceContactId = event.data.sourceContactIds[0];", + " const targetContactId = event.data.targetContact._id;", + " const targetContactName = `${event.data.targetContact.info.name.first} ${event.data.targetContact.info.name.last}`;", "", - " export function wixContacts_onContactMerged(event) {", - " const eventId = event.metadata.id", - " const entityId = event.data.contact._id;", - " }", + " console.log('Target contact updated by merge', targetContactId);", + " console.log('Source contacts deleted by merge', sourceContactIds);", + "}", "", - " " + "/* Full event object:", + " * {", + " * \"metadata\": {", + " * \"id\": \"c6f09a37-8c03-469e-bfa8-9a40939cac66\",", + " * \"entityId\": \"87227cf7-4ed5-47c3-8261-795d16b6dc9f\",", + " * \"eventTime\": \"2024-01-14T10:26:38.848Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"data\": {", + " * \"sourceContactIds\": [", + " * \"2ca312b3-e850-465a-9991-c59c9c140919\"", + " * ],", + " * \"targetContactId\": \"527676cc-2f20-4318-a76f-07854e02be2c\",", + " * \"targetContact\": {", + " * \"revision\": 3,", + " * \"source\": {", + " * \"sourceType\": \"ADMIN\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2024-01-14T10:26:38.848Z\",", + " * \"activityType\": \"CONTACT_MERGED\"", + " * },", + " * \"primaryInfo\": {", + " * \"email\": \"j.jackson@example.com\",", + " * \"phone\": \"646-458-4589\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"Jeremy\",", + " * \"last\": \"Jackson\"", + " * },", + " * \"emails\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"j.jackson@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"dec280b7-a8dd-45bc-a7de-0da9166caf63\"", + " * }", + " * ]", + " * },", + " * \"phones\": {", + " * \"items\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-458-4589\",", + " * \"e164Phone\": \"+16464584589\",", + " * \"primary\": true,", + " * \"_id\": \"c40ef68a-2cc9-4ab0-adb4-97be64c57878\"", + " * },", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"IL\",", + " * \"phone\": \"55-334-3434\",", + " * \"e164Phone\": \"+972553343434\",", + " * \"primary\": false,", + " * \"_id\": \"caa48199-d40d-4c2e-9eec-ae9bdf8e4f35\"", + " * }", + " * ]", + " * },", + " * \"addresses\": {", + " * \"items\": [", + " * { ", + " * \"tag\": \"HOME\",", + " * \"address\": {", + " * \"formatted\": \"Israel\",", + " * \"country\":\"IL\"", + " * },", + " * \"_id\": \"6a2fd038-fa7a-486d-9230-e48bcea824bc\"", + " * }", + " * ]", + " * },", + " * \"labelKeys\": {", + " * \"items\": [", + " * \"custom.anonymous\"", + " * ]", + " * },", + " * \"extendedFields\": {", + " * \"items\": {", + " * \"contacts.displayByLastName\": \"Jackson Jeremy\",", + " * \"emailSubscriptions.effectiveEmail\": \"j.jackson@example.com\",", + " * \"custom.age\": 37,", + " * \"contacts.displayByFirstName\": \"Jeremy Jackson\"", + " * }", + " * }", + " * },", + " * \"_id\": \"527676cc-2f20-4318-a76f-07854e02be2c\",", + " * \"_createdDate\": \"2024-01-14T10:22:43.952Z\",", + " * \"_updatedDate\": \"2024-01-14T10:26:38.848Z\"", + " * }", + " * }", + " * } ", + " */", + "", + " " ] } ] }, "isVeloEvent": true, - "syntaxName": "wixContacts_onContactMerged" + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixCrm_onContactMerged" }, { "name": "onContactUpdated", @@ -181,21 +408,113 @@ ], "examples": [ { - "title": "onContactUpdated example", + "title": "An event fired when a contact is updated ", "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", "", - " export function wixContacts_onContactUpdated(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "export function wixCrm_onContactUpdated(event) {", + " const eventId = event.metadata.id;", + " const entityId = event.entity._id;", + " const lastName = event.entity.info.name.last;", + "}", "", - " " + "/* Full event object:", + " * {", + " * \"metadata\": {", + " * \"id\": \"7bdca23b-a89c-48a1-be76-6dcf46fc4edb\",", + " * \"entityId\": \"beeb8dc1-93d6-49f3-9389-18a9997f554f\",", + " * \"eventTime\": \"2024-01-10T11:28:27.479909037Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"entity\": {", + " * \"_id\": \"beeb8dc1-93d6-49f3-9389-18a9997f554f\",", + " * \"revision\": 2,", + " * \"source\": {", + " * \"sourceType\": \"ADMIN\"", + " * },", + " * \"_createdDate\": \"2024-01-10T10:30:27.447Z\",", + " * \"_updatedDate\": \"2024-01-10T11:28:27.447Z\",", + " * \"primaryInfo\": {", + " * \"email\": \"fforte@example.com\",", + " * \"phone\": \"646-446-4789\"", + " * },", + " * \"lastActivity\": {", + " * \"activityDate\": \"2024-01-10T11:28:27.446Z\",", + " * \"activityType\": \"CONTACT_UPDATED\"", + " * },", + " * \"info\": {", + " * \"name\": {", + " * \"first\": \"Franky\",", + " * \"last\": \"Forte\"", + " * },", + " * \"emails\": [", + " * {", + " * \"tag\": \"UNTAGGED\",", + " * \"email\": \"fforte@example.com\",", + " * \"primary\": true,", + " * \"_id\": \"c27570d4-fc36-4391-aeb4-216b65ebb5e9\"", + " * }", + " * ],", + " * \"phones\": [", + " * {", + " * \"tag\": \"MOBILE\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"646-446-4789\",", + " * \"e164Phone\": \"+16464464789\",", + " * \"formattedPhone\": \"+1 646-446-4789\",", + " * \"primary\": true,", + " * \"_id\": \"412ccdb6-b5de-441f-ad9f-a32637357c98\"", + " * },", + " * {", + " * \"tag\": \"WORK\",", + " * \"countryCode\": \"US\",", + " * \"phone\": \"718-250-2680\",", + " * \"e164Phone\": \"+17182502680\",", + " * \"formattedPhone\": \"+1 718-250-2680\",", + " * \"primary\": false,", + " * \"_id\": \"90148d5d-4940-4761-9a30-6c677c92fa3e\"", + " * }", + " * ],", + " * \"addresses\": [", + " * { ", + " * \"_id\": \"19d2ab15-0c8e-4f2c-894a-eddaba1088cf\",", + " * \"tag\": \"BILLING\",", + " * \"address\": {", + " * \"formatted\": \"82 Howard Ave\\nNew York, New York 11598\\nUnited States\",", + " * \"subdivision\": \"US-NY\",", + " * \"city\": \"New York\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"11598\",", + " * \"addressLine1\": \"82 Howard Ave\"", + " * }", + " * }", + " * ],", + " * \"labelKeys\": [", + " * \"contacts.customers\"", + " * ],", + " * \"extendedFields\": {", + " * \"invoices.vatId\": \"\",", + " * \"contacts.displayByFirstName\": \"Franky Forte\",", + " * \"contacts.displayByLastName\": \"Forte Franky\"", + " * }", + " * }", + " * }", + " * }", + " */", + "" ] } ] }, "isVeloEvent": true, - "syntaxName": "wixContacts_onContactUpdated" + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixCrm_onContactUpdated" }, { "name": "onLabelCreated", @@ -208,7 +527,7 @@ "displayName": "LabelCreated" } ], - "doc": "", + "doc": "Information about the task that was created and metadata for the event.\n", "required": false } ], @@ -222,18 +541,47 @@ "doc": null }, "docs": { - "description": [], + "summary": "An event that triggers when a new label is created.", + "description": [ + "The `onLabelCreated()` event handler runs when a new label is created. The received `LabelCreated` object contains information about the label that was created.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { - "title": "onLabelCreated example", + "title": "An event fired when a label is created ", "body": [ "", - " export function wixContacts_onLabelCreated(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixContacts_onLabelCreated(event) {", + " const eventId = event.metadata.id;", + " const entityId = event.entity._id;", + " const displayName = event.entity.displayNAme;", + " console.log('Label created', event);", + "}", "", - " " + "/* Full event object:", + " * { ", + " * \"metadata\": {", + " * \"id\": \"fee55184-82f3-47ba-bd53-fdbb5c7faf7a\",", + " * \"entityId\": \"custom.customer-group-3\",", + " * \"eventTime\": \"2024-01-11T12:36:09.707620304Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"entity\": {", + " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.customer-group-3\",", + " * \"displayName\": \"Customer Group 3\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"222e7d37-9795-45e2-a6ef-58a40981a43c\",", + " * \"_createdDate\": \"2024-01-11T12:36:09.702Z\",", + " * \"_updatedDate\": \"2024-01-11T12:36:09.702Z\"", + " * }", + " * }", + " */", + "" ] } ] @@ -257,7 +605,7 @@ "displayName": "LabelDeleted" } ], - "doc": "", + "doc": "Metadata for the event.\n", "required": false } ], @@ -271,18 +619,34 @@ "doc": null }, "docs": { - "description": [], + "summary": "An event that triggers when a label is deleted.", + "description": [ + "The `onLabelDeleted()` event handler runs when a label is deleted. The received `LabelDeleted` object contains metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { - "title": "onLabelDeleted example", + "title": "An event fired when a label is deleted ", "body": [ "", - " export function wixContacts_onLabelDeleted(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixContacts_onLabelDeleted(event) {", + " console.log('Label deleted', event);", + "}", "", - " " + "/* Full event object:", + " * {", + " * \"metadata\": {", + " * \"id\": \"64c54bac-5c9c-42b6-b43b-9143e6814b50\",", + " * \"entityId\": \"custom.customer-group-3\",", + " * \"eventTime\": \"2024-01-11T12:47:31.862945419Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * }", + " * }", + " */", + "" ] } ] @@ -306,7 +670,7 @@ "displayName": "LabelUpdated" } ], - "doc": "", + "doc": "Information about the task that was updated and metadata for the event.\n", "required": false } ], @@ -320,18 +684,46 @@ "doc": null }, "docs": { - "description": [], + "summary": "An event that triggers when a label is updated.", + "description": [ + "The `onLabelUpdated()` event handler runs when a label is updated. The received `LabelUpdated` object contains information about the label that was updated.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { - "title": "onLabelUpdated example", + "title": "An event fired when a label is updated ", "body": [ "", - " export function wixContacts_onLabelUpdated(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", "", - " " + "export function wixContacts_onLabelUpdated(event) {", + " const eventId = event.metadata.id;", + " const entityId = event.entity._id;", + " const displayName = event.entity.displayName;", + " console.log('Label updated', event);", + "}", + "", + "/* Full event object:", + " * {", + " * \"metadata\": {", + " * \"id\": \"a830a129-81af-47ed-b604-4e0f13ccb4cb\",", + " * \"entityId\": \"custom.customer-group-3\",", + " * \"eventTime\": \"2024-01-11T12:41:47.979883060Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"entity\": {", + " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.customer-group-3\",", + " * \"displayName\": \"Customer Group No. 3\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"222e7d37-9795-45e2-a6ef-58a40981a43c\",", + " * \"_createdDate\": \"2024-01-11T12:36:10.000Z\",", + " * \"_updatedDate\": \"2024-01-11T12:41:48.000Z\"", + " * }", + " * }", + " */" ] } ] @@ -343,9 +735,332 @@ } ], "syntaxName": "wixContacts_onLabelUpdated" + }, + { + "name": "onTaskCreated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTaskCreated", + "displayName": "TaskCreated" + } + ], + "doc": "Information about the task that was created and metadata for the event.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "An event that triggers when a new task is created.", + "description": [ + "The `onTaskCreated()` event handler runs when a new task is created. The received `TaskCreated` object contains information about the task that was created.\n\n>**Note:** Backend events don't work when previewing your site." + ], + "examples": [ + { + "title": "An event fired when a task is created ", + "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixCrmTasks_onTaskCreated(event) {", + " const eventId = event.metadata.id;", + " const entityId = event.entity._id;", + " const title = event.entity.title;", + " console.log('Task created', event);", + "}", + "", + "/* Full event object: ", + " * {", + " * \"metadata\": {", + " * \"id\": \"bd6c5959-5e88-4509-b7c3-fd17b41840eb\",", + " * \"entityId\": \"941ddd7a-5c3c-4bec-923e-fd6747f23e3f\",", + " * \"eventTime\": \"2024-01-21T06:52:40.743280247Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"entity\": {", + " * \"revision\": \"1\",", + " * \"title\": \"Send follow up email\",", + " * \"dueDate\": \"2024-01-31T10:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"USER\",", + " * \"userId\": \"162e6672-d392-42f8-bf79-999ee633c92a\"", + " * },", + " * \"_id\": \"941ddd7a-5c3c-4bec-923e-fd6747f23e3f\",", + " * \"_createdDate\": \"2024-01-21T06:52:40.738Z\",", + " * \"_updatedDate\": \"2024-01-21T06:52:40.738Z\"", + " * }", + " * }", + " */" + ] + } + ] + }, + "isVeloEvent": true, + "syntaxName": "wixCrmTasks_onTaskCreated" + }, + { + "name": "onTaskDeleted", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTaskDeleted", + "displayName": "TaskDeleted" + } + ], + "doc": "Metadata for the event.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "An event that triggers when a task is deleted.", + "description": [ + "The `onTaskDeleted()` event handler runs when a task is deleted. The received `TaskDeleted` object contains metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], + "examples": [ + { + "title": "An event fired when a task is deleted ", + "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixCrmTasks_onTaskDeleted(event) {", + " const eventId = event.metadata.entityId;", + " console.log('Task deleted', event);", + "}", + "", + "/* Full event object:", + " * {", + " * \"metadata\": {", + " * \"id\": \"9f6cc944-3204-46aa-a81f-4200159e8777\",", + " * \"entityId\": \"c68244a0-e68f-49ca-b38c-43a0323b47ca\",", + " * \"eventTime\": \"2024-01-21T06:53:43.861432102Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * }", + " * }", + " */", + "", + "", + "" + ] + } + ] + }, + "isVeloEvent": true, + "syntaxName": "wixCrmTasks_onTaskDeleted" + }, + { + "name": "onTaskOverdue", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTaskOverdueEvent", + "displayName": "TaskOverdueEvent" + } + ], + "doc": "Information about the task that's overdue and metadata for the event.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "An event that triggers when a task reaches its due date.", + "description": [ + "The `onTaskOverdue()` event handler runs when a task reaches its due date. The received `TaskOverdueEvent` object contains information about the task that was updated.\n\n>**Note:** Backend events don't work when previewing your site." + ], + "examples": [ + { + "title": "An event fired when a task reaches its due date ", + "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixCrmTasks_onTaskOverdue(event) {", + " const eventId = event.metadata.id;", + " const entityId = event.entity._id;", + " const title = event.entity.title;", + " console.log('Task overdue', event);", + "}", + "", + "/* Full event object: ", + " * {", + " * \"metadata\": {", + " * \"id\": \"f772aff2-2c04-4677-968b-2727635ec62c\",", + " * \"entityId\": \"f79fe92b-2482-4884-8cef-53e016506bf7\",", + " * \"eventTime\": \"2024-02-10T10:00:00.000Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"entity\": {", + " * \"revision\": \"2\",", + " * \"title\": \"Follow up\",", + " * \"dueDate\": \"2024-02-10T10:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"USER\",", + " * \"userId\": \"162e6672-d392-42f8-bf79-999ee633c92a\"", + " * },", + " * \"_id\": \"f79fe92b-2482-4884-8cef-53e016506bf7\",", + " * \"_createdDate\": \"2024-02-13T06:43:44.624Z\",", + " * \"_updatedDate\": \"2024-02-13T06:58:12.896Z\"", + " * }", + " * }", + " */" + ] + } + ] + }, + "isVeloEvent": true, + "syntaxName": "wixCrmTasks_onTaskOverdue" + }, + { + "name": "onTaskUpdated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTaskUpdated", + "displayName": "TaskUpdated" + } + ], + "doc": "Information about the task that was updated and metadata for the event.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "An event that triggers when a task is updated.", + "description": [ + "The `onTaskUpdated()` event handler runs when a task is updated. The received `TaskUpdated` object contains information about the task that was updated.\n\n>**Note:** Backend events don't work when previewing your site." + ], + "examples": [ + { + "title": "An event fired when a task is updated ", + "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixCrmTasks_onTaskUpdated(event) {", + " const eventId = event.metadata.id;", + " const entityId = event.entity._id;", + " const title = event.entity.title;", + " console.log('Task updated', event);", + "}", + "", + "/* Full event object: ", + " * {", + " * \"metadata\": {", + " * \"id\": \"ad02b9fa-ec28-48b8-b6f5-9921fbecd090\",", + " * \"entityId\": \"cdc52d55-e3e8-4fb4-8413-f15838e352b1\",", + " * \"eventTime\": \"2024-01-21T06:51:36.211546569Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"entity\": {", + " * \"revision\": \"2\",", + " * \"title\": \"Update Contact\",", + " * \"description\": \"Add new label to sontact\",", + " * \"dueDate\": \"2024-03-15T00:00:00.000Z\",", + " * \"status\": \"COMPLETED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Julie\",", + " * \"lastName\": \"Jones\",", + " * \"email\": \"julie.jones@example.com\",", + " * \"phone\": \"+1 516-569-2772\",", + " * \"_id\": \"719784da-0361-4f86-b4a4-b38409d7bce1\"", + " * },", + " * \"_id\": \"cdc52d55-e3e8-4fb4-8413-f15838e352b1\",", + " * \"_createdDate\": \"2024-01-18T13:46:18.198Z\",", + " * \"_updatedDate\": \"2024-01-21T06:51:36.203Z\"", + " * }", + " * }", + " */", + "" + ] + } + ] + }, + "isVeloEvent": true, + "syntaxName": "wixCrmTasks_onTaskUpdated" } ], "messages": [ + { + "name": "contactsV4ContactActivityIcon", + "members": [ + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Icon name" + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Icon url" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "contactsV4ContactAddress", "members": [ @@ -1212,17 +1927,6 @@ ], "doc": "Details about the contact's last action in the site." }, - { - "name": "picture", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's profile picture.\nThis can contain an image URL and a Wix Media image ID.\n\n> **Deprecation Notice:**\n> This property has been replaced with\n> `info.picture`\n> and will be removed on March 31, 2022. If your app uses this property,\n> we recommend updating your code as soon as possible." - }, { "name": "primaryInfo", "readOnly": true, @@ -1286,7 +1990,7 @@ "nativeType": "string" } ], - "doc": "Contact's last action in the site.\n\nSome possible values:\n\n`\"GENERAL\"`, `\"CONTACT_CREATED\"`, `\"MEMBER_LOGIN\"`, `\"MEMBER_REGISTER\"`,\n`\"MEMBER_STATUS_CHANGED\"`, `\"FORM_SUBMITTED\"`, `\"INBOX_FORM_SUBMITTED\"`,\n`\"INBOX_PAYMENT_REQUEST_PAID\"`, `\"INBOX_MESSAGE_TO_CUSTOMER\"`,\n`\"INBOX_MESSAGE_FROM_CUSTOMER\"`, `\"NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED\"`,\n`\"NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE\"`, `\"ECOM_PURCHASE\"`,\n`\"ECOM_CART_ABANDON\"`, `\"ECOM_CHECKOUT_BUYER\"`, `\"BOOKINGS_APPOINTMENT\"`,\n`\"HOTELS_RESERVATION\"`, `\"HOTELS_PURCHASE\"`, `\"HOTELS_CONFIRMATION\"`,\n`\"HOTELS_CANCEL\"`, `\"VIDEO_PURCHASE\"`, `\"VIDEO_RENT\"`,\n`\"CASHIER_BUTTON_PURCHASE\"`, `\"ARENA_NEW_LEAD\"`, `\"EVENTS_RSVP\"`,\n`\"INVOICE_PAY\"`, `\"INVOICE_OVERDUE\"`, `\"PRICE_QUOTE_ACCEPT\"`,\n`\"PRICE_QUOTE_EXPIRE\"`, `\"RESTAURANTS_ORDER\"`, `\"RESTAURANTS_RESERVATION\"`,\n`\"SHOUTOUT_OPEN\"`, `\"SHOUTOUT_CLICK\"`, `\"CONTACT_MERGED\"`.\n" + "doc": "Contact's last action in the site.\n\nSome possible values:\n\n`\"GENERAL\"`, `\"CONTACT_CREATED\"`, `\"MEMBER_LOGIN\"`, `\"MEMBER_REGISTER\"`,\n`\"MEMBER_STATUS_CHANGED\"`, `\"FORM_SUBMITTED\"`, `\"INBOX_FORM_SUBMITTED\"`,\n`\"INBOX_PAYMENT_REQUEST_PAID\"`, `\"INBOX_MESSAGE_TO_CUSTOMER\"`,\n`\"INBOX_MESSAGE_FROM_CUSTOMER\"`, `\"NEWSLETTER_SUBSCRIPTION_FORM_SUBMITTED\"`,\n`\"NEWSLETTER_SUBSCRIPTION_UNSUBSCRIBE\"`, `\"NEWSLETTER_SUBSCRIPTION_SUBSCRIBE\"`,\n`\"NEWSLETTER_SUBSCRIPTION_PENDING\"`, `\"NEWSLETTER_SUBSCRIPTION_NOT_SET\"`, `\"ECOM_PURCHASE\"`,\n`\"ECOM_CART_ABANDON\"`, `\"ECOM_CHECKOUT_BUYER\"`, `\"BOOKINGS_APPOINTMENT\"`,\n`\"HOTELS_RESERVATION\"`, `\"HOTELS_PURCHASE\"`, `\"HOTELS_CONFIRMATION\"`,\n`\"HOTELS_CANCEL\"`, `\"VIDEO_PURCHASE\"`, `\"VIDEO_RENT\"`,\n`\"CASHIER_BUTTON_PURCHASE\"`, `\"ARENA_NEW_LEAD\"`, `\"EVENTS_RSVP\"`,\n`\"INVOICE_PAY\"`, `\"INVOICE_OVERDUE\"`, `\"PRICE_QUOTE_ACCEPT\"`,\n`\"PRICE_QUOTE_EXPIRE\"`, `\"RESTAURANTS_ORDER\"`, `\"RESTAURANTS_RESERVATION\"`,\n`\"SHOUTOUT_OPEN\"`, `\"SHOUTOUT_CLICK\"`, `\"CONTACT_MERGED\",\n`\"PHONE_SUBSCRIPTION_SUBSCRIBE\"`, `\"PHONE_SUBSCRIPTION_PENDING\"`, `\"PHONE_SUBSCRIPTION_NOT_SET\"`,\n`\"PHONE_SUBSCRIPTION_UNSUBSCRIBE\"``.\n" } ], "docs": { @@ -1510,7 +2214,7 @@ "nativeType": "boolean" } ], - "doc": "Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`." + "doc": "Indicates whether this is the contact's primary email address.\nWhen changing `primary` to `true` for an email,\nthe contact's other emails become `false`.\nIt also affects the subscription status to marketing emails that are decided based on the primary email." }, { "name": "tag", @@ -1529,6 +2233,57 @@ ] } }, + { + "name": "contactsV4ContactContactEmailSubscriptionUpdated", + "members": [ + { + "name": "_updatedDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the contact was updated with the email subscription or deliverability status." + }, + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The updated contact ID." + }, + { + "name": "primaryEmail", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.contactsV4ContactPrimaryEmail", + "displayName": "PrimaryEmail" + } + ], + "doc": "The primary email of the contact with the updated subscription and deliverability status." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The revision of the contact." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "contactsV4ContactContactEmailsWrapper", "members": [ @@ -1611,7 +2366,7 @@ "displayName": "ExtendedFieldsWrapper" } ], - "doc": "Contact's\n[extended fields](wix-crm-backend/contacts/introduction#about-extended-fields),\nwhich allow you to store additional information about your contacts.\n\nTo view or create extended fields, use\n[`findOrCreateExtendedField()`](wix-crm-backend/contacts/findorcreateextendedfield),\n[`getExtendedField()`](wix-crm-backend/contacts/getextendedfield), or\n[`queryExtendedFields()`](wix-crm-backend/contacts/queryextendedfields).\n" + "doc": "Set of key-value pairs.\n\nContact's extended fields which allow you to store additional information about your contacts.\n\n To view or create extended fields, use\n`findOrCreateExtendedField()`,\n`getExtendedField()`, or\n`queryExtendedFields()` in the Extended Fields API.\n" }, { "name": "jobTitle", @@ -1632,7 +2387,7 @@ "displayName": "LabelsWrapper" } ], - "doc": "List of contact label keys.\n[Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)\nhelp categorize contacts.\n\nLabel keys must exist to be added to the contact.\nContact labels can be created or retrieved with\n[`findOrCreateLabel()`](wix-crm-backend/contacts/findorcreatelabel)\nor\n[`queryLabels()`](wix-crm-backend/contacts/queryLabels).\n" + "doc": "List of contact label keys.\n[Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)\nhelp categorize contacts.\n\nLabel keys must exist to be added to the contact.\nContact labels can be created or retrieved with\n[`findOrCreateLabel()`](wix-crm-v2/labels/findorcreatelabel)\nor\n[`queryLabels()`](wix-crm-v2/labels/queryLabels).\n" }, { "name": "locale", @@ -1825,7 +2580,7 @@ "nativeType": "string" } ], - "doc": "[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`,\nas long as both of those values are valid." + "doc": "[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`, pending both values are valid." }, { "name": "phone", @@ -1845,7 +2600,7 @@ "nativeType": "boolean" } ], - "doc": "Whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's other phones become `false`." + "doc": "Whether this is the contact's primary phone number.\nWhen changing `primary` to `true` for a phone,\nthe contact's `primary` field for other phones becomes `false`.\nIt also affects the subscription status to SMS messages that are decided based on the primary phone." }, { "name": "tag", @@ -1865,14 +2620,65 @@ } }, { - "name": "contactsV4ContactContactPhonesWrapper", + "name": "contactsV4ContactContactPhoneSubscriptionUpdated", "members": [ { - "name": "items", + "name": "_updatedDate", "optional": true, "type": [ { - "complexType": { + "nativeType": "Date" + } + ], + "doc": "Date and time the contact was updated with the SMS subscription status." + }, + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The updated contact ID." + }, + { + "name": "primaryPhone", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.contactsV4ContactPrimaryPhone", + "displayName": "PrimaryPhone" + } + ], + "doc": "The primary phone of the contact with the updated subscription status." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The revision of the contact." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "contactsV4ContactContactPhonesWrapper", + "members": [ + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { "nativeType": "Array", "typeParams": [ { @@ -1912,6 +2718,46 @@ ] } }, + { + "name": "contactsV4ContactContactPrimaryInfoUpdated", + "members": [ + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The updated contact ID." + }, + { + "name": "primaryEmailUpdated", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indication whether the primary email was updated." + }, + { + "name": "primaryPhoneUpdated", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indication whether primary phone was updated." + } + ], + "docs": { + "description": [ + "This message is an internal message used by this app and it is used to trigger\nthe update of the subscription status of the contact asynchronously.\nIt is published after a contact is created/updated/merged." + ] + } + }, { "name": "contactsV4ContactContactRemovedFromSegment", "members": [ @@ -1967,17 +2813,6 @@ } ], "doc": "Source type.\n\nSome possible values:\n`\"OTHER\"`, `\"ADMIN\"`, `\"WIX_APP\"`, `\"IMPORT\"`, `\"THIRD_PARTY\"`,\n`\"WIX_BOOKINGS\"`, `\"WIX_CHAT\"`, `\"WIX_EMAIL_MARKETING\"`, `\"WIX_EVENTS\"`,\n`\"WIX_FORMS\"`, `\"WIX_GROUPS\"`, `\"WIX_HOTELS\"`, `\"WIX_MARKET_PLACE\"`,\n`\"WIX_MUSIC\"`, `\"WIX_RESTAURANTS\"`, `\"WIX_SITE_MEMBERS\"`, `\"WIX_STORES\"`." - }, - { - "name": "wixAppId", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "App ID, if the contact was created by a Wix app.\n\n> **Deprecation Notice:**\n> This property has been replaced with\n> `appId`\n> and will be removed on March 31, 2022. If your app uses this property,\n> we recommend updating your code as soon as possible." } ], "docs": { @@ -2178,7 +3013,7 @@ "nativeType": "boolean" } ], - "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefaults to `false`.\n" + "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefault: `false`\n" }, { "name": "info", @@ -2376,186 +3211,6 @@ ] } }, - { - "name": "contactsV4ContactEstimateAudienceSizeRequest", - "members": [ - { - "name": "activeContactsOnly", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Should \"inactive\" contacts be excluded or not (default value \"false\")." - }, - { - "name": "contactIds", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Contact IDs of a campaign audience." - }, - { - "name": "contactsFilter", - "optional": true, - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "Contacts filter expression (json)." - }, - { - "name": "labelIds", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Label IDs of a campaign audience." - }, - { - "name": "resendCampaignId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Id of a campaign that is to be resent." - }, - { - "name": "search", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contacts plain text search expression (searches in name, phone and email fields)." - }, - { - "name": "segmentIds", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Segment ids of a campaign audience." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "contactsV4ContactEstimateAudienceSizeResponse", - "members": [ - { - "name": "estimation", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Audience size estimation." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "contactsV4ContactEstimateFilterSizeRequest", - "members": [ - { - "name": "activeContactsOnly", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Should \"inactive\" contacts be excluded or not (default value \"false\")." - }, - { - "name": "filter", - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "Contacts filter expression." - }, - { - "name": "search", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contacts plain text search expression (searches in name, phone and email fields)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "contactsV4ContactEstimateFilterSizeResponse", - "members": [ - { - "name": "estimation", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Mailing list size estimation." - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "contactsV4ContactExtendedFieldsWrapper", "members": [ @@ -3507,24 +4162,131 @@ } }, { - "name": "contactsV4ContactQuery", + "name": "contactsV4ContactPrimaryEmail", "members": [ { - "name": "fields", + "name": "deliverabilityStatus", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "List of projected fields to return.\nIf both `fields` and `fieldsets` are sent in the request,\nthe union of both lists is returned.\n`id` and `revision` are always returned.\n\nSupported properties:\n`source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n`info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n`info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n`info.labelKeys`, `info.locations`, `info.extendedFields`\n" + "doc": "Indicates last reported status of sent emails.\n\n- `NOT_SET`: No status reported. Default.\n- `VALID`: Emails are being successfully delivered.\n- `BOUNCED`: The last email to the recipient bounced or was rejected.\n- `SPAM_COMPLAINT`: Recipient registered a spam complaint\nwith their email provider.\n- `INACTIVE`: Multiple emails have been delivered without any kind of engagement from the recipient." + }, + { + "name": "email", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Primary email address.\n\nThis property reflects the email address in `info.emails`\nwhere `primary` is `true`." + }, + { + "name": "subscriptionStatus", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Indicates the recipient's opt-in or opt-out status for marketing emails.\n\n- `NOT_SET`: No status specified. Default.\n- `PENDING`: Subscription confirmation was requested,\nbut recipient hasn't confirmed yet.\n- `SUBSCRIBED`: Recipient has opted in to marketing emails.\n- `UNSUBSCRIBED`: Recipient has opted out of marketing emails." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "contactsV4ContactPrimaryPhone", + "members": [ + { + "name": "countryCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "[ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the primary phone." + }, + { + "name": "e164Phone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "[ITU E.164-formatted](https://www.itu.int/rec/T-REC-E.164/)\nphone number.\nAutomatically generated using `phone` and `countryCode`,\nas long as both of those values are valid." + }, + { + "name": "formattedPhone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Formatted phone. Automatically generated using phone and countryCode." + }, + { + "name": "phone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Primary phone number.\n\nThis property reflects the phone number in `info.phones`\nwhere `primary` is `true`." + }, + { + "name": "subscriptionStatus", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Indicates the recipient's opt-in or opt-out status for SMS messages.\n\n- `NO_SUBSCRIPTION_STATUS`: No status exists. This is the status when the phone is not a valid E164 phone.\n- `NOT_SET`: No status specified. Default when the phone is a valid E164 phone.\n- `PENDING`: Subscription confirmation was requested,\nbut recipient hasn't confirmed yet.\n- `SUBSCRIBED`: Recipient has opted in to SMS messages.\n- `UNSUBSCRIBED`: Recipient has opted out of SMS messages." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "contactsV4ContactQuery", + "members": [ + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of projected fields to return.\nIf both `fields` and `fieldsets` are sent in the request,\nthe union of both lists is returned.\n`id` and `revision` are always returned.\n\nSupported properties:\n`source`, `createdDate`, `updatedDate`, `lastActivity`, `primaryInfo`,\n`info.name`, `info.emails`, `info.phones`, `info.addresses`, `info.company`,\n`info.jobTitle`, `info.picture`, `info.birthdate`, `info.locale`,\n`info.labelKeys`, `info.locations`, `info.extendedFields`\n" }, { "name": "fieldsets", @@ -3670,7 +4432,7 @@ "nativeType": "Object" } ], - "doc": "Only allowed fields:\n#info.extendedFields.emailSubscriptions.effectiveEmail ($exists)\n#info.extendedFields.emailSubscriptions.deliverabilityStatus ($eq, $ne, $in, $nin)\n#info.extendedFields.emailSubscriptions.subscriptionStatus ($eq, $ne, $in)" + "doc": "Only allowed fields:\n#info.extendedFields.emailSubscriptions.effectiveEmail ($exists)\n#info.extendedFields.emailSubscriptions.subscriptionStatus ($eq, $ne, $in, $nin)\n#info.extendedFields.emailSubscriptions.deliverabilityStatus ($eq, $ne, $in, $nin)" }, { "name": "language", @@ -4019,7 +4781,7 @@ "nativeType": "string" } ], - "doc": "Field to sort by.\n\nSupported properties:\n`createdDate`, `lastActivity.activityDate`, `primaryInfo.email`,\n`info.name.first`, `info.name.last`, `info.company`, `info.jobTitle`,\n`info.birthdate`\n" + "doc": "Field to sort by.\n\nSupported properties:\n`createdDate`, `lastActivity.activityDate`, `primaryInfo.email`, `info.name.first`, `info.name.last`, `info.company`,\n`info.jobTitle`, `info.birthdate`\n" }, { "name": "order", @@ -4265,7 +5027,7 @@ "nativeType": "boolean" } ], - "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefaults to `false`.\n" + "doc": "Controls whether the call will succeed\nif the new contact information contains an email or a phone number already used by another contact.\n\nIf set to `true`,\nthe call will succeed even if an email address or phone number is used by another contact.\nIf set to `false`,\nthe call will fail if the given email address is used by another contact or,\nif the email address is not given and the given phone number is used by another contact.\n\nDefault: `false`\n" }, { "name": "contactId", @@ -4464,7 +5226,7 @@ "nativeType": "string" } ], - "doc": "Label key.\n\n`key` is generated when the label is created\nand cannot be modified, even if `displayName` changes." + "doc": "Label key.\n\n`key` is generated when the label is created.\nIt cannot be modified, even if `displayName` is updated." }, { "name": "labelType", @@ -4475,7 +5237,7 @@ "nativeType": "string" } ], - "doc": "Label type.\n\n- `SYSTEM`: The label is a default system label for the Contact List.\n- `USER_DEFINED`: The label was created by a site contributor or 3rd-party app.\n- `WIX_APP_DEFINED`: The label was created by a Wix app." + "doc": "Label type indicating how the label was created.\n\n- `SYSTEM`: Default system label for the Contact List.\n- `USER_DEFINED`: Label created by a site contributor or 3rd-party app.\n- `WIX_APP_DEFINED`: Label created by a Wix app." }, { "name": "namespace", @@ -4486,7 +5248,7 @@ "nativeType": "string" } ], - "doc": "Label namespace.\n\nLabels created by site contributors or 3rd-party apps\nare automatically assigned to the `custom` namespace." + "doc": "Label namespace.\n\nLabels created by site admins or 3rd-party apps\nare automatically assigned to the `custom` namespace." }, { "name": "namespaceDisplayName", @@ -4733,7 +5495,7 @@ "nativeType": "string" } ], - "doc": "Label key.\n\n`key` is generated when the label is created\nand cannot be modified, even if `displayName` changes.\n" + "doc": "Label key.\n\n`key` is generated when the label is created.\nIt cannot be modified, even if `displayName` is updated.\n" }, { "name": "language", @@ -4784,7 +5546,7 @@ "displayName": "ContactLabel" } ], - "doc": "" + "doc": "Created label." }, { "name": "metadata", @@ -4794,7 +5556,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -4814,7 +5576,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -4834,7 +5596,7 @@ "displayName": "ContactLabel" } ], - "doc": "" + "doc": "Updated label." }, { "name": "metadata", @@ -4844,7 +5606,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -5379,6 +6141,1687 @@ "Updated label." ] } + }, + { + "name": "crmTasksV2TaskActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskBackendEventMetadata", + "members": [ + { + "name": "entityId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event timestamp." + }, + { + "name": "id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event ID." + }, + { + "name": "triggeredByAnonymizeRequest", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskContactInfo", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the contact associated with the task." + }, + { + "name": "email", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's primary email." + }, + { + "name": "firstName", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's first name." + }, + { + "name": "imageUrl", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's image url." + }, + { + "name": "lastName", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's last name." + }, + { + "name": "phone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's primary phone." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskContactNotFoundError", + "members": [ + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCountTasksRequest", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter tasks to count. See [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/crm/tasks/task-v2/filter-and-sort) for supported filters.\n\nFilter tasks in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCountTasksResponse", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of tasks that match the provided filter." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCreateTaskRequest", + "members": [ + { + "name": "task", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "Task to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCreateTaskResponse", + "members": [ + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "The created task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskCursors", + "displayName": "Cursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCursorQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCursorQueryPagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCursorQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskDeleteCompletedTasksRequest", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "An optional filter of tasks to count. See 'queryTasks' for supported filter options." + }, + { + "name": "taskIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Optional list of tasks ids of the tasks to delete. If the list is not provided the filter is used." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskDeleteCompletedTasksResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskDeleteTaskRequest", + "members": [ + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the task to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskDeleteTaskResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskEmpty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskGetTaskRequest", + "members": [ + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the task to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskGetTaskResponse", + "members": [ + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "The retrieved task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskMoveTaskAfterRequest", + "members": [ + { + "name": "beforeTaskId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The task ID after which the moved task is positioned in the display.\nIf `beforeTaskId` is not provided, the moved task is positioned first in the display of tasks." + }, + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The task ID to move." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskMoveTaskAfterResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskPaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskPagingMetadataV2", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskCursors", + "displayName": "Cursors" + } + ], + "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "tooManyToCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag that indicates the server failed to calculate the `total` field." + }, + { + "name": "total", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskQueryTasksInternalRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskQueryV2", + "displayName": "QueryV2" + } + ], + "doc": "WQL expression" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskQueryTasksInternalResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskPagingMetadataV2", + "displayName": "PagingMetadataV2" + } + ], + "doc": "Details on the paged set of results returned." + }, + { + "name": "tasks", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ] + } + } + ], + "doc": "The retrieved Tasks" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskQueryTasksRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskCursorQuery", + "displayName": "CursorQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskQueryTasksResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskCursorPagingMetadata", + "displayName": "CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "tasks", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ] + } + } + ], + "doc": "The retrieved tasks." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskQueryV2", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned." + }, + { + "name": "fieldsets", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskPaging", + "displayName": "Paging" + } + ], + "doc": "Paging options to limit and skip the number of items." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfQueryV2PagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskQueryV2PagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskPaging", + "displayName": "Paging" + } + ], + "doc": "Paging options to limit and skip the number of items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskRepositionTask", + "members": [ + { + "name": "position", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The position of the last task that was re-positioned" + }, + { + "name": "taskId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The id of the last task that was re-positioned" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskSendTasksReminderRequest", + "members": [ + { + "name": "reminderType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The reminder type" + }, + { + "name": "taskIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Ids of the tasks to remind" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskSendTasksReminderResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskSorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTask", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the task was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Task ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the task was last updated." + }, + { + "name": "contact", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskContactInfo", + "displayName": "ContactInfo" + } + ], + "doc": "Information about the contact associated with the task." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the task." + }, + { + "name": "dueDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Due date for the task." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task." + }, + { + "name": "source", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTaskSource", + "displayName": "TaskSource" + } + ], + "doc": "Details about the task source." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Status of the task." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Title of the task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTaskAssigned", + "members": [ + { + "name": "assigneeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The id of the assignee" + }, + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "The task that was assigned" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTaskCreated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "Created task." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTaskDeleted", + "members": [ + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTaskNotFoundError", + "members": [ + { + "name": "taskId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The task id that was not found" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTaskOverdue", + "members": [ + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "The overdue task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTaskOverdueEvent", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTaskOverdue", + "displayName": "TaskOverdue" + } + ], + "doc": "Event data." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTaskSource", + "members": [ + { + "name": "appId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "App ID, if the task was created by an app." + }, + { + "name": "sourceType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type for how the task was created." + }, + { + "name": "userId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID, if the task was created by a user." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskTaskUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "Updated task." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskUpdateTaskRequest", + "members": [ + { + "name": "task", + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "Task to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "crmTasksV2TaskUpdateTaskResponse", + "members": [ + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Events.crmTasksV2TaskTask", + "displayName": "Task" + } + ], + "doc": "The updated task." + } + ], + "docs": { + "description": [ + "" + ] + } } ] } diff --git a/wix-crm-v2/wix-crm-v2/Events/guides/events-intro.md b/wix-crm-v2/wix-crm-v2/Events/guides/events-intro.md new file mode 100644 index 0000000000..3e21a8cea0 --- /dev/null +++ b/wix-crm-v2/wix-crm-v2/Events/guides/events-intro.md @@ -0,0 +1,32 @@ +--- +title: Introduction +--- + +# Introduction + +  + +
+ Developer Preview +
+ APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.
+
+ +  + + +Wix CRM events are fired in your site's backend when certain events related to site contacts occur in your site's backend. You can write event handlers that react to these events. Event handler functions receive data that corresponds to the event that has occurred. Use event handlers to create custom responses to contact related events. + +> **Note:** Backend events don't work when previewing your site. + +To add a CRM event handler, add an **events.js** file to the **Backend** section of your site if one does not already exist. All event handler functions for your site are defined in this file. + +Event handler functions are defined using the following pattern: +```javascript +export function _(event) { } +``` + +For example, an event handler that handles contact updates looks like this: +```javascript +export function wixCrm_onContactUpdated(event) { } +``` \ No newline at end of file diff --git a/wix-crm-v2/wix-crm-v2/ExtendedFields.service.json b/wix-crm-v2/wix-crm-v2/ExtendedFields.service.json index d00b230ae2..5734ba3fbd 100644 --- a/wix-crm-v2/wix-crm-v2/ExtendedFields.service.json +++ b/wix-crm-v2/wix-crm-v2/ExtendedFields.service.json @@ -44,25 +44,56 @@ "docs": { "summary": "Deletes an extended field.", "description": [ - "The `deleteExtendedField()` function returns a Promise that resolves when the specified extended field is deleted.\n\nWhen an extended field is deleted, any contact data stored in the field is permanently deleted as well.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can delete extended fields.\n\nThis function is not a universal function and runs only on the backend." + "The `deleteExtendedField()` function returns a Promise that resolves when the specified extended field is deleted.\n\nWhen an extended field is deleted, any contact data stored in the field is permanently deleted as well.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can delete extended fields." ], "examples": [ { - "title": "Delete an extended field ", + "title": "Delete an extended field (dashboard page code)", "body": [ "import { extendedFields } from 'wix-crm.v2';", "", - "export function myDeleteExtendedFieldFunction() {", - " const key = 'custom.event-name';", + "/* Sample key value: 'custom.nickname' */", "", - " return extendedFields.deleteExtendedField(key)", - " .then(() => {", - " console.log('Extended field deleted');", - " })", - " .catch((error) => {", - " console.error(error);", - " });", - "}" + "export async function myDeleteExtendedFieldFunction(key) {", + " ", + " try {", + " const extendedField = await extendedFields.deleteExtendedField(key); ", + " console.log('Extended field deleted.')", + " ", + " return extendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */" + ] + }, + { + "title": "Delete an extended field (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { extendedFields } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample key value: 'custom.nickname' */", + "", + "export const myDeleteExtendedFieldFunction = webMethod(Permissions.Anyone, async (key) => {", + " ", + " try {", + " const elevatedDeleteExtendedField = elevate(extendedFields.deleteExtendedField);", + " const extendedField = await elevatedDeleteExtendedField(key); ", + " console.log('Extended field deleted.')", + " ", + " return extendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to void */" ] } ] @@ -122,79 +153,150 @@ "docs": { "summary": "Retrieves a custom field with a given name, or creates one if it doesn't exist.", "description": [ - "The `findOrCreateExtendedField()` function returns a Promise that resolves when the specified custom field is found or created.\n\nSuccessful calls to `findOrCreateExtendedField()` always return an extended field, which can be passed to subsequent function calls.\n\nTo find an existing extended field without potentially creating a new one, use [`getExtendedField()`](#getextendedfield) or [`queryExtendedFields()`](#queryextendedfields).\n\n>**Note:** Only visitors with **Manage Contacts** permissions can find or create extended fields.\n\n\nThis function is not a universal function and runs only on the backend." + "The `findOrCreateExtendedField()` function returns a Promise that resolves when the specified custom field is found or created.\n\nSuccessful calls to `findOrCreateExtendedField()` always return an extended field, which can be passed to subsequent function calls.\n\nTo find an existing extended field without potentially creating a new one, use `getExtendedField()` or `queryExtendedFields()`.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can find or create extended fields.\n" ], "examples": [ { - "title": "Create an extended field ", + "title": "Create an extended field (dashboard page code)", "body": [ "import { extendedFields } from 'wix-crm.v2';", "", - "export function myFindOrCreateExtendedFieldFunction() {", - " const displayName = 'Last Contacted';", - " const dataType = 'DATE';", + "/* Sample displayName value: ", + " * ", + " * 'Age'", + " * ", + " * Sample dataType value: ", + " * ", + " * 'NUMBER'", + " */", "", - " return extendedFields.findOrCreateExtendedField(displayName, dataType)", - " .then((extendedField) => {", - " return extendedField;", - " })", - " .catch((error) => {", - " console.error(error);", - " });", + "export async function myCreateExtendedFieldFunction(displayName, dataType) {", + " ", + " try {", + " const newExtendedField = await extendedFields.findOrCreateExtendedField(displayName, dataType); ", + " console.log('Successfully created new extended field:', newExtendedField)", + " ", + " return newExtendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", "}", "", - "/*", - " * Promise that resolves to:", - " *", + "/* Promise resolves to:", " * {", " * \"field\": {", - " * \"_createdDate\": \"2021-01-19T23:18:16.550Z\",", - " * \"_updatedDate\": \"2021-01-19T23:18:16.550Z\"", " * \"namespace\": \"custom\",", - " * \"key\": \"custom.last-contacted\",", - " * \"displayName\": \"Last Contacted\",", - " * \"dataType\": \"DATE\",", + " * \"key\": \"custom.age\",", + " * \"displayName\": \"Age\",", + " * \"dataType\": \"NUMBER\",", " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"ed349d8c-b2bc-46a4-80d8-7632c6f50b00\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_double_27\",", + " * \"_createdDate\": \"2023-12-25T12:16:40.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:16:40.000Z\"", " * },", - " * \"newField\": true", + " * \"newField\": false", " * }", " */" ] }, + { + "title": "Create an extended field (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { extendedFields } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample displayName value: ", + " * ", + " * 'Age'", + " * ", + " * Sample dataType value: ", + " * ", + " * 'NUMBER'", + " */", + "", + "export const myCreateExtendedFieldFunction = webMethod(Permissions.Anyone, async (displayName, dataType) => {", + " ", + " try {", + " const elevatedCreateExtendedField = elevate(extendedFields.findOrCreateExtendedField);", + " const newExtendedField = await elevatedCreateExtendedField(displayName, dataType); ", + " console.log('Successfully created new extended field:', newExtendedField)", + " ", + " return newExtendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"field\": {", + " * \"namespace\": \"custom\",", + " * \"key\": \"custom.age\",", + " * \"displayName\": \"Age\",", + " * \"dataType\": \"NUMBER\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"ed349d8c-b2bc-46a4-80d8-7632c6f50b00\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_double_27\",", + " * \"_createdDate\": \"2023-12-25T12:16:40.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:16:40.000Z\"", + " * },", + " * \"newField\": false", + " * }", + " */", + "" + ] + }, { "title": "Find an extended field ", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { extendedFields } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", "", - "export function myFindOrCreateExtendedFieldFunction() {", - " const displayName = 'Last Contacted';", - " const dataType = 'DATE';", + "/* Sample displayName value: ", + " * ", + " * 'Nickname'", + " * ", + " * Sample dataType value: ", + " * ", + " * 'TEXT'", + " */", "", - " return extendedFields.findOrCreateExtendedField(displayName, dataType)", - " .then((extendedField) => {", - " return extendedField;", - " })", - " .catch((error) => {", - " console.error(error);", - " });", - "}", + "export const myFindExtendedFieldFunction = webMethod(Permissions.Anyone, async (displayName, dataType) => {", + " ", + " try {", + " const elevatedFindExtendedField = elevate(extendedFields.findOrCreateExtendedField);", + " const newExtendedField = await elevatedFindExtendedField(displayName, dataType); ", + " console.log('This extended field already exists.');", + " ", + " return newExtendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", "", "/*", " * Promise resolves to:", - " *", " * {", " * \"field\": {", - " * \"_createdDate\": \"2021-01-19T23:18:17Z\",", - " * \"_updatedDate\": \"2021-01-19T23:18:17Z\"", " * \"namespace\": \"custom\",", - " * \"key\": \"custom.last-contacted\",", - " * \"displayName\": \"Last Contacted\",", - " * \"dataType\": \"DATE\",", + " * \"key\": \"custom.nickname\",", + " * \"displayName\": \"Nickname\",", + " * \"dataType\": \"TEXT\",", " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"63408eaf-e3d0-43f3-afa5-942847d272a1\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_string_18\",", + " * \"_createdDate\": \"2023-12-25T12:21:42.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:22:25.000Z\"", " * },", " * \"newField\": false", " * }", - "*/" + " */" ] } ] @@ -238,40 +340,107 @@ "docs": { "summary": "Retrieves an extended field.", "description": [ - "The `getExtendedField()` function returns a Promise that resolves when the extended field is retrieved.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can retrieve extended fields.\n\nThis function is not a universal function and runs only on the backend." + "The `getExtendedField()` function returns a Promise that resolves when the extended field is retrieved.\n\n>**Note:** Only visitors with **Manage Contacts** permissions can retrieve extended fields." ], "examples": [ { - "title": "Get an extended field ", + "title": "Get a specified extended field (dashboard page code)", "body": [ "import { extendedFields } from 'wix-crm.v2';", "", - "export function myGetExtendedFieldFunction() {", - " const key = 'custom.event-name';", + "/* Sample key value: 'custom.nickname' */", "", - " return extendedFields.getExtendedField(key)", - " .then((extendedField) => {", - " return extendedField;", - " })", - " .catch((error) => {", - " console.error(error);", - " });", + "export async function myGetExtendedFieldFunction(key) {", + " ", + " try {", + " const extendedField = await extendedFields.getExtendedField(key); ", + " console.log('Successfully retrieved extended field:', extendedField);", + " ", + " return extendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", "}", "", "/*", " * Promise resolves to:", - " *", " * {", - " * \"_createdDate\": \"2021-01-19T21:41:39Z\",", - " * \"_updatedDate\": \"2021-01-19T21:41:39Z\"", " * \"namespace\": \"custom\",", - " * \"key\": \"custom.event-name\",", - " * \"displayName\": \"Event Name\",", + " * \"key\": \"custom.nickname\",", + " * \"displayName\": \"Nickname\",", " * \"dataType\": \"TEXT\",", " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"63408eaf-e3d0-43f3-afa5-942847d272a1\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_string_18\",", + " * \"_createdDate\": \"2023-12-25T12:21:42.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:22:25.000Z\"", " * }", " */" ] + }, + { + "title": "Get a specified extended field (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { extendedFields } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample key value: 'custom.nickname' */", + "", + "export const myGetExtendedFieldFunction = webMethod(Permissions.Anyone, async (key) => {", + " ", + " try {", + " const elevatedGetExtendedField = elevate(extendedFields.getExtendedField);", + " const extendedField = await elevatedGetExtendedField(key); ", + " console.log('Successfully retrieved extended field:', extendedField);", + " ", + " return extendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/*", + " * Promise resolves to:", + " * {", + " * \"namespace\": \"custom\",", + " * \"key\": \"custom.nickname\",", + " * \"displayName\": \"Nickname\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"63408eaf-e3d0-43f3-afa5-942847d272a1\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_string_18\",", + " * \"_createdDate\": \"2023-12-25T12:21:42.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:22:25.000Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Get the dataType for the specified extended field ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { extendedFields } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "export const myGetExtendedFieldFunction = webMethod(Permissions.Anyone, async (key) => {", + " try {", + " const elevatedGetExtendedField = elevate(extendedFields.getExtendedField);", + " const extendedField = await elevatedGetExtendedField(key); ", + " const nicknameType = extendedField.dataType;", + " ", + " return nicknameType", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "// Return value: \"TEXT\"" + ] } ] }, @@ -300,20 +469,22 @@ "summary": "Creates a query to retrieve a list of extended fields.", "description": [ "", - "The `queryExtendedFields()` function builds a query to retrieve a list of extended fields and returns an [`FieldsQueryBuilder`](#fieldsquerybuilder) object.", + "The `queryExtendedFields()` function builds a query to retrieve a list of extended fields and returns an `FieldsQueryBuilder` object.", "", - "The returned object contains the query definition, which is used to run the query using the [`find()`](#fieldsquerybuilder/find) function.", + "The returned object contains the query definition, which is used to run the query using the `find()` function.", "", "You can refine the query by chaining `FieldsQueryBuilder` functions onto the query. `FieldsQueryBuilder` functions enable you to filter, sort, and control the results that `queryExtendedFields()` returns. ", "", "`queryExtendedFields()` runs with these `FieldsQueryBuilder` defaults, which you can override:", - "- [`skip()`](#fieldsquerybuilder/skip)", - "- [`limit(50)`](#fieldsquerybuilder/limit)", - "- [`descending('_createdDate')`](#fieldsquerybuilder/descending)", + "- `skip()`", + "- `limit(50)`", + "- `descending('_createdDate')`", "", "> **Note:** Only visitors with **Manage Contacts** permissions can query extended fields.", "", - "The following `FieldsQueryBuilder` functions are supported for `queryExtendedFields()`. For a full description of the `Extended Field` object, see the object returned for the [`items`](#fieldsqueryresult/items) property in [`FieldsQueryResult`](#fieldsqueryresult).", + "The following `FieldsQueryBuilder` functions are supported for `queryExtendedFields()`. For a full description of the `Extended Field` object, see the object returned for the `items` property in `FieldsQueryResult`.", + "", + "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", "|`namespace`|[`eq()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#eq),[`ne()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ne)|", @@ -321,20 +492,20 @@ "|`displayName`|[`eq()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#eq),[`ne()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ne),[`in()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#in),[`startsWith()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#startsWith),[`ascending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ascending),[`descending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#descending)|", "|`dataType`|[`eq()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#eq),[`ne()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ne)|", "|`fieldType`|[`eq()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#eq)|", - "|`_createdDate`|[`eq()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#eq),[`ne()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ne),[`gt()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#gt),[`lt()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#lt),[`le()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#le),[`ascending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ascending),[`descending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#descending)|", - "|`_updatedDate`|[`eq()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#eq),[`ne()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ne),[`gt()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#gt),[`lt()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#lt),[`le()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#le),[`ascending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ascending),[`descending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#descending)|" + "|`_createdDate`|[`eq()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#eq),[`ne()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ne),[`gt()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#gt),[`lt()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#lt),[`ge()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ge),[`le()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#le),[`ascending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ascending),[`descending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#descending)|", + "|`_updatedDate`|[`eq()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#eq),[`ne()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ne),[`gt()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#gt),[`lt()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#lt),[`ge()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ge),[`le()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#le),[`ascending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#ascending),[`descending()`](wix-crm-v2.ExtendedFields.FieldsQueryBuilder#descending)|" ], "examples": [ { - "title": "Retrieve all extended fields ", + "title": "Retrieve all extended fields (dashboard page code)", "body": [ "import { extendedFields } from 'wix-crm.v2';", "", - "export function myQueryExtendedFieldsFunction() {", + "export async function myQueryExtendedFieldsFunction() {", + " ", " try {", - "", - " const queryResults = extendedFields.queryExtendedFields()", - " .find();", + " const queryResults = await extendedFields.queryExtendedFields()", + " .find();", "", " const items = queryResults.items;", " const firstItem = items[0];", @@ -343,11 +514,10 @@ " const hasPrev = queryResults.hasPrev();", " const length = queryResults.length;", " const query = queryResults.query;", + " console.log('Retrieved items:', items);", "", " return items;", - "", " } catch (error) {", - "", " console.error(error);", " // Handle the error", "", @@ -357,258 +527,551 @@ "/* Returns items:", " * [", " * {", - " * \"_createdDate\": \"2021-03-30T12:41:13.000Z\",", - " * \"_updatedDate\": \"2021-03-30T12:41:13.000Z\",", - " * \"displayName\": \"Event we met at\",", - " * \"key\": \"custom.event-we-met-at\",", - " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"custom\",", - " * \"fieldType\": \"USER_DEFINED\"", - " * },", - " * {", - " * \"_createdDate\": \"2021-01-19T23:18:17.000Z\",", - " * \"_updatedDate\": \"2021-01-19T23:18:17.000Z\",", - " * \"displayName\": \"Last Contacted\",", - " * \"key\": \"custom.last-contacted\",", - " * \"dataType\": \"DATE\",", " * \"namespace\": \"custom\",", - " * \"fieldType\": \"USER_DEFINED\"", + " * \"key\": \"custom.nickname\",", + " * \"displayName\": \"Nickname\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"63408eaf-e3d0-43f3-afa5-942847d272a1\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_string_18\",", + " * \"_createdDate\": \"2023-12-25T12:21:42.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:22:25.000Z\"", " * },", " * {", - " * \"_createdDate\": \"2021-01-17T18:42:31.000Z\",", - " * \"_updatedDate\": \"2021-01-17T18:42:31.000Z\",", - " * \"displayName\": \"Patronus\",", - " * \"key\": \"custom.patronus\",", - " * \"dataType\": \"TEXT\",", " * \"namespace\": \"custom\",", - " * \"fieldType\": \"USER_DEFINED\"", + " * \"key\": \"custom.age\",", + " * \"displayName\": \"Age\",", + " * \"dataType\": \"NUMBER\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"ed349d8c-b2bc-46a4-80d8-7632c6f50b00\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_double_27\",", + " * \"_createdDate\": \"2023-12-25T12:16:40.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:16:40.000Z\"", " * },", " * {", - " * \"displayName\": \"Display Name (start with first)\",", + " * \"namespace\": \"contacts\",", " * \"key\": \"contacts.displayByFirstName\",", - " * \"description\": \"Display name starting with first name (read only)\",", + " * \"displayName\": \"Display Name (start with first)\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"contacts\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Display name starting with first name (read only)\"", " * },", " * {", - " * \"displayName\": \"Display Name (start with last)\",", + " * \"namespace\": \"contacts\",", " * \"key\": \"contacts.displayByLastName\",", - " * \"description\": \"Display name starting with last name (read only)\",", + " * \"displayName\": \"Display Name (start with last)\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"contacts\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Display name starting with last name (read only)\"", " * },", " * {", - " * \"displayName\": \"VAT ID\",", + " * \"namespace\": \"invoices\",", " * \"key\": \"invoices.vatId\",", - " * \"description\": \"Vat ID for Wix Invoices\",", + " * \"displayName\": \"VAT ID\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"invoices\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Vat ID for Wix Invoices\"", " * },", " * {", - " * \"displayName\": \"Membership Status\",", + " * \"namespace\": \"members\",", " * \"key\": \"members.membershipStatus\",", - " * \"description\": \"APPROVED/DENIED/PENDING/INACTIVE (read only)\",", + " * \"displayName\": \"Membership Status\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"members\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"APPROVED/DENIED/PENDING/INACTIVE/OFFLINE_ONLY (read only)\"", " * },", " * {", - " * \"displayName\": \"Mobile flag\",", + " * \"namespace\": \"members\",", " * \"key\": \"members.mobile\",", - " * \"description\": \"true/false\",", + " * \"displayName\": \"Mobile flag\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"members\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"true/false\"", " * },", " * {", - " * \"displayName\": \"# of Purchases\",", + " * \"namespace\": \"ecom\",", " * \"key\": \"ecom.numOfPurchases\",", - " * \"description\": \"Wix Stores purchase count (read only)\",", + " * \"displayName\": \"# of Purchases\",", " * \"dataType\": \"NUMBER\",", - " * \"namespace\": \"ecom\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores purchase count (read only)\"", " * },", " * {", - " * \"displayName\": \"Total Spent Amount\",", + " * \"namespace\": \"ecom\",", " * \"key\": \"ecom.totalSpentAmount\",", - " * \"description\": \"Wix Stores aggregated spent amount (read only)\",", + " * \"displayName\": \"Total Spent Amount\",", " * \"dataType\": \"NUMBER\",", - " * \"namespace\": \"ecom\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores aggregated spent amount (read only)\"", " * },", " * {", - " * \"displayName\": \"Total Spent Currency\",", + " * \"namespace\": \"ecom\",", " * \"key\": \"ecom.totalSpentCurrency\",", - " * \"description\": \"Wix Stores currency code (read only)\",", + " * \"displayName\": \"Total Spent Currency\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"ecom\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores currency code (read only)\"", " * },", " * {", - " * \"displayName\": \"Last Purchase Date\",", + " * \"namespace\": \"ecom\",", " * \"key\": \"ecom.lastPurchaseDate\",", - " * \"description\": \"Wix Stores last purchase date (read only)\",", + " * \"displayName\": \"Last Purchase Date\",", " * \"dataType\": \"DATE\",", - " * \"namespace\": \"ecom\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores last purchase date (read only)\"", " * },", " * {", - " * \"displayName\": \"Effective Subscription Status\",", + " * \"namespace\": \"emailSubscriptions\",", " * \"key\": \"emailSubscriptions.subscriptionStatus\",", - " * \"description\": \"SUBSCRIBED/UNSUBSCRIBED/NOT_SET/PENDING (read only)\",", + " * \"displayName\": \"Effective Subscription Status\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"emailSubscriptions\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"SUBSCRIBED/UNSUBSCRIBED/NOT_SET/PENDING (read only)\"", " * },", " * {", - " * \"displayName\": \"Effective Deliverability Status\",", + " * \"namespace\": \"emailSubscriptions\",", " * \"key\": \"emailSubscriptions.deliverabilityStatus\",", - " * \"description\": \"VALID/BOUNCED/SPAM_COMPLAINT/INACTIVE (read only)\",", + " * \"displayName\": \"Effective Deliverability Status\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"emailSubscriptions\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"VALID/BOUNCED/SPAM_COMPLAINT/INACTIVE (read only)\"", " * },", " * {", - " * \"displayName\": \"Effective Email\",", + " * \"namespace\": \"emailSubscriptions\",", " * \"key\": \"emailSubscriptions.effectiveEmail\",", - " * \"description\": \"Effective Email for subscription purposes (read only)\",", + " * \"displayName\": \"Effective Email\",", " * \"dataType\": \"TEXT\",", - " * \"namespace\": \"emailSubscriptions\",", - " * \"fieldType\": \"SYSTEM\"", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Effective Email for subscription purposes (read only)\"", " * }", " * ]", " */" ] - } - ] - }, - "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], - "syntaxName": "queryExtendedFields", - "isAdminMethod": true - }, - { - "name": "renameExtendedField", - "params": [ - { - "name": "key", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Extended field key.\n\nWhen accessing contact data,\nextended field values are available at `fields[key]`.\nFor example, if the key is \"custom.notes\",\nthe value can be accessed at `fields[\"custom.notes\"]`.\n\nOnce set, `key` cannot be modified, even if `displayName` changes.", - "required": true - }, - { - "name": "field", - "type": [ - { - "referenceType": "wix-crm-v2.ExtendedFields.RenameExtendedField" - } - ], - "doc": "Extended field display name to rename.", - "required": true - } - ], - "requiredFields": [ - "field", - "field.displayName", - "key" - ], - "ret": { - "type": [ - { - "complexType": { - "nativeType": "Promise", - "typeParams": [ - { - "referenceType": "wix-crm-v2.ExtendedFields.ExtendedField" - } - ] - } - } - ], - "doc": "Updated extended field.\n" - }, - "docs": { - "summary": "Renames an extended field.", - "description": [ - "The `renameExtendedField()` function returns a Promise that resolves when the specified extended field's display name is changed\n\n> **Note:** Only visitors with **Manage Contacts** permissions can rename extended fields.\n\nThis function is not a universal function and runs only on the backend." - ], - "examples": [ + }, { - "title": "Rename an extended field ", + "title": "Retrieve all extended fields (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { extendedFields } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", "", - "export function myRenameExtendedFieldFunction() {", - " const key = 'custom.event-venue';", - " const field = {", - " displayName: 'Event Location'", - " };", "", - " return extendedFields.renameExtendedField(key, field)", - " .then((renamedExtendedField) => {", - " return renamedExtendedField;", - " })", - " .catch((error) => {", - " console.error(error);", - " });", - "}", + "export const myQueryExtendedFieldsFunction = webMethod(Permissions.Anyone, async () => {", + " ", + " try {", + " const elevatedQueryExtendedFields = elevate(extendedFields.queryExtendedFields);", + " const queryResults = await elevatedQueryExtendedFields()", + " .find();", "", - "/* Promise resolves to:", - " *", - " * {", - " * \"_createdDate\": \"2021-01-19T22:06:34Z\",", - " * \"_updatedDate\": \"2021-01-20T18:54:14Z\"", - " * \"namespace\": \"custom\",", - " * \"key\": \"custom.event-venue\",", - " * \"displayName\": \"Event Location\",", - " * \"dataType\": \"TEXT\",", - " * \"fieldType\": \"USER_DEFINED\",", - " * }", - " */" - ] - } - ] - }, - "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], - "syntaxName": "renameExtendedField", - "isAdminMethod": true - } - ], - "messages": [ - { - "name": "DeleteExtendedFieldRequest", - "members": [ - { - "name": "key", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Extended field key." - } - ], - "docs": { - "description": [ - "" - ] - } + " const items = queryResults.items;", + " const firstItem = items[0];", + " const pageSize = queryResults.pageSize;", + " const hasNext = queryResults.hasNext();", + " const hasPrev = queryResults.hasPrev();", + " const length = queryResults.length;", + " const query = queryResults.query;", + " console.log('Retrieved items:', items);", + "", + " return items;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + "", + " }", + "});", + "", + "/* Returns items:", + " * [", + " * {", + " * \"namespace\": \"custom\",", + " * \"key\": \"custom.nickname\",", + " * \"displayName\": \"Nickname\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"63408eaf-e3d0-43f3-afa5-942847d272a1\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_string_18\",", + " * \"_createdDate\": \"2023-12-25T12:21:42.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:22:25.000Z\"", + " * },", + " * {", + " * \"namespace\": \"custom\",", + " * \"key\": \"custom.age\",", + " * \"displayName\": \"Age\",", + " * \"dataType\": \"NUMBER\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"ed349d8c-b2bc-46a4-80d8-7632c6f50b00\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_double_27\",", + " * \"_createdDate\": \"2023-12-25T12:16:40.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:16:40.000Z\"", + " * },", + " * {", + " * \"namespace\": \"contacts\",", + " * \"key\": \"contacts.displayByFirstName\",", + " * \"displayName\": \"Display Name (start with first)\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Display name starting with first name (read only)\"", + " * },", + " * {", + " * \"namespace\": \"contacts\",", + " * \"key\": \"contacts.displayByLastName\",", + " * \"displayName\": \"Display Name (start with last)\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Display name starting with last name (read only)\"", + " * },", + " * {", + " * \"namespace\": \"invoices\",", + " * \"key\": \"invoices.vatId\",", + " * \"displayName\": \"VAT ID\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Vat ID for Wix Invoices\"", + " * },", + " * {", + " * \"namespace\": \"members\",", + " * \"key\": \"members.membershipStatus\",", + " * \"displayName\": \"Membership Status\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"APPROVED/DENIED/PENDING/INACTIVE/OFFLINE_ONLY (read only)\"", + " * },", + " * {", + " * \"namespace\": \"members\",", + " * \"key\": \"members.mobile\",", + " * \"displayName\": \"Mobile flag\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"true/false\"", + " * },", + " * {", + " * \"namespace\": \"ecom\",", + " * \"key\": \"ecom.numOfPurchases\",", + " * \"displayName\": \"# of Purchases\",", + " * \"dataType\": \"NUMBER\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores purchase count (read only)\"", + " * },", + " * {", + " * \"namespace\": \"ecom\",", + " * \"key\": \"ecom.totalSpentAmount\",", + " * \"displayName\": \"Total Spent Amount\",", + " * \"dataType\": \"NUMBER\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores aggregated spent amount (read only)\"", + " * },", + " * {", + " * \"namespace\": \"ecom\",", + " * \"key\": \"ecom.totalSpentCurrency\",", + " * \"displayName\": \"Total Spent Currency\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores currency code (read only)\"", + " * },", + " * {", + " * \"namespace\": \"ecom\",", + " * \"key\": \"ecom.lastPurchaseDate\",", + " * \"displayName\": \"Last Purchase Date\",", + " * \"dataType\": \"DATE\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores last purchase date (read only)\"", + " * },", + " * {", + " * \"namespace\": \"emailSubscriptions\",", + " * \"key\": \"emailSubscriptions.subscriptionStatus\",", + " * \"displayName\": \"Effective Subscription Status\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"SUBSCRIBED/UNSUBSCRIBED/NOT_SET/PENDING (read only)\"", + " * },", + " * {", + " * \"namespace\": \"emailSubscriptions\",", + " * \"key\": \"emailSubscriptions.deliverabilityStatus\",", + " * \"displayName\": \"Effective Deliverability Status\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"VALID/BOUNCED/SPAM_COMPLAINT/INACTIVE (read only)\"", + " * },", + " * {", + " * \"namespace\": \"emailSubscriptions\",", + " * \"key\": \"emailSubscriptions.effectiveEmail\",", + " * \"displayName\": \"Effective Email\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Effective Email for subscription purposes (read only)\"", + " * }", + " * ]", + " */", + "" + ] + }, + { + "title": "Retrieve extended fields with specified type ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { extendedFields } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "export const myQueryExtendedFieldsFunction = webMethod(Permissions.Anyone, async () => {", + " try {", + " const elevatedQueryExtendedFields = elevate(extendedFields.queryExtendedFields);", + " const queryResults = await elevatedQueryExtendedFields()", + " .eq(\"dataType\", \"NUMBER\")", + " .find();", + "", + " const items = queryResults.items;", + " const firstItem = items[0];", + " const pageSize = queryResults.pageSize;", + " const hasNext = queryResults.hasNext();", + " const hasPrev = queryResults.hasPrev();", + " const length = queryResults.length;", + " const query = queryResults.query;", + " console.log('Retrieved items:', items);", + "", + " return items;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + "", + " }", + "});", + "", + "/* Returns items:", + " * [", + " * {", + " * \"namespace\": \"custom\",", + " * \"key\": \"custom.age\",", + " * \"displayName\": \"Age\",", + " * \"dataType\": \"NUMBER\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"ed349d8c-b2bc-46a4-80d8-7632c6f50b00\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_double_27\",", + " * \"_createdDate\": \"2023-12-25T12:16:40.000Z\",", + " * \"_updatedDate\": \"2023-12-25T12:16:40.000Z\"", + " * },", + " * {", + " * \"namespace\": \"ecom\",", + " * \"key\": \"ecom.numOfPurchases\",", + " * \"displayName\": \"# of Purchases\",", + " * \"dataType\": \"NUMBER\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores purchase count (read only)\"", + " * },", + " * {", + " * \"namespace\": \"ecom\",", + " * \"key\": \"ecom.totalSpentAmount\",", + " * \"displayName\": \"Total Spent Amount\",", + " * \"dataType\": \"NUMBER\",", + " * \"fieldType\": \"SYSTEM\",", + " * \"description\": \"Wix Stores aggregated spent amount (read only)\"", + " * }", + " * ]", + "*/", + "" + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "queryExtendedFields", + "isAdminMethod": true + }, + { + "name": "renameExtendedField", + "params": [ + { + "name": "key", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Extended field key.\n\nWhen accessing contact data,\nextended field values are available at `fields[key]`.\nFor example, if the key is \"custom.notes\",\nthe value can be accessed at `fields[\"custom.notes\"]`.\n\nOnce set, `key` cannot be modified, even if `displayName` changes.", + "required": true + }, + { + "name": "field", + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.RenameExtendedField" + } + ], + "doc": "Extended field to rename.", + "required": true + } + ], + "requiredFields": [ + "field", + "field.displayName", + "key" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.ExtendedField" + } + ] + } + } + ], + "doc": "Updated extended field.\n" + }, + "docs": { + "summary": "Renames an extended field.", + "description": [ + "The `renameExtendedField()` function returns a Promise that resolves when the specified extended field's display name is changed\n\n> **Note:** Only visitors with **Manage Contacts** permissions can rename extended fields." + ], + "examples": [ + { + "title": "Rename an extended field (dashboard page code)", + "body": [ + "import { extendedFields } from 'wix-crm.v2';", + "", + "/* Sample key value: ", + " * ", + " * 'custom.nickname'", + " * ", + " * Sample field value: ", + " * {", + " * 'Contact Nickname'", + " * }", + " */", + "", + "export async function myRenameExtendedFieldFunction(key, field) {", + " ", + " try {", + " const renamedExtendedField = await extendedFields.renameExtendedField(key, field); ", + " console.log('Successfulyl renamed extendedField:', renamedExtendedField);", + " ", + " return renamedExtendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"namespace\": \"custom\",", + " * \"key\": \"custom.nickname\",", + " * \"displayName\": \"Contact Nickname\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"63408eaf-e3d0-43f3-afa5-942847d272a1\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_string_18\",", + " * \"_createdDate\": \"2023-12-25T12:21:42.000Z\",", + " * \"_updatedDate\": \"2023-12-25T13:25:35.000Z\"", + " * }", + " */" + ] + }, + { + "title": "Rename an extended field (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { extendedFields } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample key value: ", + " * ", + " * 'custom.nickname'", + " * ", + " * Sample field value: ", + " * {", + " * 'Contact Nickname'", + " * }", + " */", + "", + "export const myRenameExtendedFieldFunction = webMethod(Permissions.Anyone, async (key, field) => {", + " ", + " try {", + " const elevatedRenameExtendedField = elevate(extendedFields.renameExtendedField);", + " const renamedExtendedField = await elevatedRenameExtendedField(key, field) ; ", + " console.log('Successfulyl renamed extendedField:', renamedExtendedField);", + " ", + " return renamedExtendedField; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"namespace\": \"custom\",", + " * \"key\": \"custom.nickname\",", + " * \"displayName\": \"Contact Nickname\",", + " * \"dataType\": \"TEXT\",", + " * \"fieldType\": \"USER_DEFINED\",", + " * \"legacyId\": \"63408eaf-e3d0-43f3-afa5-942847d272a1\",", + " * \"wixSearchColumn\": \"info_extendedFields_custom_string_18\",", + " * \"_createdDate\": \"2023-12-25T12:21:42.000Z\",", + " * \"_updatedDate\": \"2023-12-25T13:25:35.000Z\"", + " * }", + " */", + "" + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "renameExtendedField", + "isAdminMethod": true + } + ], + "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteExtendedFieldRequest", + "members": [ + { + "name": "key", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Extended field key." + } + ], + "docs": { + "description": [ + "" + ] + } }, { "name": "DeleteExtendedFieldResponse", @@ -619,6 +1082,259 @@ ] } }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.ExtendedFields.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ExtendedField", "members": [ @@ -685,7 +1401,7 @@ "nativeType": "string" } ], - "doc": "Indicates whether the extended field is a system field or custom field.\n\nOne of:\n- `\"SYSTEM\"`: The field is a system field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.\n- `\"USER_DEFINED\"`: The field is a custom field and can be modified by 3rd-party apps or site contributors." + "doc": "Indicates whether the extended field is a system field or custom field.\n\nOne of:\n- `\"SYSTEM\"`: System field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.\n- `\"USER_DEFINED\"`: Custom field that can be modified by 3rd-party apps or site admins." }, { "name": "key", @@ -707,7 +1423,7 @@ "nativeType": "string" } ], - "doc": "Extended field namespace.\n\nExtended fields created by site contributors or 3rd-party apps\nare automatically assigned to the `custom` namespace." + "doc": "Extended field namespace.\n\nExtended fields created by site collaborators or 3rd-party apps\nare automatically assigned to the `custom` namespace." } ], "docs": { @@ -1348,7 +2064,7 @@ "nativeType": "string" } ], - "doc": "Indicates whether the extended field is a system field or custom field.\n\nOne of:\n- `\"SYSTEM\"`: The field is a system field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.\n- `\"USER_DEFINED\"`: The field is a custom field and can be modified by 3rd-party apps or site contributors." + "doc": "Indicates whether the extended field is a system field or custom field.\n\nOne of:\n- `\"SYSTEM\"`: System field managed by Wix. System fields cannot be modified by 3rd-party apps or site contributors.\n- `\"USER_DEFINED\"`: Custom field that can be modified by 3rd-party apps or site admins." }, { "name": "namespace", @@ -1359,7 +2075,7 @@ "nativeType": "string" } ], - "doc": "Extended field namespace.\n\nExtended fields created by site contributors or 3rd-party apps\nare automatically assigned to the `custom` namespace." + "doc": "Extended field namespace.\n\nExtended fields created by site collaborators or 3rd-party apps\nare automatically assigned to the `custom` namespace." } ], "docs": { diff --git a/wix-crm-v2/wix-crm-v2/ExtendedFields/guides/extendedFields-intro.md b/wix-crm-v2/wix-crm-v2/ExtendedFields/guides/extendedFields-intro.md index 8c352a7694..353f404f2b 100644 --- a/wix-crm-v2/wix-crm-v2/ExtendedFields/guides/extendedFields-intro.md +++ b/wix-crm-v2/wix-crm-v2/ExtendedFields/guides/extendedFields-intro.md @@ -13,21 +13,31 @@ title: Introduction   -> **Note:** This module is + -The Extended Fields API provides functionality for managing extended fields for your contacts. Basic contact information is stored in the contact’s default properties, including information such as name, company, phone numbers, addresses, and email addresses. Additional properties are stored in extended fields. +The Extended Fields API provides functionality for creating and managing extended field definitions. Extended fields enable you to retrieve and store specific information relevant to your site. Basic fields, such as name, email, and phone, are stored in the contact's default properties. Additional custom contact properties are stored in extended fields. With the Extended Fields API, you can: -+ [Find or create ](wix-crm-v2/extendedfields/findorcreateextendedfiels) an extended field. ++ [Create](wix-crm-v2/extendedfields/findorcreateextendedfield) a new extended field. + [Delete](wix-crm-v2/extendedfields/deleteextendedfield) an extended field. -+ [Get](wix-crm-v2/extendedfields/getextendedfield) an extended field. -+ [Rename](wix-crm-v2/extendedfields/renameextendedfield) an extended field. ++ [Update](wix-crm-v2/extendedfields/renameextendedfield) an extended field by renaming its display name. + [Query](wix-crm-v2/extendedfields/queryextendedfields) extended fields. +## Before you begin + +It is important to note the following points before you begin to code: +- When you create a new extended field, it becomes available to use for all contacts. The field is blank by default. +- Possible data types of extended fields include: + - text + - number + - date + - url +- Extended fields are represented as key-value pairs in the contact's object in `info.extendedfields`. To manage the extended fields of an individual contact, use the [Contacts API](wix-crm-v2/contacts). + To use the Labels API, import `{ extendedFields }` from the `wix-crm.v2` module. @@ -35,6 +45,7 @@ To use the Labels API, import `{ extendedFields }` from the `wix-crm.v2` module. import { extendedFields } from ‘wix-crm.v2’; ``` + ## Permissions information Functions in the Extended Fields API are restricted and only run if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. @@ -46,6 +57,6 @@ Functions in the Extended Fields API are restricted and only run if you elevate ## Terminology -- **Extended Fields**: Additional properties that store additional contact information. A contact’s extended field data is available in the `contact` object under `info.extendedFields`. There are 2 types of extended fields: - - **System fields**: Extended fields added by Wix apps. System fields often enrich contacts with data from Wix apps, such as Wix Stores or Wix Members. System fields cannot be renamed and are typically read-only. - - **Custom fields**: Extended fields added by site collaborators or 3rd-party apps. Custom fields can be renamed, and their data can be written by any site collaborators or 3rd-party app. \ No newline at end of file +- **Extended field**: A customized field that can store additional information for a contact. A contact’s extended field data is available in the `contact` object under `info.extendedFields`. There are 2 types of extended fields: + - **System field**: An extended field added by Wix apps. System fields often enrich contacts with data from Wix apps, such as Wix Stores or Wix Members. System fields cannot be renamed and are typically read-only. + - **Custom field**: An extended field added by site admins or 3rd-party apps. Custom fields can be renamed, and their data can be written by any site admin or 3rd-party app. \ No newline at end of file diff --git a/wix-crm-v2/wix-crm-v2/Labels.service.json b/wix-crm-v2/wix-crm-v2/Labels.service.json index 5d5aaeec51..08b50a0bbe 100644 --- a/wix-crm-v2/wix-crm-v2/Labels.service.json +++ b/wix-crm-v2/wix-crm-v2/Labels.service.json @@ -44,25 +44,52 @@ "docs": { "summary": "Deletes a label from the site and removes it from contacts it applies to.", "description": [ - "The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.\n\n> **Note:**\n> Only visitors with **Manage Contacts** permissions can run this function.\n\n\nThis function is not a universal function and runs only on the backend." + "The `deleteLabel()` function returns a Promise that resolves when the specified label is deleted.\n\n> **Note:**\n> Only visitors with **Manage Contacts** permissions can run this function.\n" ], "examples": [ { - "title": "Delete a label ", + "title": "Delete a label (dashboard page code)", "body": [ "import { labels } from 'wix-crm.v2';", "", - "export function myDeleteLabelFunction() {", - " const key = 'custom.new-lead';", + "/* Sample key value: 'custom.at-risk' */", + "", + "export async function myDeleteLabelFunction(key) {", " ", - " return labels.deleteLabel(key)", - " .then(() => {", - " console.log('Label deleted');", - " })", - " .catch((error) => {", - " console.error(error);", - " });", - "}" + " try {", + " const deletedLabel = await labels.deleteLabel(key); ", + " console.log('Label deleted.');", + " ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */" + ] + }, + { + "title": "Delete a label (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample key value: 'custom.at-risk' */", + "", + "export const myDeleteLabelFunction = webMethod(Permissions.Anyone, async (key) => {", + " try {", + " const elevatedDeleteLabel = elevate(labels.deleteLabel);", + " const deletedLabel = await elevatedDeleteLabel(key); ", + " console.log('Label deleted.');", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to void */" ] } ] @@ -121,76 +148,174 @@ "docs": { "summary": "Retrieves a label with a given name, or creates one if it doesn't exist.", "description": [ - "The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.\n\nSuccessful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.\n\nTo find an existing label without potentially creating a new one, use [`getLabel()`](#getlabel) or [`queryLabels()`](#querylabels).\n\n> **Note:**\n> Only visitors with **Manage Contacts** permissions can run this function.\n\n\nThis function is not a universal function and runs only on the backend." + "The `findOrCreateLabel()` function returns a Promise that resolves when the specified label is found or created.\n\nSuccessful calls to `findOrCreateLabel()` always returns a label, which can be passed to subsequent function calls.\n\nTo find an existing label without potentially creating a new one, use `getLabel()` or `queryLabels()`.\n\n> **Note:**\n> Only visitors with **Manage Contacts** permissions can run this function.\n" ], "examples": [ { - "title": "Create a label ", + "title": "Create a label (dashboard page code)", "body": [ "import { labels } from 'wix-crm.v2';", "", - "export function myFindOrCreateLabelFunction() {", - " const displayName = 'Active Customer';", + "/* Sample displayName value: 'At Risk' */", "", - " return labels.findOrCreateLabel(displayName)", - " .then((label) => {", - " return label;", - " })", - " .catch((error) => {", - " console.error(error);", - " });", + "export async function myCreateLabelFunction(displayName) {", + " ", + " try {", + " const newLabel = await labels.findOrCreateLabel(displayName); ", + " console.log('Successfully created a new label:', newLabel);", + " ", + " return newLabel; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", "}", "", - "/*", - " * Promise resolves to:", - " *", + "/* Promise resolves to: ", " * {", " * \"label\": {", - " * \"_createdDate\": \"2021-01-20T00:31:41.452Z\",", - " * \"_updatedDate\": \"2021-01-20T00:31:41.452Z\"", " * \"namespace\": \"custom\",", - " * \"key\": \"custom.active-customer\",", - " * \"displayName\": \"Active Customer\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.at-risk\",", + " * \"displayName\": \"At Risk\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"65bd6a68-e10e-4831-8d92-c90e75be1570\",", + " * \"_createdDate\": \"2023-12-25T08:38:36.138Z\",", + " * \"_updatedDate\": \"2023-12-25T08:38:36.138Z\"", " * },", " * \"newLabel\": true", " * }", " */" ] }, + { + "title": "Create a label (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample displayName value: 'At Risk' */", + "", + "export const myCreateLabelFunction = webMethod(Permissions.Anyone, async (displayName) => {", + " ", + " try {", + " const elevatedCreateLabel = elevate(labels.findOrCreateLabel);", + " const newLabel = await elevatedCreateLabel(displayName); ", + " console.log('Successfully created a new label:', newLabel);", + " ", + " return newLabel; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to: ", + " * {", + " * \"label\": {", + " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.at-risk\",", + " * \"displayName\": \"At Risk\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"65bd6a68-e10e-4831-8d92-c90e75be1570\",", + " * \"_createdDate\": \"2023-12-25T08:38:36.138Z\",", + " * \"_updatedDate\": \"2023-12-25T08:38:36.138Z\"", + " * },", + " * \"newLabel\": true", + " * }", + " */", + "" + ] + }, { "title": "Find a label ", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", "", - "export function myFindOrCreateLabelFunction() {", - " const displayName = 'Active Customer';", + "/* Sample displayName value: 'Active Customer' */", "", - " return labels.findOrCreateLabel(displayName)", - " .then((label) => {", - " return label;", - " })", - " .catch((error) => {", - " console.error(error);", - " });", - "}", + "export const myFindLabelFunction = webMethod(Permissions.Anyone, async (displayName) => {", + " ", + " try {", + " const elevatedFindLabel = elevate(labels.findOrCreateLabel);", + " const label = await elevatedFindLabel(displayName); ", + " console.log('This label already exists:', label);", + " ", + " return label; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", "", - "/*", - " * Promise resolves to:", - " *", + "", + "/* Promise resolves to: ", " * {", " * \"label\": {", - " * \"_createdDate\": \"2021-01-20T00:31:41.452Z\",", - " * \"_updatedDate\": \"2021-01-20T00:31:41.452Z\"", " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", " * \"key\": \"custom.active-customer\",", " * \"displayName\": \"Active Customer\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"74f1e5c6-d9d5-4485-b272-13081ea35f38\",", + " * \"_createdDate\": \"2023-12-25T06:13:21.000Z\",", + " * \"_updatedDate\": \"2023-12-25T06:13:21.000Z\"", " * },", " * \"newLabel\": false", " * }", " */" ] + }, + { + "title": "Create a new label and add it to a contact ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { contacts, labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample contactId value: '2712ae1d-3f64-46c2-ac3a-94a6c2e29847'", + " * ", + " * Sample displayName value: 'Supplier'", + " */", + "", + "export const addNewLabelToContact = webMethod(Permissions.Anyone, async (displayName, contactId) => {", + " ", + " try {", + " const elevatedCreateLabel = elevate(labels.findOrCreateLabel);", + " const elevatedLabelContact = elevate(contacts.labelContact);", + " const newLabel = await elevatedCreateLabel(displayName);", + " const labelKeys = [newLabel.label.key];", + " // Extract label key from new label", + " if (newLabel.newLabel) {", + " // Label contact", + " const contact = await elevatedLabelContact(contactId, labelKeys);", + " const contactLabels = contact.contact.info.labelKeys.items", + "", + " return contactLabels", + " }", + " else {", + " return \"Label was not added to contact.\"", + " }", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to: ", + " * [", + " * \"custom.contact\",", + " * \"custom.supplier\"", + " * ]", + " */" + ], + "extra": { + "description": "This function creates a new label, extracts the label key, and then labels a contact." + } } ] }, @@ -208,7 +333,7 @@ "nativeType": "string" } ], - "doc": "Label key.\n\n`key` is generated when the label is created\nand cannot be modified, even if `displayName` changes.", + "doc": "Label key.\n\n`key` is generated when the label is created.\nIt cannot be modified, even if `displayName` is updated.", "required": true }, { @@ -243,39 +368,132 @@ "docs": { "summary": "Retrieves a label by the specified label key.", "description": [ - "The `getLabel()` function returns a Promise that resolves when the specified label is retrieved.\n\nThis function is not a universal function and runs only on the backend." + "The `getLabel()` function returns a Promise that resolves when the specified label is retrieved." ], "examples": [ { - "title": "Get a label ", + "title": "Get a specified label (dashboard page code)", "body": [ "import { labels } from 'wix-crm.v2';", "", - "export function myGetLabelFunction() {", - " const key = 'custom.active-customer';", + "/* Sample key value: 'custom.at-risk' */", "", - " return labels.getLabel(key)", - " .then((label) => {", - " return label;", - " })", - " .catch((error) => {", - " console.error(error);", - " });", + "export async function myGetLabelFunction(key) {", + " ", + " try {", + " const label = await labels.getLabel(key); ", + " console.log('successfully retrieved label:', label);", + " ", + " return label; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", "}", "", - "/*", - " * Promise resolves to:", - " *", + "/* Promise resolves to:", " * {", - " * \"_createdDate\": \"2021-01-20T00:31:41Z\",", - " * \"_updatedDate\": \"2021-01-20T00:31:41Z\"", " * \"namespace\": \"custom\",", - " * \"key\": \"custom.active-customer\",", - " * \"displayName\": \"Active Customer\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.at-risk\",", + " * \"displayName\": \"At Risk\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"65bd6a68-e10e-4831-8d92-c90e75be1570\",", + " * \"_createdDate\": \"2023-12-25T08:38:36.000Z\",", + " * \"_updatedDate\": \"2023-12-25T08:38:36.000Z\"", " * }", " */" ] + }, + { + "title": "Get a specified label (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample key value: 'custom.at-risk' */", + "", + "export const myGetLabelFunction = webMethod(Permissions.Anyone, async (key) => {", + " try {", + " const elevatedGetLabel = elevate(labels.getLabel);", + " const label = await elevatedGetLabel(key); ", + " console.log('successfully retrieved label:', label);", + " ", + " return label; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.at-risk\",", + " * \"displayName\": \"At Risk\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"65bd6a68-e10e-4831-8d92-c90e75be1570\",", + " * \"_createdDate\": \"2023-12-25T08:38:36.000Z\",", + " * \"_updatedDate\": \"2023-12-25T08:38:36.000Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Get the display name for a specified label ", + "body": [ + "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample key value: 'custom.at-risk' */", + "", + "export async function myGetLabelFunction(key) {", + " ", + " try {", + " const elevatedGetLabel = elevate(labels.getLabel);", + " const label = await elevatedGetLabel(key); ", + " const displayName = label.displayName; ", + " console.log('successfully retrieved the display name:', displayName);", + " ", + " return displayName; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "// Return value: \"At Risk\"" + ] + }, + { + "title": "Get the display name for a specified label ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample key value: 'custom.at-risk' */", + "", + "export const myGetLabelFunction = webMethod(Permissions.Anyone, async (key) => {", + " try {", + " const elevatedGetLabel = elevate(labels.getLabel);", + " const label = await elevatedGetLabel(key); ", + " const displayName = label.displayName; ", + " console.log('successfully retrieved the display name:', displayName);", + " ", + " return displayName; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "// Return value: \"At Risk\"", + "" + ] } ] }, @@ -298,7 +516,7 @@ "referenceType": "wix-crm-v2.Labels.QueryLabelsOptions" } ], - "doc": "Language options.\n", + "doc": "Language options.", "required": false } ], @@ -315,20 +533,22 @@ "summary": "Creates a query to retrieve a list of labels.", "description": [ "", - "The `queryLabels()` function builds a query to retrieve a list of labels and returns a [`LabelsQueryBuilder`](#labelsquerybuilder) object.", + "The `queryLabels()` function builds a query to retrieve a list of labels and returns a `LabelsQueryBuilder` object.", "", - "The returned object contains the query definition, which is used to run the query using the [`find()`](#labelsquerybuilder/find) function. ", + "The returned object contains the query definition, which is used to run the query using the `find()` function. ", "", "You can refine the query by chaining `LabelsQueryBuilder` functions onto the query. `LabelsQueryBuilder` functions enable you to filter, sort, and control the results that `queryLabels()` returns. ", "", "`queryLabels()` runs with the following `LabelsQueryBuilder` defaults, which you can override:", - "- [`skip(0)`](#labelsquerybuilder/skip)", - "- [`limit(50)`](#labelsquerybuilder/limit)", - "- [`descending('_createdDate')`](#labelsquerybuilder/descending) ", + "- `skip(0)`", + "- `limit(50)`", + "- `descending('_createdDate')`", "", ">**Note:** Only visitors with **Manage Contacts** permissions can query labels.", "", - "The following `LabelsQueryBuilder` functions are supported for `queryLabels()`. For a full description of the `Labels` object, see the object returned for the [`items`](#labelsqueryresult/items) property in [`LabelsQueryResult`](#labelsqueryresult).", + "The following `LabelsQueryBuilder` functions are supported for `queryLabels()`. For a full description of the `Labels` object, see the object returned for the `items` property in `LabelsQueryResult`.", + "", + "", "", "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", @@ -337,18 +557,18 @@ "|`key`|[`eq()`](wix-crm-v2.Labels.LabelsQueryBuilder#eq),[`ne()`](wix-crm-v2.Labels.LabelsQueryBuilder#ne),[`in()`](wix-crm-v2.Labels.LabelsQueryBuilder#in)|", "|`displayName`|[`eq()`](wix-crm-v2.Labels.LabelsQueryBuilder#eq),[`ne()`](wix-crm-v2.Labels.LabelsQueryBuilder#ne),[`in()`](wix-crm-v2.Labels.LabelsQueryBuilder#in),[`startsWith()`](wix-crm-v2.Labels.LabelsQueryBuilder#startsWith),[`ascending()`](wix-crm-v2.Labels.LabelsQueryBuilder#ascending),[`descending()`](wix-crm-v2.Labels.LabelsQueryBuilder#descending)|", "|`labelType`|[`eq()`](wix-crm-v2.Labels.LabelsQueryBuilder#eq)|", - "|`_createdDate`|[`eq()`](wix-crm-v2.Labels.LabelsQueryBuilder#eq),[`ne()`](wix-crm-v2.Labels.LabelsQueryBuilder#ne),[`gt()`](wix-crm-v2.Labels.LabelsQueryBuilder#gt),[`lt()`](wix-crm-v2.Labels.LabelsQueryBuilder#lt),[`le()`](wix-crm-v2.Labels.LabelsQueryBuilder#le),[`ascending()`](wix-crm-v2.Labels.LabelsQueryBuilder#ascending),[`descending()`](wix-crm-v2.Labels.LabelsQueryBuilder#descending)|", - "|`_updatedDate`|[`eq()`](wix-crm-v2.Labels.LabelsQueryBuilder#eq),[`ne()`](wix-crm-v2.Labels.LabelsQueryBuilder#ne),[`gt()`](wix-crm-v2.Labels.LabelsQueryBuilder#gt),[`lt()`](wix-crm-v2.Labels.LabelsQueryBuilder#lt),[`le()`](wix-crm-v2.Labels.LabelsQueryBuilder#le),[`ascending()`](wix-crm-v2.Labels.LabelsQueryBuilder#ascending),[`descending()`](wix-crm-v2.Labels.LabelsQueryBuilder#descending)|" + "|`_createdDate`|[`eq()`](wix-crm-v2.Labels.LabelsQueryBuilder#eq),[`ne()`](wix-crm-v2.Labels.LabelsQueryBuilder#ne),[`gt()`](wix-crm-v2.Labels.LabelsQueryBuilder#gt),[`lt()`](wix-crm-v2.Labels.LabelsQueryBuilder#lt),[`ge()`](wix-crm-v2.Labels.LabelsQueryBuilder#ge),[`le()`](wix-crm-v2.Labels.LabelsQueryBuilder#le),[`ascending()`](wix-crm-v2.Labels.LabelsQueryBuilder#ascending),[`descending()`](wix-crm-v2.Labels.LabelsQueryBuilder#descending)|", + "|`_updatedDate`|[`eq()`](wix-crm-v2.Labels.LabelsQueryBuilder#eq),[`ne()`](wix-crm-v2.Labels.LabelsQueryBuilder#ne),[`gt()`](wix-crm-v2.Labels.LabelsQueryBuilder#gt),[`lt()`](wix-crm-v2.Labels.LabelsQueryBuilder#lt),[`ge()`](wix-crm-v2.Labels.LabelsQueryBuilder#ge),[`le()`](wix-crm-v2.Labels.LabelsQueryBuilder#le),[`ascending()`](wix-crm-v2.Labels.LabelsQueryBuilder#ascending),[`descending()`](wix-crm-v2.Labels.LabelsQueryBuilder#descending)|" ], "examples": [ { - "title": "Retrieve all labels ", + "title": "Retrieve all labels (dashboard page code)", "body": [ "import { labels } from 'wix-crm.v2';", "", "export async function myQueryLabelsFunction() {", + " ", " try {", - "", " const queryResults = await labels.queryLabels()", " .find();", "", @@ -359,12 +579,11 @@ " const hasPrev = queryResults.hasPrev();", " const length = queryResults.length;", " const query = queryResults.query;", - "", + " console.log('Retrieved items:', items);", + " ", " return items;", - "", " } catch (error) {", - "", - " console.error(error);", + " console.log(error);", " // Handle the error", "", " }", @@ -373,84 +592,204 @@ "/* Returns items:", " * [", " * {", - " * \"_createdDate\": \"2021-03-30T12:42:06.000Z\",", - " * \"_updatedDate\": \"2021-03-30T12:42:06.000Z\",", - " * \"displayName\": \"New Lead\",", - " * \"key\": \"custom.new-lead\",", " * \"namespace\": \"custom\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.at-risk\",", + " * \"displayName\": \"At Risk\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"65bd6a68-e10e-4831-8d92-c90e75be1570\",", + " * \"_createdDate\": \"2023-12-25T08:38:36.000Z\",", + " * \"_updatedDate\": \"2023-12-25T08:38:36.000Z\"", " * },", " * {", - " * \"_createdDate\": \"2021-03-29T13:17:29.000Z\",", - " * \"_updatedDate\": \"2021-03-29T13:17:29.000Z\",", - " * \"displayName\": \"Marketing Your Business on Social Media\",", - " * \"key\": \"custom.marketing-your-business-on-social-media\",", " * \"namespace\": \"custom\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.active-customer\",", + " * \"displayName\": \"Active Customer\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"74f1e5c6-d9d5-4485-b272-13081ea35f38\",", + " * \"_createdDate\": \"2023-12-25T06:13:21.000Z\",", + " * \"_updatedDate\": \"2023-12-25T06:13:21.000Z\"", " * },", " * {", - " * \"_createdDate\": \"2021-01-20T12:49:09.000Z\",", - " * \"_updatedDate\": \"2021-01-20T12:49:09.000Z\",", - " * \"displayName\": \"Quick Win\",", - " * \"key\": \"custom.quick-win\",", " * \"namespace\": \"custom\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.contact\",", + " * \"displayName\": \"Contact\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"5fec05f8-eb03-4243-ad46-4c24535144f6\",", + " * \"_createdDate\": \"2023-12-11T07:33:35.000Z\",", + " * \"_updatedDate\": \"2023-12-11T07:33:35.000Z\"", " * },", " * {", - " * \"_createdDate\": \"2021-01-20T12:48:46.000Z\",", - " * \"_updatedDate\": \"2021-01-20T12:48:46.000Z\",", - " * \"displayName\": \"Stale Lead\",", - " * \"key\": \"custom.stale-lead\",", - " * \"namespace\": \"custom\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespace\": \"contacts\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"contacts.customers\",", + " * \"displayName\": \"Customers\",", + " * \"labelType\": \"SYSTEM\",", + " * \"legacyId\": \"contacts_server/customers\"", " * },", " * {", - " * \"_createdDate\": \"2021-01-20T06:55:58.000Z\",", - " * \"_updatedDate\": \"2021-01-20T06:55:58.000Z\",", - " * \"displayName\": \"White Glove Treatment\",", - " * \"key\": \"custom.white-glove-treatment\",", - " * \"namespace\": \"custom\",", - " * \"labelType\": \"USER_DEFINED\"", - " * },", + " * \"namespace\": \"contacts\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"contacts.contacted-me\",", + " * \"displayName\": \"Contacted Me\",", + " * \"labelType\": \"SYSTEM\",", + " * \"legacyId\": \"contacts_server/contacted_me\"", + " * }", + " * ]", + " */" + ] + }, + { + "title": "Retrieve all labels (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "export const myQueryLabelsFunction = webMethod(Permissions.Anyone, async () => {", + " try {", + " const elevatedQueryLabels = elevate(labels.queryLabels);", + " const queryResults = await elevatedQueryLabels()", + " .find();", + "", + " const items = queryResults.items;", + " const firstItem = items[0];", + " const pageSize = queryResults.pageSize;", + " const hasNext = queryResults.hasNext();", + " const hasPrev = queryResults.hasPrev();", + " const length = queryResults.length;", + " const query = queryResults.query;", + " console.log('Retrieved items:', items);", + " ", + " return items;", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + "", + " }", + "});", + "", + "/* Returns items:", + " * [", " * {", - " * \"_createdDate\": \"2021-01-20T06:55:47.000Z\",", - " * \"_updatedDate\": \"2021-01-20T06:55:47.000Z\",", - " * \"displayName\": \"At Risk\",", - " * \"key\": \"custom.at-risk\",", " * \"namespace\": \"custom\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.at-risk\",", + " * \"displayName\": \"At Risk\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"65bd6a68-e10e-4831-8d92-c90e75be1570\",", + " * \"_createdDate\": \"2023-12-25T08:38:36.000Z\",", + " * \"_updatedDate\": \"2023-12-25T08:38:36.000Z\"", " * },", " * {", - " * \"_createdDate\": \"2021-01-20T00:31:41.000Z\",", - " * \"_updatedDate\": \"2021-01-20T00:31:41.000Z\",", - " * \"displayName\": \"Active Customer\",", - " * \"key\": \"custom.active-customer\",", " * \"namespace\": \"custom\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.active-customer\",", + " * \"displayName\": \"Active Customer\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"74f1e5c6-d9d5-4485-b272-13081ea35f38\",", + " * \"_createdDate\": \"2023-12-25T06:13:21.000Z\",", + " * \"_updatedDate\": \"2023-12-25T06:13:21.000Z\"", " * },", " * {", - " * \"_createdDate\": \"2021-01-19T21:38:49.000Z\",", - " * \"_updatedDate\": \"2021-01-20T19:07:54.000Z\",", - " * \"displayName\": \"Incoming\",", - " * \"key\": \"custom.incoming-leads\",", " * \"namespace\": \"custom\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.contact\",", + " * \"displayName\": \"Contact\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"5fec05f8-eb03-4243-ad46-4c24535144f6\",", + " * \"_createdDate\": \"2023-12-11T07:33:35.000Z\",", + " * \"_updatedDate\": \"2023-12-11T07:33:35.000Z\"", " * },", " * {", - " * \"displayName\": \"Customers\",", - " * \"key\": \"contacts.customers\",", " * \"namespace\": \"contacts\",", - " * \"labelType\": \"SYSTEM\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"contacts.customers\",", + " * \"displayName\": \"Customers\",", + " * \"labelType\": \"SYSTEM\",", + " * \"legacyId\": \"contacts_server/customers\"", " * },", " * {", - " * \"displayName\": \"Contacted Me\",", - " * \"key\": \"contacts.contacted-me\",", " * \"namespace\": \"contacts\",", - " * \"labelType\": \"SYSTEM\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"contacts.contacted-me\",", + " * \"displayName\": \"Contacted Me\",", + " * \"labelType\": \"SYSTEM\",", + " * \"legacyId\": \"contacts_server/contacted_me\"", " * }", " * ]", " */" ] + }, + { + "title": "Retrieve labels with specified `labelType` ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "export const myQueryLabelsFunction = webMethod(Permissions.Anyone, async () => {", + " try {", + " const elevatedQueryLabels = elevate(labels.queryLabels);", + " const queryResults = await elevatedQueryLabels()", + " .eq(\"labelType\", \"USER_DEFINED\")", + " .find();", + "", + " const items = queryResults.items;", + " const firstItem = items[0];", + " const pageSize = queryResults.pageSize;", + " const hasNext = queryResults.hasNext();", + " const hasPrev = queryResults.hasPrev();", + " const length = queryResults.length;", + " const query = queryResults.query;", + " console.log('Retrieved items:', items);", + " ", + " return items;", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + "", + " }", + "});", + "", + "/* Returns items:", + " * [", + " * {", + " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.at-risk\",", + " * \"displayName\": \"At Risk\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"65bd6a68-e10e-4831-8d92-c90e75be1570\",", + " * \"_createdDate\": \"2023-12-25T08:38:36.000Z\",", + " * \"_updatedDate\": \"2023-12-25T08:38:36.000Z\"", + " * },", + " * {", + " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.active-customer\",", + " * \"displayName\": \"Active Customer\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"74f1e5c6-d9d5-4485-b272-13081ea35f38\",", + " * \"_createdDate\": \"2023-12-25T06:13:21.000Z\",", + " * \"_updatedDate\": \"2023-12-25T06:13:21.000Z\"", + " * },", + " * {", + " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.contact\",", + " * \"displayName\": \"Contact\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"5fec05f8-eb03-4243-ad46-4c24535144f6\",", + " * \"_createdDate\": \"2023-12-11T07:33:35.000Z\",", + " * \"_updatedDate\": \"2023-12-11T07:33:35.000Z\"", + " * }", + " * ]", + " */", + "" + ] } ] }, @@ -473,7 +812,7 @@ "nativeType": "string" } ], - "doc": "Label key.\n\n`key` is generated when the label is created\nand cannot be modified, even if `displayName` changes.", + "doc": "Label key.\n\n`key` is generated when the label is created.\nIt cannot be modified, even if `displayName` is updated.", "required": true }, { @@ -483,7 +822,7 @@ "referenceType": "wix-crm-v2.Labels.RenameLabel" } ], - "doc": "Label display name to rename.", + "doc": "Label to rename.", "required": true }, { @@ -515,46 +854,100 @@ } } ], - "doc": "Renames a label.\n\nThe `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.\n\n>**Note:**\n> Only visitors with **Manage Contacts** permissions can rename a label.\n" + "doc": "\n" }, "docs": { - "summary": "Updates a label's specified properties.", + "summary": "Renames a label.", "description": [ - "This function is not a universal function and runs only on the backend." + "The `renameLabel()` function returns a Promise that resolves when the specified label's display name is changed.\n\n>**Note:**\n> Only visitors with **Manage Contacts** permissions can rename a label." ], "examples": [ { - "title": "Rename a label ", + "title": "Rename a label (dashboard page code)", "body": [ "import { labels } from 'wix-crm.v2';", "", - "export function myRenameLabelFunction() {", - " const key = 'custom.incoming-leads';", - " const label = {", - " displayName : 'Incoming'", - " };", + "/* Sample key value:", + " *", + " * 'custom.active-customer'", + " * ", + " * Sample label object:", + " * {", + " * displayName: \"Customer\"", + " * }", + " */", "", - " return labels.renameLabel(key, label)", - " .then((renamedLabel) => {", - " return renamedLabel;", - " })", - " .catch((error) => {", - " console.error(error);", - " });", - "}", + "export async function myRenameLabelFunction(key, label) {", + " ", + " try {", + " const renamedLabel = await labels.renameLabel(key, label);", + " console.log('successfully renamed label:', renamedLabel);", + " ", + " return renamedLabel; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + " }", "", "/* Promise resolves to:", - " *", " * {", - " * \"_createdDate\": \"2021-01-19T21:38:49Z\",", - " * \"_updatedDate\": \"2021-01-20T19:07:54Z\"", " * \"namespace\": \"custom\",", - " * \"key\": \"custom.incoming-leads\",", - " * \"displayName\": \"Incoming\",", - " * \"labelType\": \"USER_DEFINED\"", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.active-customer\",", + " * \"displayName\": \"Customer\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"74f1e5c6-d9d5-4485-b272-13081ea35f38\",", + " * \"_createdDate\": \"2023-12-25T06:13:21.000Z\",", + " * \"_updatedDate\": \"2023-12-25T09:14:37.000Z\"", " * }", " */" ] + }, + { + "title": "Rename a label (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { labels } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample key value:", + " *", + " * 'custom.active-customer'", + " * ", + " * Sample label object:", + " * {", + " * displayName: \"Customer\"", + " * }", + " */", + "", + "export const myRenameLabelFunction = webMethod(Permissions.Anyone, async (key, label) => {", + " try {", + " const elevatedRenameLabel = elevate(labels.renameLabel);", + " const renamedLabel = await elevatedRenameLabel(key, label);", + " console.log('successfully renamed label:', renamedLabel);", + " ", + " return renamedLabel; ", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"namespace\": \"custom\",", + " * \"namespaceDisplayName\": \"Labels\",", + " * \"key\": \"custom.active-customer\",", + " * \"displayName\": \"Customer\",", + " * \"labelType\": \"USER_DEFINED\",", + " * \"legacyId\": \"74f1e5c6-d9d5-4485-b272-13081ea35f38\",", + " * \"_createdDate\": \"2023-12-25T06:13:21.000Z\",", + " * \"_updatedDate\": \"2023-12-25T09:14:37.000Z\"", + " * }", + " */", + "" + ] } ] }, @@ -569,6 +962,26 @@ } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ContactLabel", "members": [ @@ -613,7 +1026,7 @@ "nativeType": "string" } ], - "doc": "Label key.\n\n`key` is generated when the label is created\nand cannot be modified, even if `displayName` changes." + "doc": "Label key.\n\n`key` is generated when the label is created.\nIt cannot be modified, even if `displayName` is updated." }, { "name": "labelType", @@ -635,7 +1048,7 @@ "nativeType": "string" } ], - "doc": "Label namespace.\n\nLabels created by site contributors or 3rd-party apps\nare automatically assigned to the `custom` namespace." + "doc": "Label namespace.\n\nLabels created by site admins or 3rd-party apps\nare automatically assigned to the `custom` namespace." }, { "name": "namespaceDisplayName", @@ -715,6 +1128,259 @@ ] } }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Labels.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Labels.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Labels.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Labels.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Labels.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Labels.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Labels.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Labels.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "FindOrCreateLabelOptions", "members": [ @@ -921,7 +1587,7 @@ "nativeType": "string" } ], - "doc": "Label key.\n\n`key` is generated when the label is created\nand cannot be modified, even if `displayName` changes.\n" + "doc": "Label key.\n\n`key` is generated when the label is created.\nIt cannot be modified, even if `displayName` is updated.\n" }, { "name": "language", @@ -1560,7 +2226,7 @@ "nativeType": "string" } ], - "doc": "Label namespace.\n\nLabels created by site contributors or 3rd-party apps\nare automatically assigned to the `custom` namespace." + "doc": "Label namespace.\n\nLabels created by site admins or 3rd-party apps\nare automatically assigned to the `custom` namespace." }, { "name": "namespaceDisplayName", diff --git a/wix-crm-v2/wix-crm-v2/Labels/guides/labels-intro.md b/wix-crm-v2/wix-crm-v2/Labels/guides/labels-intro.md index eec627d436..d5e4639202 100644 --- a/wix-crm-v2/wix-crm-v2/Labels/guides/labels-intro.md +++ b/wix-crm-v2/wix-crm-v2/Labels/guides/labels-intro.md @@ -13,25 +13,33 @@ title: Introduction   -> **Note:** This module is + -The Labels API provides functionality for managing labels for your contacts. Labels allow site collaborators to segment contacts in their Contact List. Contact labels are useful for targeting specific audiences for email campaigns or bulk actions. Learn more about [labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list). +The Labels API provides functionality for managing labels for your site. Labels allow site admins to segment or categorize the contacts in their Contact List. Using Labels enchances the CRM by allowing site admins to customize data organization according to their needs. +For example, you can use labels to target specific audiences for email campaigns or bulk actions. Learn more about [labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list). With the Labels API, you can: -+ [Find or create ](wix-crm-v2/labels/findorcreatelabel) a label. -+ [Delete](wix-crm-v2/labels/deletelabel) a label. -+ [Rename](wix-crm-v2/labels/renamelabel) a label. -+ [Query](wix-crm-v2/labels/querylabels) labels. +- [Create](wix-crm-v2/labels/findorcreatelabel) a new label. +- [Update](wix-crm-v2/labels/renamelabel) a label by renaming its display name. +- [Delete](wix-crm-v2/labels/deletelabel) a label. +- [Query](wix-crm-v2/labels/querylabels) labels. + + +## Before you begin + +It is important to note the following points before you begin to code: +- When you delete a label from your site, you also remove that label from all contacts it applies to. +- Label keys can't be changed once created. To use the Labels API, import `{ labels }` from the `wix-crm.v2` module. ```javascript -import { labels } from ‘wix-crm.v2’; +import { labels } from 'wix-crm.v2'; ``` ## Permissions information @@ -45,4 +53,6 @@ Functions in the Labels API are restricted and only run if you elevate permissio ## Terminology -- **Labels**: Tags that help site collaborators categorize and organzie their contacts. Labels can be system-defined or user-defined. A contact’s assigned labels are available in the contact object under `info.labelKeys`. \ No newline at end of file +- **Label**: A tag that is applied to contacts to help site admins organzie and group contacts with shared characteristics. Labels can be user-defined or system-defined. + - **User-defined label**: A label that is custom created by site admins. + - **System-defined label**: A label that is pre-defined in your site and cannot be deleted from the CRM. \ No newline at end of file diff --git a/wix-crm-v2/wix-crm-v2/Tasks.service.json b/wix-crm-v2/wix-crm-v2/Tasks.service.json new file mode 100644 index 0000000000..d5ecf5b3e4 --- /dev/null +++ b/wix-crm-v2/wix-crm-v2/Tasks.service.json @@ -0,0 +1,2914 @@ +{ + "name": "Tasks", + "memberOf": "wix-crm-v2", + "mixes": [], + "callbacks": [], + "extra": {}, + "clientId": "wix-crm.v2-task", + "docs": {}, + "relatedGuides": [], + "properties": [], + "operations": [ + { + "name": "countTasks", + "params": [ + { + "name": "options", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.CountTasksOptions" + } + ], + "doc": "Filtering options.", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.CountTasksResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Counts the number of tasks.", + "description": [ + "This endpoint returns the count of all tasks regardless of the task `status`.\n\nOptionally, you can pass a filter to count only tasks based\non specified criteria." + ], + "examples": [ + { + "title": "Count the total number of tasks (dashboard page code)", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myCountTasksFunction() {", + " try {", + " const count = await tasks.countTasks();", + "", + " return count;", + " } catch(error){", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"count\": 9", + " * }", + " */" + ] + }, + { + "title": "Count the total number of tasks (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "export const myCountTasksFunction = webMethod(Permissions.Anyone, async () => {", + "", + " try {", + " const elevatedCountTasks = elevate(tasks.countTasks);", + " const count = await elevatedCountTasks();", + "", + " return count;", + " } catch(error){", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"count\": 9", + " * }", + " */", + "" + ] + }, + { + "title": " Count the number of completed tasks ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample options value: ", + " * {", + " * 'filter' : {", + " * 'status': 'COMPLETED'", + " * }", + " * }", + " */", + "", + "export const myCountTasksFunction = webMethod(Permissions.Anyone, async (options) => {", + "", + " try {", + " const elevatedCountTasks = elevate(tasks.countTasks);", + " const count = await elevatedCountTasks(options);", + "", + " return count;", + " } catch(error){", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"count\": 9", + " * }", + " */", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "countTasks", + "isAdminMethod": true + }, + { + "name": "createTask", + "params": [ + { + "name": "task", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ], + "doc": "Task to create.", + "required": true + } + ], + "requiredFields": [ + "task" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ] + } + } + ], + "doc": "The created task.\n" + }, + "docs": { + "summary": "Creates a new task.", + "description": [ + "All fields in the `task` object are optional. If you don't pass any fields in the `task` object, the function returns a task with the following core properties:\n- `_id`\n- `_createdDate`\n- `_updatedDate`\n- `status`\n- `source`\n- `revision`\n" + ], + "examples": [ + { + "title": "Create a new task (dashboard page code)", + "body": [ + "", + "import { tasks } from 'wix-crm.v2';", + "", + "/* Sample task value:", + " * {", + " * contact: {", + " * _id: '5518ee7f-270e-40c4-b756-dad56e8f0ffc'", + " * },", + " * description: 'Send a follow up email',", + " * dueDate: new Date(2024, 1, 31),", + " * status: 'ACTION_NEEDED',", + " * title: 'Follow up'", + " * }", + "*/", + "", + "export async function myCreateTaskFunction(task) {", + " ", + " try { ", + " const newTask = await tasks.createTask(task);", + " console.log('Successfully created a new task:', newTask);", + "", + " return newTask;", + " }", + " catch(error){", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Follow up\",", + " * \"description\": \"Send a follow up email\",", + " * \"dueDate\": \"2024-01-31T00:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Sally\",", + " * \"lastName\": \"Smith\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"+1 524-624-2486\",", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\"", + " * },", + " * \"_id\": \"37c2c378-8085-4ef7-8a3e-6f341248e757\",", + " * \"_createdDate\": \"2024-01-18T12:16:37.452Z\",", + " * \"_updatedDate\": \"2024-01-18T12:16:37.452Z\"", + " * }", + "*/", + "" + ] + }, + { + "title": "Create a new task (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample task value:", + " * {", + " * contact: {", + " * _id: '5518ee7f-270e-40c4-b756-dad56e8f0ffc'", + " * },", + " * description: 'Send a follow up email',", + " * dueDate: new Date(2024, 1, 31),", + " * status: 'ACTION_NEEDED',", + " * title: 'Follow up'", + " * }", + "*/", + "", + "export const myCreateTaskFunction = webMethod(Permissions.Anyone, async (task) => {", + " try { ", + " const elevatedCreateTask = elevate(tasks.createTask);", + " const newTask = await elevatedCreateTask(task);", + " console.log('Successfully created a new task:', newTask);", + "", + " return newTask;", + " }", + " catch(error){", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Follow up\",", + " * \"description\": \"Send a follow up email\",", + " * \"dueDate\": \"2024-01-31T00:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Sally\",", + " * \"lastName\": \"Smith\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"+1 524-624-2486\",", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\"", + " * },", + " * \"_id\": \"37c2c378-8085-4ef7-8a3e-6f341248e757\",", + " * \"_createdDate\": \"2024-01-18T12:16:37.452Z\",", + " * \"_updatedDate\": \"2024-01-18T12:16:37.452Z\"", + " * }", + "*/", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "createTask", + "isAdminMethod": true + }, + { + "name": "deleteTask", + "params": [ + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the task to delete.", + "required": true + } + ], + "requiredFields": [ + "taskId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Deletes a task by ID.", + "description": [], + "examples": [ + { + "title": "Delete a task (dashboard page code)", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "/* Sample taskId value:", + " * '3194f3f2-945f-4810-8905-d02b24f9e790'", + " */", + "", + "export async function myDeleteTaskFunction(taskId) {", + " ", + " try {", + " await tasks.deleteTask(taskId);", + "", + " console.log('Task deleted.')", + " } catch (error) {", + " console.log(error);", + " //Handle the error", + " }", + "}" + ] + }, + { + "title": "Delete a task (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample taskId value:", + " * '3194f3f2-945f-4810-8905-d02b24f9e790'", + " */", + "", + "export const myDeleteTaskFunction = webMethod(Permissions.Anyone, async (taskId) => {", + " ", + " try {", + " const elevatedDeleteTask = elevate(tasks.deleteTask);", + " await elevatedDeleteTask(taskId);", + "", + " console.log('Task deleted.')", + " } catch (error) {", + " console.log(error);", + " //Handle the error", + " }", + "});", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "deleteTask", + "isAdminMethod": true + }, + { + "name": "getTask", + "params": [ + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the task to retrieve.", + "required": true + } + ], + "requiredFields": [ + "taskId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ] + } + } + ], + "doc": "The retrieved task.\n" + }, + "docs": { + "summary": "Retrieves a task by ID.", + "description": [], + "examples": [ + { + "title": "Get a task (dashboard page code)", + "body": [ + "", + "import { tasks } from 'wix-crm.v2';", + "", + "/* Sample taskId value:", + " * '3194f3f2-945f-4810-8905-d02b24f9e790'", + " */", + "", + "export async function myGetTaskFunction(taskId) {", + " ", + " try {", + " const task = await tasks.getTask(taskId);", + " ", + " return task;", + " } catch(error){", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * { ", + " * \"revision\": \"1\",", + " * \"title\": \"Follow up\",", + " * \"description\": \"Send a follow up email\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Sally\",", + " * \"lastName\": \"Smith\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"+1 524-624-2486\",", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\"", + " * },", + " * \"_id\": \"3194f3f2-945f-4810-8905-d02b24f9e790\",", + " * \"_createdDate\": \"2024-01-18T11:35:29.092Z\",", + " * \"_updatedDate\": \"2024-01-18T11:35:29.092Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Get a task (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample taskId value:", + " * '3194f3f2-945f-4810-8905-d02b24f9e790'", + " */", + "", + "export const myGetTaskFunction = webMethod(Permissions.Anyone, async (taskId) => {", + " ", + " try {", + " const elevatedGetTask = elevate(tasks.getTask);", + " const task = await elevatedGetTask(taskId);", + " ", + " return task;", + " } catch(error){", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * { ", + " * \"revision\": \"1\",", + " * \"title\": \"Follow up\",", + " * \"description\": \"Send a follow up email\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Sally\",", + " * \"lastName\": \"Smith\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"+1 524-624-2486\",", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\"", + " * },", + " * \"_id\": \"3194f3f2-945f-4810-8905-d02b24f9e790\",", + " * \"_createdDate\": \"2024-01-18T11:35:29.092Z\",", + " * \"_updatedDate\": \"2024-01-18T11:35:29.092Z\"", + " * }", + " */", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "getTask", + "isAdminMethod": true + }, + { + "name": "moveTaskAfter", + "params": [ + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The task ID to move.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.MoveTaskAfterOptions" + } + ], + "doc": "Options for moving the task.", + "required": false + } + ], + "requiredFields": [ + "taskId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Moves a task specified by ID to be placed after another task in the display.", + "description": [ + "You can reposition a task to be first in the display by ommitting `beforeTaskId`." + ], + "examples": [ + { + "title": "Update the display order of tasks (dashboard page code)", + "body": [ + "", + "import { tasks } from 'wix-crm.v2';", + "", + "/* Sample taskId value: ", + " * '37c2c378-8085-4ef7-8a3e-6f341248e757'", + " *", + " * Sample options value:", + " * {", + " * beforeTaskId: '3a49f901-62d5-4ca2-a8e8-395c562a3f7b'", + " * }", + " */", + "", + "export async function myMoveTaskAfterFunction(taskId, options) {", + "", + " try {", + " await tasks.moveTaskAfter(taskId, options);", + "", + " console.log('Successfuly updated task display.');", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " } ", + "}", + "" + ], + "extra": { + "description": "This function moves a specified task to be displayed after another task using the `moveTaskAfter()` function." + } + }, + { + "title": "Update the display order of tasks (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample taskId value: ", + " * '37c2c378-8085-4ef7-8a3e-6f341248e757'", + " *", + " * Sample options value:", + " * {", + " * beforeTaskId: '3a49f901-62d5-4ca2-a8e8-395c562a3f7b'", + " * }", + " */", + "", + "export const myMoveTaskAfterFunction = webMethod(Permissions.Anyone, async (taskId, options) => {", + "", + " try {", + " const elevatedMoveTaskAfter = elevate(tasks.moveTaskAfter);", + " await elevatedMoveTaskAfter(taskId, options);", + "", + " console.log('Successfuly updated task display.');", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " } ", + "});", + "" + ], + "extra": { + "description": "This function moves a specified task to be displayed after another task using the `moveTaskAfter()` function." + } + }, + { + "title": "Move a task to the top of the display. ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample taskId value: ", + " * '37c2c378-8085-4ef7-8a3e-6f341248e757'", + " */", + "", + "export const myMoveTaskAfterFunction = webMethod(Permissions.Anyone, async (taskId) => {", + " ", + " try {", + " const elevatedMoveTaskAfter = elevate(tasks.moveTaskAfter);", + " await elevatedMoveTaskAfter(taskId);", + " ", + " console.log('Moved task to top of display');", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " } ", + "});", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "moveTaskAfter", + "isAdminMethod": true + }, + { + "name": "queryTasks", + "params": [], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Creates a query to retrieve a list of tasks.", + "description": [ + "", + "The `queryTasks()` function builds a query to retrieve a list of tasks and returns a `TasksQueryBuilder` object. ", + "", + "The returned object contains the query definition which is typically used to run the query using the `find()` function. You can refine the query by chaining `TasksQueryBuilder` functions onto the query. `TasksQueryBuilder` functions enable you to sort, filter, and control the results that `queryTasks()` returns. ", + "", + "`queryTasks()` runs with these `TasksQueryBuilder` defaults, which you can override: ", + "- `limit(50)`", + "- `descending('_createdDate')`", + "", + "The functions that are chained to `queryTasks()` are applied in the order they are called. For example, if you apply `ascending('_createdDate')` and then `descending('_updatedDate')`, the results are sorted first by the created date and then, if there are multiple results with the same date, the items are sorted by the updated date.", + "", + "The following `TasksQueryBuilder` functions are supported for `queryTasks()`. For a full description of the `task` object, see the object returned for the `items` property in `TasksQueryResult`.", + "", + "", + "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", + "|:---:|:---:|", + "|`_id`|[`eq()`](wix-crm-v2.Tasks.TasksQueryBuilder#eq),[`ne()`](wix-crm-v2.Tasks.TasksQueryBuilder#ne),[`in()`](wix-crm-v2.Tasks.TasksQueryBuilder#in),[`ascending()`](wix-crm-v2.Tasks.TasksQueryBuilder#ascending),[`descending()`](wix-crm-v2.Tasks.TasksQueryBuilder#descending)|", + "|`_createdDate`|[`eq()`](wix-crm-v2.Tasks.TasksQueryBuilder#eq),[`ne()`](wix-crm-v2.Tasks.TasksQueryBuilder#ne),[`gt()`](wix-crm-v2.Tasks.TasksQueryBuilder#gt),[`lt()`](wix-crm-v2.Tasks.TasksQueryBuilder#lt),[`ge()`](wix-crm-v2.Tasks.TasksQueryBuilder#ge),[`le()`](wix-crm-v2.Tasks.TasksQueryBuilder#le),[`ascending()`](wix-crm-v2.Tasks.TasksQueryBuilder#ascending),[`descending()`](wix-crm-v2.Tasks.TasksQueryBuilder#descending)|", + "|`_updatedDate`|[`eq()`](wix-crm-v2.Tasks.TasksQueryBuilder#eq),[`ne()`](wix-crm-v2.Tasks.TasksQueryBuilder#ne),[`gt()`](wix-crm-v2.Tasks.TasksQueryBuilder#gt),[`lt()`](wix-crm-v2.Tasks.TasksQueryBuilder#lt),[`ge()`](wix-crm-v2.Tasks.TasksQueryBuilder#ge),[`le()`](wix-crm-v2.Tasks.TasksQueryBuilder#le),[`ascending()`](wix-crm-v2.Tasks.TasksQueryBuilder#ascending),[`descending()`](wix-crm-v2.Tasks.TasksQueryBuilder#descending)|", + "|`dueDate`|[`eq()`](wix-crm-v2.Tasks.TasksQueryBuilder#eq),[`ne()`](wix-crm-v2.Tasks.TasksQueryBuilder#ne),[`gt()`](wix-crm-v2.Tasks.TasksQueryBuilder#gt),[`lt()`](wix-crm-v2.Tasks.TasksQueryBuilder#lt),[`ge()`](wix-crm-v2.Tasks.TasksQueryBuilder#ge),[`le()`](wix-crm-v2.Tasks.TasksQueryBuilder#le),[`ascending()`](wix-crm-v2.Tasks.TasksQueryBuilder#ascending),[`descending()`](wix-crm-v2.Tasks.TasksQueryBuilder#descending)|", + "|`status`|[`eq()`](wix-crm-v2.Tasks.TasksQueryBuilder#eq),[`ne()`](wix-crm-v2.Tasks.TasksQueryBuilder#ne),[`in()`](wix-crm-v2.Tasks.TasksQueryBuilder#in)|", + "|`contact.id`|[`eq()`](wix-crm-v2.Tasks.TasksQueryBuilder#eq),[`ne()`](wix-crm-v2.Tasks.TasksQueryBuilder#ne),[`in()`](wix-crm-v2.Tasks.TasksQueryBuilder#in),[`exists()`](wix-crm-v2.Tasks.TasksQueryBuilder#exists)|" + ], + "examples": [ + { + "title": "Retrieve all tasks (dashboard page code)", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryTasksFunction() {", + "", + " try {", + " const queryResults = await tasks.queryTasks()", + " .find();", + "", + " const items = queryResults.items;", + " const firstItem = items[0];", + " const pageSize = queryResults.pageSize;", + " const hasNext = queryResults.hasNext();", + " const hasPrev = queryResults.hasPrev();", + " const length = queryResults.length;", + " const query = queryResults.query;", + " console.log('Retrieved items:', items);", + "", + " return items;", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * [", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Send email\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Julie\",", + " * \"lastName\": \"Jones\",", + " * \"email\": \"julie.jones@example.com\",", + " * \"phone\": \"+1 516-569-2772\",", + " * \"_id\": \"719784da-0361-4f86-b4a4-b38409d7bce1\"", + " * },", + " * \"_id\": \"37e5d602-adad-4ba3-ba3d-06384394fb9e\",", + " * \"_createdDate\": \"2024-01-18T13:47:38.292Z\",", + " * \"_updatedDate\": \"2024-01-18T13:47:38.292Z\"", + " * },", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Update Contact\",", + " * \"description\": \"Add new label to sontact\",", + " * \"dueDate\": \"2024-03-15T00:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Julie\",", + " * \"lastName\": \"Jones\",", + " * \"email\": \"julie.jones@example.com\",", + " * \"phone\": \"+1 516-569-2772\",", + " * \"_id\": \"719784da-0361-4f86-b4a4-b38409d7bce1\"", + " * },", + " * \"_id\": \"cdc52d55-e3e8-4fb4-8413-f15838e352b1\",", + " * \"_createdDate\": \"2024-01-18T13:46:18.198Z\",", + " * \"_updatedDate\": \"2024-01-18T13:46:18.198Z\"", + " * },", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Follow up\",", + " * \"dueDate\": \"2024-01-26T10:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"USER\",", + " * \"userId\": \"162e6672-d392-42f8-bf79-999ee633c92a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Jane\",", + " * \"lastName\": \"Doe\",", + " * \"email\": \"jane.doe1@example.com\",", + " * \"phone\": \"+1 214-533-2543\",", + " * \"_id\": \"dfcb4c01-7336-4b59-ae43-957cb89952ce\"", + " * },", + " * \"_id\": \"3a49f901-62d5-4ca2-a8e8-395c562a3f7b\",", + " * \"_createdDate\": \"2024-01-18T13:40:56.414Z\",", + " * \"_updatedDate\": \"2024-01-18T13:40:56.414Z\"", + " * },", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Follow up\",", + " * \"description\": \"Send a follow up email\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Sally\",", + " * \"lastName\": \"Smith\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"+1 524-624-2486\",", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\"", + " * },", + " * \"_id\": \"3194f3f2-945f-4810-8905-d02b24f9e790\",", + " * \"_createdDate\": \"2024-01-18T11:35:29.092Z\",", + " * \"_updatedDate\": \"2024-01-18T11:35:29.092Z\"", + " * }", + " * ]", + " */" + ] + }, + { + "title": "Retrieve all tasks (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "export const myQueryTasksFunction = webMethod(Permissions.Anyone, async () => {", + " try {", + " const elevatedQueryTasks = elevate(tasks.queryTasks);", + " const queryResults = await elevatedQueryTasks()", + " .find();", + "", + " const items = queryResults.items;", + " const firstItem = items[0];", + " const pageSize = queryResults.pageSize;", + " const hasNext = queryResults.hasNext();", + " const hasPrev = queryResults.hasPrev();", + " const length = queryResults.length;", + " const query = queryResults.query;", + " console.log('Retrieved items:', items);", + "", + " return items;", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * [", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Send email\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Julie\",", + " * \"lastName\": \"Jones\",", + " * \"email\": \"julie.jones@example.com\",", + " * \"phone\": \"+1 516-569-2772\",", + " * \"_id\": \"719784da-0361-4f86-b4a4-b38409d7bce1\"", + " * },", + " * \"_id\": \"37e5d602-adad-4ba3-ba3d-06384394fb9e\",", + " * \"_createdDate\": \"2024-01-18T13:47:38.292Z\",", + " * \"_updatedDate\": \"2024-01-18T13:47:38.292Z\"", + " * },", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Update Contact\",", + " * \"description\": \"Add new label to sontact\",", + " * \"dueDate\": \"2024-03-15T00:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Julie\",", + " * \"lastName\": \"Jones\",", + " * \"email\": \"julie.jones@example.com\",", + " * \"phone\": \"+1 516-569-2772\",", + " * \"_id\": \"719784da-0361-4f86-b4a4-b38409d7bce1\"", + " * },", + " * \"_id\": \"cdc52d55-e3e8-4fb4-8413-f15838e352b1\",", + " * \"_createdDate\": \"2024-01-18T13:46:18.198Z\",", + " * \"_updatedDate\": \"2024-01-18T13:46:18.198Z\"", + " * },", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Follow up\",", + " * \"dueDate\": \"2024-01-26T10:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"USER\",", + " * \"userId\": \"162e6672-d392-42f8-bf79-999ee633c92a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Jane\",", + " * \"lastName\": \"Doe\",", + " * \"email\": \"jane.doe1@example.com\",", + " * \"phone\": \"+1 214-533-2543\",", + " * \"_id\": \"dfcb4c01-7336-4b59-ae43-957cb89952ce\"", + " * },", + " * \"_id\": \"3a49f901-62d5-4ca2-a8e8-395c562a3f7b\",", + " * \"_createdDate\": \"2024-01-18T13:40:56.414Z\",", + " * \"_updatedDate\": \"2024-01-18T13:40:56.414Z\"", + " * },", + " * {", + " * \"revision\": \"1\",", + " * \"title\": \"Follow up\",", + " * \"description\": \"Send a follow up email\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Sally\",", + " * \"lastName\": \"Smith\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"+1 524-624-2486\",", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\"", + " * },", + " * \"_id\": \"3194f3f2-945f-4810-8905-d02b24f9e790\",", + " * \"_createdDate\": \"2024-01-18T11:35:29.092Z\",", + " * \"_updatedDate\": \"2024-01-18T11:35:29.092Z\"", + " * }", + " * ]", + " */", + "" + ] + }, + { + "title": "Retrieve all completed tasks ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "export const queryCompletedTasksFunction = webMethod(Permissions.Anyone, async () => {", + " try {", + " const elevatedQueryTasks = elevate(tasks.queryTasks);", + " const queryResults = await elevatedQueryTasks()", + " .eq(\"status\", \"COMPLETED\")", + " .ascending(\"_createdDate\")", + " .find();", + "", + " const items = queryResults.items;", + " const firstItem = items[0];", + " const pageSize = queryResults.pageSize;", + " const hasNext = queryResults.hasNext();", + " const hasPrev = queryResults.hasPrev();", + " const length = queryResults.length;", + " const query = queryResults.query;", + " console.log('Retrieved items:', items);", + "", + " return items;", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + "* [", + " * {", + " * \"revision\": \"2\",", + " * \"title\": \"Follow up\",", + " * \"description\": \"Send a follow up email\",", + " * \"status\": \"COMPLETED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Sally\",", + " * \"lastName\": \"Smith\",", + " * \"email\": \"sally.smith@example.com\",", + " * \"phone\": \"+1 524-624-2486\",", + " * \"_id\": \"5518ee7f-270e-40c4-b756-dad56e8f0ffc\"", + " * },", + " * \"_id\": \"3194f3f2-945f-4810-8905-d02b24f9e790\",", + " * \"_createdDate\": \"2024-01-18T11:35:29.092Z\",", + " * \"_updatedDate\": \"2024-01-18T14:50:25.210Z\"", + " * },", + " * {", + " * \"revision\": \"2\",", + " * \"title\": \"Send email\",", + " * \"status\": \"COMPLETED\",", + " * \"source\": {", + " * \"sourceType\": \"APP\",", + " * \"appId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Julie\",", + " * \"lastName\": \"Jones\",", + " * \"email\": \"julie.jones@example.com\",", + " * \"phone\": \"+1 516-569-2772\",", + " * \"_id\": \"719784da-0361-4f86-b4a4-b38409d7bce1\"", + " * },", + " * \"_id\": \"37e5d602-adad-4ba3-ba3d-06384394fb9e\",", + " * \"_createdDate\": \"2024-01-18T13:47:38.292Z\",", + " * \"_updatedDate\": \"2024-01-18T14:50:29.878Z\"", + " * }", + " * ]", + " */", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "queryTasks", + "isAdminMethod": true + }, + { + "name": "updateTask", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Task ID.", + "required": true + }, + { + "name": "task", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.UpdateTask" + } + ], + "doc": "Task to update.", + "required": true + } + ], + "requiredFields": [ + "_id", + "task", + "task.revision" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ] + } + } + ], + "doc": "The updated task.\n" + }, + "docs": { + "summary": "Updates a task.", + "description": [ + "Each time the task is updated, `revision` increments by 1.\nThe existing `revision` must be included when updating the task.\nThis ensures you're working with the latest task\nand prevents unintended overwrites." + ], + "examples": [ + { + "title": "Partially update a task (dashboard page code)", + "body": [ + "", + "import { tasks } from 'wix-crm.v2';", + "", + "/* Sample _id value:", + " * '3a49f901-62d5-4ca2-a8e8-395c562a3f7b'", + " *", + " * Sample task value:", + " * {", + " * revision: 2,", + " * status: 'COMPLETED',", + " * title: 'Send email", + " * }", + " */", + " ", + " export async function myUpdateTaskFunction(_id, task) {", + " ", + " try {", + " const updatedTask = await tasks.updateTask(_id, task);", + " ", + " return updatedTask;", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " } ", + "}", + "", + "/* Promise resolves to: ", + " * {", + " * \"revision\": \"3\",", + " * \"title\": \"Send email\",", + " * \"dueDate\": \"2024-02-08T10:00:00.000Z\",", + " * \"status\": \"COMPLETED\",", + " * \"source\": {", + " * \"sourceType\": \"USER\",", + " * \"userId\": \"162e6672-d392-42f8-bf79-999ee633c92a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Jane\",", + " * \"lastName\": \"Doe\",", + " * \"email\": \"jane.doe1@example.com\",", + " * \"phone\": \"+1 214-533-2543\",", + " * \"_id\": \"dfcb4c01-7336-4b59-ae43-957cb89952ce\"", + " * },", + " * \"_id\": \"3a49f901-62d5-4ca2-a8e8-395c562a3f7b\",", + " * \"_createdDate\": \"2024-01-18T13:40:56.414Z\",", + " * \"_updatedDate\": \"2024-01-18T15:44:52.606Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Partially update a task (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample _id value:", + " * '3a49f901-62d5-4ca2-a8e8-395c562a3f7b'", + " *", + " * Sample task value:", + " * {", + " * revision: 2,", + " * status: 'COMPLETED',", + " * title: 'Send email", + " * }", + " */", + " ", + "export const myUpdateTaskFunction = webMethod(Permissions.Anyone, async (_id, task) => {", + " try {", + " const elevatedUpdateTask = elevate(tasks.updateTask);", + " const updatedTask = await elevatedUpdateTask(_id, task);", + " ", + " return updatedTask;", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " } ", + "});", + "", + "/* Promise resolves to: ", + " * {", + " * \"revision\": \"3\",", + " * \"title\": \"Send email\",", + " * \"dueDate\": \"2024-02-08T10:00:00.000Z\",", + " * \"status\": \"COMPLETED\",", + " * \"source\": {", + " * \"sourceType\": \"USER\",", + " * \"userId\": \"162e6672-d392-42f8-bf79-999ee633c92a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Jane\",", + " * \"lastName\": \"Doe\",", + " * \"email\": \"jane.doe1@example.com\",", + " * \"phone\": \"+1 214-533-2543\",", + " * \"_id\": \"dfcb4c01-7336-4b59-ae43-957cb89952ce\"", + " * },", + " * \"_id\": \"3a49f901-62d5-4ca2-a8e8-395c562a3f7b\",", + " * \"_createdDate\": \"2024-01-18T13:40:56.414Z\",", + " * \"_updatedDate\": \"2024-01-18T15:44:52.606Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Update task ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { tasks } from 'wix-crm.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample _id value:", + " * '3a49f901-62d5-4ca2-a8e8-395c562a3f7b'", + " *", + " * Sample task value:", + " * {", + " * revision: 3,", + " * contact: {", + " * _id: 'dfcb4c01-7336-4b59-ae43-957cb89952ce'", + " * },", + " * description: 'Send follow up email email',", + " * dueDate: new Date(2024, 3, 16),", + " * status: 'ACTION_NEEDED',", + " * title: 'Follow up'", + " * }", + " */", + "", + "export const myUpdateTaskFunction = webMethod(Permissions.Anyone, async (_id, task) => {", + "", + " try {", + " const elevatedUpdateTask = elevate(tasks.updateTask);", + " const updatedTask = await elevatedUpdateTask(_id, task);", + " ", + " return updatedTask;", + " } catch (error) {", + " console.log(error);", + " // Handle the error", + " } ", + "});", + "", + "", + "", + "", + "/* Promise resolves to:", + " * {", + " * \"revision\": \"4\",", + " * \"title\": \"Follow up\",", + " * \"description\": \"Send follow up email email\",", + " * \"dueDate\": \"2024-04-16T00:00:00.000Z\",", + " * \"status\": \"ACTION_NEEDED\",", + " * \"source\": {", + " * \"sourceType\": \"USER\",", + " * \"userId\": \"162e6672-d392-42f8-bf79-999ee633c92a\"", + " * },", + " * \"contact\": {", + " * \"firstName\": \"Jane\",", + " * \"lastName\": \"Doe\",", + " * \"email\": \"jane.doe1@example.com\",", + " * \"phone\": \"+1 214-533-2543\",", + " * \"_id\": \"dfcb4c01-7336-4b59-ae43-957cb89952ce\"", + " * },", + " * \"_id\": \"3a49f901-62d5-4ca2-a8e8-395c562a3f7b\",", + " * \"_createdDate\": \"2024-01-18T13:40:56.414Z\",", + " * \"_updatedDate\": \"2024-01-18T15:49:53.065Z\"", + " * }", + " */" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "updateTask", + "isAdminMethod": true + } + ], + "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ContactInfo", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the contact associated with the task." + }, + { + "name": "email", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's primary email." + }, + { + "name": "firstName", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's first name." + }, + { + "name": "imageUrl", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's image url." + }, + { + "name": "lastName", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's last name." + }, + { + "name": "phone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's primary phone." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ContactNotFoundError", + "members": [ + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountTasksOptions", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter which tasks to count. See the list of supported filters in `queryContacts`.\n\nFilterable fields include:\n- `_id`\n- `_createdDate`\n- `_updatedDate`\n- `dueDate`\n- `status`\n- `contact.id`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountTasksRequest", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter which tasks to count. See the list of supported filters in `queryContacts`.\n\nFilterable fields include:\n- `_id`\n- `_createdDate`\n- `_updatedDate`\n- `dueDate`\n- `status`\n- `contact.id`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountTasksResponse", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of tasks that match the provided filter." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateTaskRequest", + "members": [ + { + "name": "task", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ], + "doc": "Task to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateTaskResponse", + "members": [ + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ], + "doc": "The created task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Cursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCursorQueryPagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.CursorPaging" + } + ], + "doc": "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`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Cursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteCompletedTasksRequest", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "An optional filter of tasks to count. See 'queryTasks' for supported filter options." + }, + { + "name": "taskIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Optional list of tasks ids of the tasks to delete. If the list is not provided the filter is used." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteCompletedTasksResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteTaskRequest", + "members": [ + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the task to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteTaskResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Empty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetTaskRequest", + "members": [ + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the task to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetTaskResponse", + "members": [ + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ], + "doc": "The retrieved task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MoveTaskAfterOptions", + "members": [ + { + "name": "beforeTaskId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The task ID after which the moved task is positioned in the display.\nIf `beforeTaskId` is not provided, the moved task is positioned first in the display of tasks." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MoveTaskAfterRequest", + "members": [ + { + "name": "beforeTaskId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The task ID after which the moved task is positioned in the display.\nIf `beforeTaskId` is not provided, the moved task is positioned first in the display of tasks." + }, + { + "name": "taskId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The task ID to move." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MoveTaskAfterResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Paging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PagingMetadataV2", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Cursors" + } + ], + "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "tooManyToCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag that indicates the server failed to calculate the `total` field." + }, + { + "name": "total", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryTasksInternalRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.QueryV2" + } + ], + "doc": "WQL expression" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryTasksInternalResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.PagingMetadataV2" + } + ], + "doc": "Details on the paged set of results returned." + }, + { + "name": "tasks", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ] + } + } + ], + "doc": "The retrieved Tasks" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryTasksRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.CursorQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryTasksResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "tasks", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ] + } + } + ], + "doc": "The retrieved tasks." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryV2", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned." + }, + { + "name": "fieldsets", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Paging" + } + ], + "doc": "Paging options to limit and skip the number of items." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfQueryV2PagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryV2PagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Paging" + } + ], + "doc": "Paging options to limit and skip the number of items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RepositionTask", + "members": [ + { + "name": "position", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The position of the last task that was re-positioned" + }, + { + "name": "taskId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The id of the last task that was re-positioned" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SendTasksReminderRequest", + "members": [ + { + "name": "reminderType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The reminder type" + }, + { + "name": "taskIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Ids of the tasks to remind" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SendTasksReminderResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Sorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Task", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the task was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Task ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the task was last updated." + }, + { + "name": "contact", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.ContactInfo" + } + ], + "doc": "Information about the contact associated with the task." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the task." + }, + { + "name": "dueDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Due date for the task." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task." + }, + { + "name": "source", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TaskSource" + } + ], + "doc": "Details about the task source." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Status of the task.\n\nSupported values: `\"ACTION_NEEDED\"`, `\"COMPLETED\"`.\n\nDefault: `\"ACTION_NEEDED\"`\n" + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Title of the task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TaskAssigned", + "members": [ + { + "name": "assigneeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The id of the assignee" + }, + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ], + "doc": "The task that was assigned" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TaskNotFoundError", + "members": [ + { + "name": "taskId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The task id that was not found" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TaskOverdue", + "members": [ + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ], + "doc": "The overdue task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TaskSource", + "members": [ + { + "name": "appId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "App ID, if the task was created by an app." + }, + { + "name": "sourceType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "How the task was created.\n\nSupported values: `\"APP\"`, `\"USER\"`." + }, + { + "name": "userId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID, if the task was created by a user." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateTask", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the task was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Task ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the task was last updated." + }, + { + "name": "contact", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.ContactInfo" + } + ], + "doc": "Information about the contact associated with the task." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the task." + }, + { + "name": "dueDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Due date for the task." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the task is updated. To prevent conflicting changes, the existing `revision` must be used when updating a task." + }, + { + "name": "source", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TaskSource" + } + ], + "doc": "Details about the task source." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Status of the task.\n\nSupported values: `\"ACTION_NEEDED\"`, `\"COMPLETED\"`.\n\nDefault: `\"ACTION_NEEDED\"`\n" + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Title of the task." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateTaskOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateTaskRequest", + "members": [ + { + "name": "task", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ], + "doc": "Task to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateTaskResponse", + "members": [ + { + "name": "task", + "optional": true, + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ], + "doc": "The updated task." + } + ], + "docs": { + "description": [ + "" + ] + } + } + ] +} diff --git a/wix-crm-v2/wix-crm-v2/Tasks/TasksQueryBuilder.service.json b/wix-crm-v2/wix-crm-v2/Tasks/TasksQueryBuilder.service.json new file mode 100644 index 0000000000..b83c140001 --- /dev/null +++ b/wix-crm-v2/wix-crm-v2/Tasks/TasksQueryBuilder.service.json @@ -0,0 +1,1034 @@ +{ + "name": "TasksQueryBuilder", + "memberOf": "wix-crm-v2.Tasks", + "mixes": [], + "callbacks": [], + "extra": {}, + "clientId": "wix-crm.v2-task.tasks.tasks-query-builder", + "docs": {}, + "relatedGuides": [], + "properties": [], + "operations": [ + { + "name": "ascending", + "params": [ + { + "name": "propertyNames", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Adds a sort to a query, sorting by the specified properties in ascending order.", + "description": [ + "The `ascending()` function refines a `TasksQueryBuilder` to sort by the value of `propertyName` in ascending order.", + "You can specify multiple properties for sorting in ascending order by passing each property name as an additional argument. `ascending()` sorts the results in the order the properties are passed.", + "You can sort the following types:", + "- Number: Sorts numerically.", + "- Date: Sorts by date and time.", + "- String: Sorts lexicographically, so `'abc'` comes after `'XYZ'`.", + "If a property contains a number stored as a string (for example, `'0'`), that value is sorted alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest." + ], + "examples": [ + { + "title": "Add an `ascending` sort to a query", + "body": [ + "const query = tasks.queryTasks.ascending('_id');", + "" + ] + }, + { + "title": "Create a query, add an `ascending` sort, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().ascending('_id').find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "ascending" + }, + { + "name": "descending", + "params": [ + { + "name": "propertyNames", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Adds a sort to a query, sorting by the specified properties in descending order.", + "description": [ + "The `descending()` function refines a `TasksQueryBuilder` to sort by the value of `propertyName` in descending order.", + "You can specify multiple properties for sorting in descending order by passing each property name as an additional argument. `descending()` sorts the results in the order the properties are passed.", + "You can sort the following types:", + "- Number: Sorts numerically.", + "- Date: Sorts by date and time.", + "- String: Sorts lexicographically, so `'abc'` comes after `'XYZ'`.", + "If a property contains a number stored as a string (for example, `'0'`), that value is sorted alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest." + ], + "examples": [ + { + "title": "Add a `descending` sort to a query", + "body": [ + "const query = tasks.queryTasks.descending('_id');", + "" + ] + }, + { + "title": "Create a query, add a `descending` sort, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().descending('_id').find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "descending" + }, + { + "name": "eq", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `value`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Value to compare against.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items where the specified property equals the specified value.", + "description": [ + "The `eq()` function refines a `TasksQueryBuilder` to match only items where the value of the specified `propertyName` equals the specified `value`.", + "`eq()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", + "Matching strings with `eq()` is case-sensitive, so `'text'` isn't equal to `'Text'`." + ], + "examples": [ + { + "title": "Add an `eq` filter to a query", + "body": [ + "const query = tasks.queryTasks.eq('_id', 'some-id');", + "" + ] + }, + { + "title": "Create a query, add an `eq` filter, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks", + " .queryTasks()", + " .eq('_id', 'bb19b637-74ce-55d3-ae32-430b588051da')", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "eq" + }, + { + "name": "exists", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items where the specified property contains a value.", + "description": [ + "The `exists()` function refines a `TasksQueryBuilder` to only match items where the value of the specified `propertyName` doesn't equal null or undefined.", + " `exists()` checks for either existence or non-existence based on the boolen parameter. Note that `exists()` does match items where the value of the specified `propertyName` is an empty string or an invalid value. `exists()` is only useful for properties which don't contain default values and therefore their values may be unassigned." + ], + "examples": [ + { + "title": "Add an `exists` filter to a query", + "body": [ + "const query = tasks.queryTasks.exists('description', 'some-description');", + "" + ] + }, + { + "title": "Create a query, add an `exists` filter, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks", + " .queryTasks()", + " .exists('description', 'some-description')", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "exists" + }, + { + "name": "find", + "params": [], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryResult" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Returns the query results.", + "description": [ + "The `find()` function returns a Promise that resolves to the query results and metadata.", + "The Promise is rejected if `find()` is called with insufficient permissions or if any of the previous functions used to refine the query are invalid." + ], + "examples": [ + { + "title": "Run a query with no filters", + "body": [ + "const query = tasks.queryTasks.find();", + "" + ] + }, + { + "title": "Perform a `find` on a query", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "find" + }, + { + "name": "ge", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `value`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Value to compare against.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items where the specified property is greater than or equal to the specified value.", + "description": [ + "The `ge()` function refines a `TasksQueryBuilder` to match only items where the value of the specified `propertyName` is greater than or equal to the specified `value`.", + "`ge()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", + "If a property contains a number stored as a string (for example, `'0'`), that value is compared alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest.", + "The following types of properties can be compared:", + "- Number: Compares numerically.", + "- Date: Compares JavaScript Date objects. ", + "- String: Compares lexicographically, so `'abc'` is greater than `'ABC'`." + ], + "examples": [ + { + "title": "Add a `ge` filter to a query", + "body": [ + "const query = tasks.queryTasks.ge('_createdDate', '2021-03-01');", + "" + ] + }, + { + "title": "Create a query, add a `ge` filter, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks", + " .queryTasks()", + " .ge('_createdDate', '2021-03-01')", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "ge" + }, + { + "name": "gt", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `value`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Value to compare against.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items where the specified property is greater than the specified value.", + "description": [ + "The `gt()` function refines a `TasksQueryBuilder` to match only items where the value of the specified `propertyName` is greater than the specified `value`.", + "`gt()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", + "If a property contains a number stored as a string (for example, `'0'`), that value is compared alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest.", + "The following types of properties can be compared:", + "- Number: Compares numerically.", + "- Date: Compares JavaScript Date objects. ", + "- String: Compares lexicographically, so `'abc'` is greater than `'ABC'`." + ], + "examples": [ + { + "title": "Add a `gt` filter to a query", + "body": [ + "const query = tasks.queryTasks.gt('_createdDate', '2021-03-01');", + "" + ] + }, + { + "title": "Create a query, add a `gt` filter, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks", + " .queryTasks()", + " .gt('_createdDate', '2021-03-01')", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "gt" + }, + { + "name": "in", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "any" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to only match items where the specified property conatins any of the values in the provided array of values.", + "description": [ + "The `in()` function refines a `TasksQueryBuilder` to match only items where the specified `propertyName` is equal to any of the values in the provided array.", + "Matching strings with `in()` is case-sensitive, so `'text'` isn't equal to `'Text'`." + ], + "examples": [ + { + "title": "Add an `in` filter to a query", + "body": [ + "const query = tasks.queryTasks.in(", + " ['labelIds', 'colors'],", + " ['red', 'blue', 'purple']", + ");", + "" + ] + }, + { + "title": "Create a query, add an `in` filter, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks", + " .queryTasks()", + " .in(['labelIds', 'colors'], ['red', 'blue', 'purple'])", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "in" + }, + { + "name": "le", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `value`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Value to compare against.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items where the specified property is less than or equal to the specified value.", + "description": [ + "The `le()` function refines a `TasksQueryBuilder` to match only items where the value of the specified `propertyName` is less than or equal to the specified `value`.", + "`le()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", + "If a property contains a number stored as a string (for example, `'0'`), that value is compared alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest.", + "The following types of properties can be compared:", + "- Number: Compares numerically.", + "- Date: Compares JavaScript Date objects. ", + "- String: Compares lexicographically, so `'ABC'` is less than `'abc'`." + ], + "examples": [ + { + "title": "Add an `le` filter to a query", + "body": [ + "const query = tasks.queryTasks.le('_createdDate', '2021-03-01');", + "" + ] + }, + { + "title": "Create a query, add an `le` filter, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks", + " .queryTasks()", + " .le('_createdDate', '2021-03-01')", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "le" + }, + { + "name": "limit", + "params": [ + { + "name": "limit", + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to return, which is also the `pageSize` of the results object.", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Limits the number of items the query returns.", + "description": [ + "The `limit()` function defines the number of results a query returns in each page. Only one page of results is retrieved at a time.", + "You can use the `next()` and `prev()` functions to navigate the pages of a query result." + ], + "examples": [ + { + "title": "Add a `limit` to a query", + "body": [ + "const query = tasks.queryTasks.limit(10);", + "" + ] + }, + { + "title": "Create a query, add a `limit`, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().limit(10).find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "limit" + }, + { + "name": "lt", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `value`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Value to compare against.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items where the specified property is less than the specified value.", + "description": [ + "The `le()` function refines a `TasksQueryBuilder` to match only items where the value of the specified `propertyName` is less than the specified `value`.", + "`le()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", + "If a property contains a number stored as a string (for example, `'0'`), that value is compared alphabetically and not numerically. If a property doesn't have a value, that value is ranked lowest.", + "The following types of properties can be compared:", + "- Number: Compares numerically.", + "- Date: Compares JavaScript Date objects. ", + "- String: Compares lexicographically, so `'ABC'` is less than `'abc'`." + ], + "examples": [ + { + "title": "Add an `lt` filter to a query", + "body": [ + "const query = tasks.queryTasks.lt('_createdDate', '2021-03-01');", + "" + ] + }, + { + "title": "Create a query, add an `lt` filter, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks", + " .queryTasks()", + " .lt('_createdDate', '2021-03-01')", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "lt" + }, + { + "name": "ne", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `value`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Value to compare against.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items where the specified property doesn't equal the specified value.", + "description": [ + "The `ne()` function refines a `TasksQueryBuilder` to match only items where the value of the specified `propertyName` doesn't equal the specified `value`.", + "`ne()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", + "Matching strings with `ne()` is case-sensitive, so `'text'` isn't equal to `'Text'`." + ], + "examples": [ + { + "title": "Add an `ne` filter to a query", + "body": [ + "const query = tasks.queryTasks.ne(", + " '_id',", + " 'bb19b637-74ce-55d3-ae32-430b588051da'", + ");", + "" + ] + }, + { + "title": "Create a query, add an `ne` filter, and run it", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks", + " .queryTasks()", + " .ne('_id', 'bb19b637-74ce-55d3-ae32-430b588051da')", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "ne" + }, + { + "name": "skipTo", + "params": [ + { + "name": "cursor", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A pointer to specific record", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query that skips to a specific record.", + "description": [ + "The `skipTo()` function refines a `TasksQueryBuilder` to return items that appear before or after the item pointed to by the provided cursor. Get the relevant cursor for a specific item from the `cursors` object in previous call's response. Then you can skip to `cursors.prev` to return items before the cursor, or `cursors.next` to return items after the cursor.", + " ", + "When using `skipTo()`, the filters and the sorting order of the original query can't be changed. Only the `limit()` property of the query can be changed." + ], + "examples": [ + { + "title": "Perform a query and skip to the next cursor", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " const nextCursor = results.cursors.next;", + " return tasks.queryTasks().skipTo(nextCursor).find();", + "}", + "" + ] + }, + { + "title": "Perform a query and skip to the previous cursor", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " const prevCursor = results.cursors.prev;", + " return tasks.queryTasks().skipTo(prevCursor).find();", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "skipTo" + } + ], + "messages": [] +} diff --git a/wix-crm-v2/wix-crm-v2/Tasks/TasksQueryResult.service.json b/wix-crm-v2/wix-crm-v2/Tasks/TasksQueryResult.service.json new file mode 100644 index 0000000000..3db39e14b0 --- /dev/null +++ b/wix-crm-v2/wix-crm-v2/Tasks/TasksQueryResult.service.json @@ -0,0 +1,415 @@ +{ + "name": "TasksQueryResult", + "memberOf": "wix-crm-v2.Tasks", + "mixes": [], + "callbacks": [], + "extra": {}, + "clientId": "wix-crm.v2-task.tasks.tasks-query-result", + "docs": {}, + "relatedGuides": [], + "properties": [ + { + "name": "cursors", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.Cursors" + } + ], + "docs": { + "summary": "Returns the query cursors.", + "description": [ + "`cursors` returns the query's `next` and `prev` cursors." + ], + "examples": [ + { + "title": "Get the query's cursors", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " const cursors = results.cursors;", + "}", + "" + ] + } + ] + } + }, + { + "name": "items", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.Task" + } + ] + } + } + ], + "docs": { + "summary": "Returns an array of `tasks` items that match the query.", + "description": [ + "`items` contains the current page of results retrieved by the query.", + "If no results match the query, `items` is an empty array.", + "The page size is defined by the [`limit()`](wix-crm-v2.Tasks.TasksQueryBuilder#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `tasks` to navigate the pages of a query result." + ], + "examples": [ + { + "title": "Get `items` from a query result", + "body": [ + "const returnedItems = results.items;", + "" + ] + }, + { + "title": "Perform a query and get `items` from the result", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " const returnedItems = results.items;", + "", + " if (returnedItems.length > 0) {", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + } + }, + { + "name": "length", + "type": [ + { + "nativeType": "number" + } + ], + "docs": { + "summary": "Returns the number of items in the current page of results.", + "description": [ + "`length` returns just the number of items in the current page, not the total number of items that match the query. For the total number of items that match the query, see [`totalCount`](#totalcount).", + "The page size is defined by the [`limit()`](wix-crm-v2.Tasks.TasksQueryBuilder#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `tasks` to navigate the pages of a query result." + ], + "examples": [ + { + "title": "Get `length` from a query result", + "body": [ + "const resultLength = results.length;", + "" + ] + }, + { + "title": "Perform a query and get `length` from the result", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " return results.length;", + "}", + "" + ] + } + ] + } + }, + { + "name": "pageSize", + "type": [ + { + "nativeType": "number" + } + ], + "docs": { + "summary": "Returns the requested page size.", + "description": [ + "`pageSize` returns the page size set in [`limit()`](wix-crm-v2.Tasks.TasksQueryBuilder#limit) in `TasksQueryBuilder`." + ], + "examples": [ + { + "title": "Get the query's page size", + "body": [ + "const requestedPageSize = results.pageSize;", + "" + ] + }, + { + "title": "Perform a query and get `pageSize` from the result", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " return results.pageSize;", + "}", + "" + ] + } + ] + } + }, + { + "name": "query", + "type": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryBuilder" + } + ], + "docs": { + "summary": "Returns the `TasksQueryBuilder` object used to get the current results.", + "description": [ + "Use `query` to create and run a new query by chaining additional `TasksQueryBuilder` functions to it. You can filter only on properties that haven't already been used in the previous `TasksQueryBuilder`." + ], + "examples": [ + { + "title": "Get `query` that produced the current result", + "body": [ + "const originalQuery = results.query;", + "" + ] + }, + { + "title": "Perform a query and get `query` from the result", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " return results.query;", + "}", + "" + ] + } + ] + } + } + ], + "operations": [ + { + "name": "hasNext", + "params": [], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": null + }, + "docs": { + "summary": "Indicates whether the query has more results.", + "description": [ + "You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `tasks` to navigate the pages of a query result." + ], + "examples": [ + { + "title": "Get whether the query has more results", + "body": [ + "const hasNext = results.hasNext();", + "" + ] + }, + { + "title": "Perform a query and get `hasNext` from the result", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " return results.hasNext();", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "hasNext" + }, + { + "name": "hasPrev", + "params": [], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": null + }, + "docs": { + "summary": "Indicates whether the query has previous results.", + "description": [ + "You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `tasks` to navigate the pages of a query result." + ], + "examples": [ + { + "title": "Get whether the query has previous results", + "body": [ + "const hasPrev = results.hasPrev();", + "" + ] + }, + { + "title": "Perform a query and get `hasPrev` from the result", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " return results.hasPrev();", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "hasPrev" + }, + { + "name": "next", + "params": [], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryResult" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves the next page of query results.", + "description": [ + "The `next()` function retrieves the next page of query results.", + "The page size is defined by the [`limit()`](wix-crm-v2.Tasks.TasksQueryBuilder#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `tasks` to navigate the pages of a query result.", + "If items are added or removed between calls to `next()`, the values returned by `TasksQueryBuilder` may change." + ], + "examples": [ + { + "title": "Get `next` from a query result", + "body": [ + "const nextPage = results.next();", + "" + ] + }, + { + "title": "Perform a query and get `next` from the result", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " return results.next();", + "}", + "" + ] + }, + { + "title": "Iterate through all pages of query results", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " let allItems = [];", + "", + " const results = await tasks.queryTasks().limit(1000).find();", + " allItems.push(results.items);", + "", + " while (results.hasNext()) {", + " results = await results.next();", + " allItems.push(results.items);", + " }", + "", + " return allItems;", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "next" + }, + { + "name": "prev", + "params": [], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-crm-v2.Tasks.TasksQueryResult" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves the previous page of query results.", + "description": [ + "The `prev()` function retrieves the previous page of query results.", + "The page size is defined by the [`limit()`](wix-crm-v2.Tasks.TasksQueryBuilder#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `tasks` to navigate the pages of a query result.", + "If items are added or removed between calls to `prev()`, the values returned may change." + ], + "examples": [ + { + "title": "Get `prev` from a query result", + "body": [ + "const previousPage = results.prev();", + "" + ] + }, + { + "title": "Perform a query and get `prev` from the result", + "body": [ + "import { tasks } from 'wix-crm.v2';", + "", + "export async function myQueryFunction() {", + " const results = await tasks.queryTasks().find();", + "", + " return results.prev();", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "prev" + } + ], + "messages": [] +} diff --git a/wix-crm-v2/wix-crm-v2/Tasks/guides/Intro.md b/wix-crm-v2/wix-crm-v2/Tasks/guides/Intro.md index 9722961bbb..2d72b2708d 100644 --- a/wix-crm-v2/wix-crm-v2/Tasks/guides/Intro.md +++ b/wix-crm-v2/wix-crm-v2/Tasks/guides/Intro.md @@ -6,13 +6,35 @@ title: Introduction   -
+ + + +With [Tasks](wix-crm-v2/tasks), site admins can efficiently create and manage tasks on a site. This enables site admins to organize and prioritize their daily activities, enhancing their customer relationship management. Tasks include activities such as follow up calls or emails, scheduling meetings with clients, tracking steps for customer onboarding, and more. + +The Tasks API allows you to: + +- [Create](wix-crm-v2/tasks/createtask) and [update](wix-crm-v2/tasks/updatetask) tasks with the option to set a due date or to link the task to a contact. +- [Count](wix-crm-v2/tasks/counttasks) the total amount of tasks, or count the amount of tasks based on provided filters. For example, you can count the number of tasks that are linked to a specific contact. +- [Retrieve](wix-crm-v2/tasks/querytasks) tasks. +- [Prioritize](wix-crm-v2/tasks/movetaskafter) your tasks by adjusting the display order. +- [Delete](wix-crm-v2/tasks/deletetask) tasks you no longer need. + +## Before you begin +It is important to note the following before you start to code: +- The `dueDate` field only accepts dates formatted as a JS Date object. This field doesn't work with functional testing as JSON doesn't accept Date objects. + + +To use the Tasks API, import `tasks` from `wix-crm.v2`: + +```js +import { tasks } from 'wix-crm.v2'; +``` -  ## Permissions information @@ -22,11 +44,8 @@ Functions in the Tasks API are restricted and only run if you elevate permission

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

-This service allows you to manage a site's tasks. Use [tasks](https://support.wix.com/en/article/about-tasks-reminders) to organize and prioritize your work with [Ascend by Wix](https://support.wix.com/en/article/about-ascend-by-wix). -To use the Tasks API, -import `tasks` from wix-crm.v2: +## Terminology -```js -import { tasks } from 'wix-crm.v2'; -``` +- **Task**: A specific activity, action, or assignment that needs to be completed by a site admin. +- **Reminder notification**: A notification that is sent if the task has a due date. The reminder is sent the day before the due date and on the due date. \ No newline at end of file diff --git a/wix-dashboard/wix-dashboard.service.json b/wix-dashboard/wix-dashboard.service.json index 7edb007326..e604ef800d 100644 --- a/wix-dashboard/wix-dashboard.service.json +++ b/wix-dashboard/wix-dashboard.service.json @@ -8,13 +8,14 @@ "docs": { "summary": "The wix-dashboard module contains functionality for interacting with your site's dashboard in the code for dashboard pages.", "description": - [ "The Wix Dashboard API allows the code in [dashboard pages](https://support.wix.com/en/article/velo-working-with-dashboard-pages) to interact with the Wix dashboard enviroment.", + [ "The Wix Dashboard API allows the code for dashboard pages created in the [Wix Editor](https://support.wix.com/en/article/velo-working-with-dashboard-pages) or with [Wix Blocks](https://support.wix.com/en/article/wix-blocks-creating-and-managing-blocks-dashboard-pages) to interact with the Wix dashboard environment.", + "", "", "Using the module you can:", "- Navigate users to other pages in the dashboard.", "- Display toast notifications at the top of the dashboard. ", " ![Toast notification](/images/toast_example.png \"Toast notification\")", - "", + "- Retrieve data about changes to the dashboard's state and use it to update your page in real time.", "", "To use the Wix Dashboard API, import the applicable function from `wix-dashboard`:", "", @@ -29,24 +30,59 @@ { } }, "properties": [], "operations": - [ { "name": "navigate", + [ { "name": "getPageUrl", "labels": [], "nameParams": [], "params": - [ { "name": "pageId", - "type": "string", - "doc": "ID of the page to navigate to. Use the [Dashboard Page IDs](#dashboard-page-ids) table to find the appropriate ID." } ], + [ { "name": "destination", + "type": "wix-dashboard.Destination", + "doc": "URL destination details." } ], + "ret": + { "type": + { "name": "Promise", + "typeParams": + [ "string" ] }, + "doc": "Fulfilled - The URL of the dashboard page." }, + "locations": + [ { "lineno": 15, + "filename": "navigation.js" } ], + "docs": + { "summary": "Gets the full URL for a dashboard page.", + "description": + [ "> This function can only be used in page code files for dashboard pages created in the [Wix Editor](https://support.wix.com/en/article/velo-working-with-dashboard-pages) or with [Wix Blocks](https://support.wix.com/en/article/wix-blocks-creating-and-managing-blocks-dashboard-pages)." ], + "links": [], + "examples": + [ { "title": "Get the URL of the dashboard home page", + "body": + [ "import { getPageUrl } from 'wix-dashboard';", + "", + "// ...", + "", + "console.log('Home page url is:', await getPageUrl({pageId: 'home'}));" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "navigate", + "labels": [], + "nameParams": [], + "params": + [ { "name": "destination", + "type": "wix-dashboard.Destination", + "doc": "Destination to navigate to." } ], "ret": { "type": "void" }, "locations": [ { "lineno": 1, - "filename": "navigate.js" } ], + "filename": "navigation.js" } ], "docs": { "summary": "Navigates the user to another page in the dashboard.", "description": - [ "> This function can only be used in page code files for [dashboard pages](https://support.wix.com/en/article/velo-working-with-dashboard-pages).", + [ "> This function can only be used in page code files for dashboard pages created in the [Wix Editor](https://support.wix.com/en/article/velo-working-with-dashboard-pages) or with [Wix Blocks](https://support.wix.com/en/article/wix-blocks-creating-and-managing-blocks-dashboard-pages).", "", - "If an invalid `pageId` value is passed to this function, a **Page Not Found** message is displayed in the dashboard." ], + "If a `destination` object with an invalid `pageId` value is passed to this function, a **Page Not Found** message is displayed in the dashboard." ], "links": [], "examples": [ { "title": "Navigate to the dashboard home page", @@ -55,17 +91,55 @@ "", "// ...", "", - "navigate('home');" ], + "navigate({pageId: 'home'});" ], "extra": { } } ], "extra": { } }, "extra": { } }, - { "name": "showToast", + { "name": "observeState", "labels": [ "changed" ], "nameParams": [], + "params": + [ { "name": "observer", + "type": "wix-dashboard.observeStateCallback", + "doc": "Callback function for receiving state data." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 1, + "filename": "observeState.js" } ], + "docs": + { "summary": "Defines a callback function that receives changes to the state of a dashboard page's environment.", + "description": + [ "> This function can only be used in page code files for dashboard pages created in the [Wix Editor](https://support.wix.com/en/article/velo-working-with-dashboard-pages) or with [Wix Blocks](https://support.wix.com/en/article/wix-blocks-creating-and-managing-blocks-dashboard-pages).", + "", + "Use the data passed to `observeState()`'s callback function to dynamically update a dashboard page's content.", + "", + "The callback function passed to `observeState()` is triggered when the dashboard page is initialized and every time it's updated." ], + "links": [], + "examples": + [ { "title": "Receive state data and log it to the console", + "body": + [ "import { observeState } from 'wix-dashboard';", + "", + "// ...", + "", + "observeState((pageParams, environmentState) => {", + " console.log('custom param', pageParams.customParam);", + " console.log('locale', environmentState.locale);", + "});" ], + "extra": + { } } ], + "extra": + { } }, + "extra": + { } }, + { "name": "showToast", + "labels": [], + "nameParams": [], "params": [ { "name": "config", "type": "wix-dashboard.ToastConfig", @@ -78,7 +152,7 @@ "docs": { "summary": "Displays a toast notification at the top of a dashboard page.\n\n![Toast notification](/images/toast_example.png \"Toast notification\")", "description": - [ "> This function can only be used in page code files for [dashboard pages](https://support.wix.com/en/article/velo-working-with-dashboard-pages).", + [ "> This function can only be used in page code files for dashboard pages created in the [Wix Editor](https://support.wix.com/en/article/velo-working-with-dashboard-pages) or with [Wix Blocks](https://support.wix.com/en/article/wix-blocks-creating-and-managing-blocks-dashboard-pages).", "", "The `showToast()` function returns an object containing a key called `remove`. ", "The value of `remove` is a function that removes the toast from the page.", @@ -89,7 +163,7 @@ "* Create a clickable call-to-action that displays in the toast.", "", "When showing multiple toasts, requests to display toasts may be queued and the toast may not be displayed immediately. Toasts with a higher", - "priority level are displayed first. A toasts priority is defined using the `config.priority` parameter. Toasts with the same priority level are displayed in the order", + "priority level are displayed first. A toast's priority is defined using the `config.priority` parameter. Toasts with the same priority level are displayed in the order", "they're requested. ", "", "> **Note:** When the timeout parameter is set to `\"none\"` the toast is rendered into the page layout and pushes the rest of the page down. When timeout is set to `\"normal\"`, the toast appears on top of other content on the page." ], @@ -173,9 +247,101 @@ { } }, "extra": { } } ], - "callbacks": [], + "callbacks": + [ { "name": "observeStateCallback", + "labels": + [ "changed" ], + "nameParams": [], + "params": + [ { "name": "pageParams", + "type": "Object", + "doc": "Custom parameters passed to the dashboard page." }, + { "name": "environmentState", + "type": "wix-dashboard.EnvironmentState", + "doc": "Data about the dashboard's environment." } ], + "ret": + { "type": "void" }, + "locations": + [ { "lineno": 18, + "filename": "observeState.js" } ], + "docs": + { "links": [], + "examples": [], + "extra": + { } }, + "extra": + { } } ], "messages": - [ { "name": "ToastAction", + [ { "name": "Destination", + "locations": + [ { "lineno": 30, + "filename": "navigation.js" } ], + "docs": + { "summary": "Destination Object", + "links": [], + "examples": [], + "extra": + { } }, + "members": + [ { "name": "pageId", + "type": "string", + "doc": "ID of the page to link to. Use the [Dashboard Page IDs](#dashboard-page-ids) table to find the appropriate ID." }, + { "name": "relativeUrl", + "type": "string", + "doc": "URL segment to append to the base URL of the selected page. Can include path segments, a query string, and a fragment identifier.", + "optional": true } ], + "extra": + { }, + "labels": [] }, + { "name": "EnvironmentState", + "locations": + [ { "lineno": 24, + "filename": "observeState.js" } ], + "docs": + { "links": [], + "examples": [], + "extra": + { } }, + "members": + [ { "name": "locale", + "type": "string", + "doc": "User's locale." }, + { "name": "pageLocation", + "type": "wix-dashboard.PageLocation", + "doc": "Information about the currently rendered page location." } ], + "extra": + { }, + "labels": [] }, + { "name": "PageLocation", + "locations": + [ { "lineno": 30, + "filename": "observeState.js" } ], + "docs": + { "summary": "PageLocation Object", + "links": [], + "examples": [], + "extra": + { } }, + "members": + [ { "name": "pageId", + "type": "string", + "doc": "ID of the rendered page." }, + { "name": "pathname", + "type": "string", + "doc": "Any parts of the current URL path appended to the page's full URL." }, + { "name": "search", + "type": "string", + "doc": "The current URL's query string.", + "optional": true }, + { "name": "hash", + "type": "string", + "doc": "The current URL's fragment.", + "optional": true } ], + "extra": + { }, + "labels": + [ "changed" ] }, + { "name": "ToastAction", "locations": [ { "lineno": 65, "filename": "toast.js" } ], @@ -219,7 +385,7 @@ "doc": "Text that appears in the toast." }, { "name": "timeout", "type": "string", - "doc": "Whether the toast removes itself or not. \n\nOptions: \n- `\"normal\"`: The toast removes itself after 6 seconds.\n- `\"none\"`: The toast doesn't remove itself.\n\nDefault: `\"normal\"`", + "doc": "Whether the toast removes itself. \n\nOptions: \n- `\"normal\"`: The toast removes itself after 6 seconds.\n- `\"none\"`: The toast doesn't remove itself.\n\nDefault: `\"normal\"`", "optional": true }, { "name": "type", "type": "string", diff --git a/wix-data-v2/wix-data-v2/Collections.service.json b/wix-data-v2/wix-data-v2/Collections.service.json index 6850e6c0ed..0083d00f83 100644 --- a/wix-data-v2/wix-data-v2/Collections.service.json +++ b/wix-data-v2/wix-data-v2/Collections.service.json @@ -51,13 +51,13 @@ "docs": { "summary": "Creates a new data collection.", "description": [ - "The request body must include an ID, details for at least 1 field, and a permissions object. If any of these are missing, the collection isn't created.\n\nThis function is not a universal function and runs only on the backend." + "The request body must include an ID, details for at least 1 field, and a permissions object. If any of these are missing, the collection isn't created." ], "examples": [ { "title": "Create a data collection that only authorized users can edit", "body": [ - "", + "import { Permissions, webMethod } from \"wix-web-module\";", "import { collections } from \"wix-data.v2\";", "", "/* Sample collection object: ", @@ -101,7 +101,7 @@ " * }; ", " */", "", - "export async function myCreateDataCollectionFunction(newCollection) {", + "export const myCreateDataCollectionFunction = webMethod(Permissions.Anyone, async (newCollection) => {", " try {", " const createDataCollectionResponse = await collections.createDataCollection(newCollection);", " return createDataCollectionResponse;", @@ -109,7 +109,7 @@ " console.error(error);", " // Handle the error", " } ", - "}", + "});", "", "", "/* Returns a promise that resolves to the created collection:", @@ -380,7 +380,8 @@ { "title": "Create a permissions-protected collection with dynamic URLs ", "body": [ - "import { collections } from \"wix-data.v2\";", + "import { Permissions, webMethod } from 'wix-web-module';", + "import { collections } from 'wix-data.v2';", "", "/* Sample collection object:", " * Includes a plugin that generates dynamic pages for each item in the collection.", @@ -428,7 +429,7 @@ " * }; ", " */ ", "", - "export async function myCreateDataCollectionFunctionAdvanced(newCollection) {", + "export const myCreateDataCollectionFunctionAdvanced = webMethod(Permissions.Anyone, async (newCollection) => {", " try {", " const createDataCollectionResponse = await collections.createDataCollection(newCollection);", " return createDataCollectionResponse;", @@ -436,7 +437,7 @@ " console.error(error);", " // Handle the error", " } ", - "}", + "});", "", "/* Returns a promise that resolves to the created collection:", " * {", @@ -535,7 +536,8 @@ " * \"_createdDate\": \"2023-07-23T11:38:41.518Z\",", " * \"_updatedDate\": \"2023-07-23T11:38:41.518Z\"", " * };", - " */ " + " */ ", + "" ], "extra": { "description": "This function creates a collection whose items anyone can view but only site members with author permissions can edit. A dynamic URL is generated for each item in the collection. " @@ -544,11 +546,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "createDataCollection", "isAdminMethod": true }, @@ -587,11 +584,11 @@ "docs": { "summary": "Deletes a data collection.", "description": [ - "> **Note:**\n> Once a collection is deleted, it can't be restored.\n\nThis function is not a universal function and runs only on the backend." + "> **Note:**\n> Once a collection is deleted, it can't be restored." ], "examples": [ { - "title": "Delete an existing collection ", + "title": "Delete an existing collection (dashboard page code)", "body": [ "import { collections } from \"wix-data.v2\";", "", @@ -610,15 +607,30 @@ "", "/* Promise resolves to void */" ] + }, + { + "title": "Delete an existing collection (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { collections } from 'wix-data.v2';", + "", + "export const myDeleteDataCollectionFunction = webMethod(Permissions.Anyone, async (dataCollectionId) => {", + " try {", + " await collections.deleteDataCollection(dataCollectionId);", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to void */", + "" + ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "deleteDataCollection", "isAdminMethod": true }, @@ -634,6 +646,16 @@ ], "doc": "ID of the collection to retrieve.", "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-data-v2.Collections.GetDataCollectionOptions" + } + ], + "doc": "Options for retrieving a data collection.", + "required": false } ], "requiredFields": [ @@ -869,15 +891,217 @@ "* };", "*/ " ] + }, + { + "title": "Get a collection (export from backend code)", + "body": [ + "import { Permissions, webMethod } from \"wix-web-module\";", + "import { collections } from \"wix-data.v2\";", + "", + "export const myGetDataCollectionFunction = webMethod(Permissions.Anyone, async (dataCollectionId) => {", + " try {", + " const retrievedCollection = await collections.getDataCollection(dataCollectionId);", + " return retrievedCollection;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Returns a promise that resolves to the retrieved collection:", + "* {", + "* \"_id\": \"myMusicCollection\",", + "* \"collectionType\": \"NATIVE\",", + "* \"displayName\": \"My Music Collection\",", + "* \"displayField\": \"myMusicCollection\",", + "* \"capabilities\": {", + "* \"dataOperations\": [", + "* \"IS_REFERENCED\",", + "* \"INSERT\",", + "* \"SAVE\",", + "* \"BULK_INSERT\",", + "* \"BULK_UPDATE\",", + "* \"UPDATE\",", + "* \"TRUNCATE\",", + "* \"REMOVE\",", + "* \"REMOVE_REFERENCE\",", + "* \"COUNT\",", + "* \"FIND\",", + "* \"REPLACE_REFERENCES\",", + "* \"BULK_REMOVE\",", + "* \"INSERT_REFERENCE\",", + "* \"GET\",", + "* \"BULK_SAVE\",", + "* \"QUERY_REFERENCED\",", + "* \"DISTINCT\",", + "* \"AGGREGATE\"", + "* ],", + "* \"collectionOperations\": [", + "* \"UPDATE\",", + "* \"REMOVE\"", + "* ],", + "* \"indexLimits\": {", + "* \"regular\": 3,", + "* \"unique\": 1,", + "* \"total\": 4", + "* }", + "* },", + "* \"fields\": ", + "* [", + "* {", + "* \"key\": \"artist\",", + "* \"displayName\": \"Artist Name\",", + "* \"type\": \"TEXT\",", + "* \"systemField\": false,", + "* \"capabilities\": {", + "* \"sortable\": true,", + "* \"queryOperators\": [", + "* \"EQ\",", + "* \"LT\",", + "* \"GT\",", + "* \"NE\",", + "* \"LTE\",", + "* \"GTE\",", + "* \"STARTS_WITH\",", + "* \"ENDS_WITH\",", + "* \"CONTAINS\",", + "* \"HAS_SOME\",", + "* \"HAS_ALL\",", + "* \"EXISTS\",", + "* \"URLIZED\"", + "* ]", + "* },", + "* \"encrypted\": false,", + "* \"description\": \"The artist's name\"", + "* },", + "* {", + "* \"key\": \"_id\",", + "* \"displayName\": \"ID\",", + "* \"type\": \"TEXT\",", + "* \"systemField\": true,", + "* \"capabilities\": {", + "* \"sortable\": true,", + "* \"queryOperators\": [", + "* \"EQ\",", + "* \"LT\",", + "* \"GT\",", + "* \"NE\",", + "* \"LTE\",", + "* \"GTE\",", + "* \"STARTS_WITH\",", + "* \"ENDS_WITH\",", + "* \"CONTAINS\",", + "* \"HAS_SOME\",", + "* \"HAS_ALL\",", + "* \"EXISTS\",", + "* \"URLIZED\"", + "* ]", + "* },", + "* \"encrypted\": false", + "* },", + "* {", + "* \"key\": \"_createdDate\",", + "* \"displayName\": \"Created Date\",", + "* \"type\": \"DATETIME\",", + "* \"systemField\": true,", + "* \"capabilities\": {", + "* \"sortable\": true,", + "* \"queryOperators\": [", + "* \"EQ\",", + "* \"LT\",", + "* \"GT\",", + "* \"NE\",", + "* \"LTE\",", + "* \"GTE\",", + "* \"STARTS_WITH\",", + "* \"ENDS_WITH\",", + "* \"CONTAINS\",", + "* \"HAS_SOME\",", + "* \"HAS_ALL\",", + "* \"EXISTS\",", + "* \"URLIZED\"", + "* ]", + "* },", + "* \"encrypted\": false", + "* },", + "* {", + "* \"key\": \"_updatedDate\",", + "* \"displayName\": \"Updated Date\",", + "* \"type\": \"DATETIME\",", + "* \"systemField\": true,", + "* \"capabilities\": {", + "* \"sortable\": true,", + "* \"queryOperators\": [", + "* \"EQ\",", + "* \"LT\",", + "* \"GT\",", + "* \"NE\",", + "* \"LTE\",", + "* \"GTE\",", + "* \"STARTS_WITH\",", + "* \"ENDS_WITH\",", + "* \"CONTAINS\",", + "* \"HAS_SOME\",", + "* \"HAS_ALL\",", + "* \"EXISTS\",", + "* \"URLIZED\"", + "* ]", + "* },", + "* \"encrypted\": false", + "* },", + "* {", + "* \"key\": \"_owner\",", + "* \"displayName\": \"Owner\",", + "* \"type\": \"TEXT\",", + "* \"systemField\": true,", + "* \"capabilities\": {", + "* \"sortable\": true,", + "* \"queryOperators\": [", + "* \"EQ\",", + "* \"LT\",", + "* \"GT\",", + "* \"NE\",", + "* \"LTE\",", + "* \"GTE\",", + "* \"STARTS_WITH\",", + "* \"ENDS_WITH\",", + "* \"CONTAINS\",", + "* \"HAS_SOME\",", + "* \"HAS_ALL\",", + "* \"EXISTS\",", + "* \"URLIZED\"", + "* ]", + "* },", + "* \"encrypted\": false", + "* }", + "* ],", + "* \"permissions\": {", + "* \"insert\": \"SITE_MEMBER_AUTHOR\",", + "* \"update\": \"SITE_MEMBER_AUTHOR\",", + "* \"remove\": \"SITE_MEMBER_AUTHOR\",", + "* \"read\": \"ANYONE\"", + "* },", + "* \"revision\": \"1\",", + "* \"plugins\": [", + "* {", + "* \"type\": \"GRIDAPPLESS\",", + "* \"gridapplessOptions\": {", + "* \"migrated\": true", + "* }", + "* }", + "* ],", + "* \"pagingModes\": [", + "* \"OFFSET\"", + "* ],", + "* \"_createdDate\": \"2023-07-19T12:40:02.372Z\",", + "* \"_updatedDate\": \"2023-07-19T12:40:02.372Z\"", + "* };", + "*/" + ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "getDataCollection" }, { @@ -913,11 +1137,11 @@ "docs": { "summary": "Retrieves a list of all data collections associated with the site or project.", "description": [ - "By default, the list is ordered by ID in ascending order.\n\nThis function is not a universal function and runs only on the backend." + "By default, the list is ordered by ID in ascending order." ], "examples": [ { - "title": "Lists existing collections ", + "title": "Lists existing collections (dashboard page code)", "body": [ "import { collections } from \"wix-data.v2\";", "", @@ -1060,36 +1284,182 @@ ] }, { - "title": "List up to 10 existing data collections with a given offest ", + "title": "Lists existing collections (export from backend code)", "body": [ - "import { collections } from \"wix-data.v2\";", - "", - "/* Sample options parameter:", - " *", - " * const options = {", - " * paging: {", - " * limit: 10, ", - " * offset: 1", - " * }", - " * };", - " */ ", + "import { Permissions, webMethod } from 'wix-web-module';", + "import { collections } from 'wix-data.v2';", "", - "export async function myListDataCollectionsFunctionAdv(options) {", + "export const myListDataCollectionsFunction = webMethod(Permissions.Anyone, async (options) => {", " try {", - " const ListDataCollectionsResponse = await collections.listDataCollections(options);", - " return ListDataCollectionsResponse; ", + " const myDataCollections = await collections.listDataCollections();", + " return myDataCollections;", " } catch (error) {", " console.error(error);", - " // Handle the error", + " // Handle the error ", " } ", - "}", + "});", "", - "/* Returns a promise that resolves to a list of existing data collections:", - " * {", - " * \"collections\": [", - " * ...", - " * // List of collections, starting with the second collection", - " * ...", + "/* Returns a promise that resolves to a list of existing data collections: ", + "* {", + "* \"collections\": [", + "* // ...", + "* {", + "* \"_id\": \"myMusicCollection\",", + "* \"collectionType\": \"NATIVE\",", + "* \"displayName\": \"My Music Collection\",", + "* \"displayField\": \"myMusicCollection\",", + "* \"capabilities\": {", + "* \"dataOperations\": [", + "* \"IS_REFERENCED\",", + "* \"INSERT\",", + "* \"SAVE\",", + "* \"BULK_INSERT\",", + "* \"BULK_UPDATE\",", + "* \"UPDATE\",", + "* \"TRUNCATE\",", + "* \"REMOVE\",", + "* \"REMOVE_REFERENCE\",", + "* \"COUNT\",", + "* \"FIND\",", + "* \"REPLACE_REFERENCES\",", + "* \"BULK_REMOVE\",", + "* \"INSERT_REFERENCE\",", + "* \"GET\",", + "* \"BULK_SAVE\",", + "* \"QUERY_REFERENCED\",", + "* \"DISTINCT\",", + "* \"AGGREGATE\"", + "* ],", + "* \"collectionOperations\": [", + "* \"UPDATE\",", + "* \"REMOVE\"", + "* ],", + "* \"indexLimits\": {", + "* \"regular\": 3,", + "* \"unique\": 1,", + "* \"total\": 4", + "* }", + "* },", + "* \"fields\": ", + "* [", + "* {", + "* \"key\": \"artist\",", + "* \"displayName\": \"Artist Name\",", + "* \"type\": \"TEXT\",", + "* \"systemField\": false,", + "* \"capabilities\": {", + "* \"sortable\": true,", + "* \"queryOperators\": [", + "* \"EQ\",", + "* \"LT\",", + "* \"GT\",", + "* \"NE\",", + "* \"LTE\",", + "* \"GTE\",", + "* \"STARTS_WITH\",", + "* \"ENDS_WITH\",", + "* \"CONTAINS\",", + "* \"HAS_SOME\",", + "* \"HAS_ALL\",", + "* \"EXISTS\",", + "* \"URLIZED\"", + "* ]", + "* },", + "* \"encrypted\": false,", + "* \"description\": \"The artist's name\"", + "* },", + "* {", + "* \"key\": \"_id\",", + "* \"displayName\": \"ID\",", + "* \"type\": \"TEXT\",", + "* \"systemField\": true,", + "* \"capabilities\": {", + "* \"sortable\": true,", + "* \"queryOperators\": [", + "* \"EQ\",", + "* \"LT\",", + "* \"GT\",", + "* \"NE\",", + "* \"LTE\",", + "* \"GTE\",", + "* \"STARTS_WITH\",", + "* \"ENDS_WITH\",", + "* \"CONTAINS\",", + "* \"HAS_SOME\",", + "* \"HAS_ALL\",", + "* \"EXISTS\",", + "* \"URLIZED\"", + "* ]", + "* },", + "* \"encrypted\": false", + "* },", + "* // Additional system fields ...", + "* ],", + "* \"permissions\": {", + "* \"insert\": \"SITE_MEMBER_AUTHOR\",", + "* \"update\": \"SITE_MEMBER_AUTHOR\",", + "* \"remove\": \"SITE_MEMBER_AUTHOR\",", + "* \"read\": \"ANYONE\"", + "* },", + "* \"revision\": \"1\",", + "* \"plugins\": [", + "* {", + "* \"type\": \"GRIDAPPLESS\",", + "* \"gridapplessOptions\": {", + "* \"migrated\": true", + "* }", + "* }", + "* ],", + "* \"pagingModes\": [", + "* \"OFFSET\"", + "* ],", + "* \"_createdDate\": \"2023-07-19T12:40:02.372Z\",", + "* \"_updatedDate\": \"2023-07-19T12:40:02.372Z\"", + "* }", + "* ],", + "* \"pagingMetadata\": {", + "* \"count\": 18,", + "* \"offset\": 0,", + "* \"total\": 18,", + "* \"tooManyToCount\": false", + "* }", + "* }; ", + "* */", + "" + ] + }, + { + "title": "List up to 10 existing data collections with a given offest ", + "body": [ + "import { Permissions, webMethod } from \"wix-web-module\";", + "import { collections } from \"wix-data.v2\";", + "", + "/* Sample options parameter:", + " *", + " * const options = {", + " * paging: {", + " * limit: 10, ", + " * offset: 1", + " * }", + " * };", + " */ ", + "", + "export const myListDataCollectionsFunctionAdv = webMethod(Permissions.Anyone, async (options) => {", + " try {", + " const ListDataCollectionsResponse = await collections.listDataCollections(options);", + " return ListDataCollectionsResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Returns a promise that resolves to a list of existing data collections:", + " * {", + " * \"collections\": [", + " * ...", + " * // List of collections, starting with the second collection", + " * ...", " * { ", " * \"_id\": \"Members/FullData\",", " * \"collectionType\": \"WIX_APP\",", @@ -1333,17 +1703,13 @@ " * \"tooManyToCount\": false", " * }", " * };", - " */ " + " */ ", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "listDataCollections", "isAdminMethod": true }, @@ -1390,11 +1756,11 @@ "docs": { "summary": "Updates a data collection.", "description": [ - "A collection ID, revision number, permissions, and at least 1 field must be provided within `options.collection`.\nIf a collection with that ID exists, and if its current `revision` number matches the one provided, it is updated.\nOtherwise, the request fails.\n\nWhen a collection is updated, its `_updatedDate` property is changed to the current date and its `revision` property is incremented.\n\n> **Note:**\n> After a collection is updated, it only contains the properties included in the `updateDataCollection()` call. If the existing collection has properties with values and those properties\n> aren't included in the updated collection details, their values are lost.\n\nThis function is not a universal function and runs only on the backend." + "A collection ID, revision number, permissions, and at least 1 field must be provided within `options.collection`.\nIf a collection with that ID exists, and if its current `revision` number matches the one provided, it is updated.\nOtherwise, the request fails.\n\nWhen a collection is updated, its `_updatedDate` property is changed to the current date and its `revision` property is incremented.\n\n> **Note:**\n> After a collection is updated, it only contains the properties included in the `updateDataCollection()` call. If the existing collection has properties with values and those properties\n> aren't included in the updated collection details, their values are lost." ], "examples": [ { - "title": "Updates an existing collection", + "title": "Updates an existing collection (dashboard page code)", "body": [ "", "import { collections } from \"wix-data.v2\";", @@ -1658,82 +2024,27 @@ ] }, { - "title": "Updates an existing collection ", + "title": "Updates an existing collection (export from backend code)", "body": [ - "import { collections } from \"wix-data.v2\";", - "", - "/* Example collection object: ", - " *", - " * Existing fields are added a \"type\" property. In addition, a plugin has been added that defines each new * item in the collection draft by default. You can publish them at a later date. ", - " * ", - " * const updatedCollection = {", - " * _id: \"shirts\",", - " * revision: \"1\",", - " * displayName: \"Shirts\",", - " * displayField: \"shirts\",", - " * permissions: {", - " * read: \"ANYONE\",", - " * insert: \"SITE_MEMBER_AUTHOR\",", - " * update: \"SITE_MEMBER_AUTHOR\",", - " * remove: \"SITE_MEMBER_AUTHOR\"", - " * },", - " * fields: ", - " * [", - " * {", - " * key: \"name\",", - " * displayName: \"Item Name\",", - " * description: \"Name of item, required\",", - " * required: true,", - " * type: \"TEXT\"", - " * },", - " * {", - " * key: \"price\",", - " * displayName: \"Price of Item\",", - " * description: \"Price of item, required\",", - " * required: true,", - " * type: \"NUMBER\" ", - " * },", - " * {", - " * key: \"desc\",", - " * displayName: \"Item Description\",", - " * description: \"Item description, not required\",", - " * type: \"TEXT\" ", - " * },", - " * ],", - " * plugins: ", - " * [", - " * {", - " * type: \"URLIZED\",", - " * urlizedOptions: {", - " * format: \"ORIGINAL\"", - " * }", - " * },", - " * {", - " * type: \"PUBLISH\", ", - " * publishOptions: {", - " * defaultStatus: \"DRAFT\" ", - " * }", - " * }", - " * ]", - " * }; ", - " */", + "import { Permissions, webMethod } from 'wix-web-module';", + "import { collections } from 'wix-data.v2';", "", - "export async function myUpdateDataCollectionFunction(updatedCollection) {", + "export const myUpdateDataCollectionFunction = webMethod(Permissions.Anyone, async (updatedDataCollection) => {", " try {", - " const updateDataCollectionResponse = await collections.updateDataCollection(updatedCollection);", - " return updateDataCollectionResponse; ", + " const updateDataCollectionResponse = await collections.updateDataCollection(updatedDataCollection);", + " return updateDataCollectionResponse;", " } catch (error) {", " console.error(error);", " // Handle the error", - " } ", - "} ", + " }", + "});", "", "/* Returns a promise that resolves to the updated collection:", " * {", - " * \"_id\": \"shirts\",", + " * \"_id\": \"myMusicCollection\",", " * \"collectionType\": \"NATIVE\",", - " * \"displayName\": \"Shirts\",", - " * \"displayField\": \"shirts\",", + " * \"displayName\": \"My Music Collection\",", + " * \"displayField\": \"myMusicCollection\",", " * \"capabilities\": {", " * \"dataOperations\": [", " * \"IS_REFERENCED\",", @@ -1768,8 +2079,8 @@ " * },", " * \"fields\": [", " * {", - " * \"key\": \"name\",", - " * \"displayName\": \"Item Name\",", + " * \"key\": \"artist\",", + " * \"displayName\": \"Artist Name\",", " * \"type\": \"TEXT\",", " * \"systemField\": false,", " * \"capabilities\": {", @@ -1791,39 +2102,12 @@ " * ]", " * },", " * \"encrypted\": false,", - " * \"description\": \"Name of item, required\",", - " * \"required\": true", - " * },", - " * {", - " * \"key\": \"price\",", - " * \"displayName\": \"Price of Item\",", - " * \"type\": \"NUMBER\",", - " * \"systemField\": false,", - " * \"capabilities\": {", - " * \"sortable\": true,", - " * \"queryOperators\": [", - " * \"EQ\",", - " * \"LT\",", - " * \"GT\",", - " * \"NE\",", - " * \"LTE\",", - " * \"GTE\",", - " * \"STARTS_WITH\",", - " * \"ENDS_WITH\",", - " * \"CONTAINS\",", - " * \"HAS_SOME\",", - " * \"HAS_ALL\",", - " * \"EXISTS\",", - " * \"URLIZED\"", - " * ]", - " * },", - " * \"encrypted\": false,", - " * \"description\": \"Price of item, required\",", + " * \"description\": \"The artist's name\",", " * \"required\": true", " * },", " * {", - " * \"key\": \"desc\",", - " * \"displayName\": \"Item Description\",", + " * \"key\": \"song\",", + " * \"displayName\": \"Song Title\",", " * \"type\": \"TEXT\",", " * \"systemField\": false,", " * \"capabilities\": {", @@ -1834,9 +2118,86 @@ " * \"GT\",", " * \"NE\",", " * \"LTE\",", - " * \"GTE\",", - " * \"STARTS_WITH\",", - " * \"ENDS_WITH\",", + " * \"GTE\",", + " * \"STARTS_WITH\",", + " * \"ENDS_WITH\",", + " * \"CONTAINS\",", + " * \"HAS_SOME\",", + " * \"HAS_ALL\",", + " * \"EXISTS\",", + " * \"URLIZED\"", + " * ]", + " * },", + " * \"encrypted\": false,", + " * \"description\": \"The song's title\",", + " * \"required\": true", + " * },", + " * {", + " * \"key\": \"_id\",", + " * \"displayName\": \"ID\",", + " * \"type\": \"TEXT\",", + " * \"systemField\": true,", + " * \"capabilities\": {", + " * \"sortable\": true,", + " * \"queryOperators\": [", + " * \"EQ\",", + " * \"LT\",", + " * \"GT\",", + " * \"NE\",", + " * \"LTE\",", + " * \"GTE\",", + " * \"STARTS_WITH\",", + " * \"ENDS_WITH\",", + " * \"CONTAINS\",", + " * \"HAS_SOME\",", + " * \"HAS_ALL\",", + " * \"EXISTS\",", + " * \"URLIZED\"", + " * ]", + " * },", + " * \"encrypted\": false", + " * },", + " * {", + " * \"key\": \"_createdDate\",", + " * \"displayName\": \"Created Date\",", + " * \"type\": \"DATETIME\",", + " * \"systemField\": true,", + " * \"capabilities\": {", + " * \"sortable\": true,", + " * \"queryOperators\": [", + " * \"EQ\",", + " * \"LT\",", + " * \"GT\",", + " * \"NE\",", + " * \"LTE\",", + " * \"GTE\",", + " * \"STARTS_WITH\",", + " * \"ENDS_WITH\",", + " * \"CONTAINS\",", + " * \"HAS_SOME\",", + " * \"HAS_ALL\",", + " * \"EXISTS\",", + " * \"URLIZED\"", + " * ]", + " * },", + " * \"encrypted\": false", + " * },", + " * {", + " * \"key\": \"_updatedDate\",", + " * \"displayName\": \"Updated Date\",", + " * \"type\": \"DATETIME\",", + " * \"systemField\": true,", + " * \"capabilities\": {", + " * \"sortable\": true,", + " * \"queryOperators\": [", + " * \"EQ\",", + " * \"LT\",", + " * \"GT\",", + " * \"NE\",", + " * \"LTE\",", + " * \"GTE\",", + " * \"STARTS_WITH\",", + " * \"ENDS_WITH\",", " * \"CONTAINS\",", " * \"HAS_SOME\",", " * \"HAS_ALL\",", @@ -1844,12 +2205,11 @@ " * \"URLIZED\"", " * ]", " * },", - " * \"encrypted\": false,", - " * \"description\": \"Item description, not required\"", + " * \"encrypted\": false", " * },", " * {", - " * \"key\": \"_id\",", - " * \"displayName\": \"ID\",", + " * \"key\": \"_owner\",", + " * \"displayName\": \"Owner\",", " * \"type\": \"TEXT\",", " * \"systemField\": true,", " * \"capabilities\": {", @@ -1871,12 +2231,120 @@ " * ]", " * },", " * \"encrypted\": false", + " * }", + " * ],", + " * \"permissions\": {", + " * \"insert\": \"SITE_MEMBER\",", + " * \"update\": \"SITE_MEMBER_AUTHOR\",", + " * \"remove\": \"SITE_MEMBER_AUTHOR\",", + " * \"read\": \"SITE_MEMBER_AUTHOR\"", + " * },", + " * \"revision\": \"2\",", + " * \"plugins\": [", + " * {", + " * \"type\": \"GRIDAPPLESS\",", + " * \"gridapplessOptions\": {", + " * \"migrated\": true", + " * }", + " * }", + " * ],", + " * \"pagingModes\": [", + " * \"OFFSET\"", + " * ],", + " * \"_createdDate\": \"2023-07-19T12:40:02.372Z\",", + " * \"_updatedDate\": \"2023-07-19T14:00:28.836Z\"", + " * }", + " */", + "" + ] + }, + { + "title": "Updates an existing collection ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { collections } from 'wix-data.v2';", + "", + "export const myUpdateDataCollectionFunction = webMethod(Permissions.Anyone, async (updatedCollection) => {", + " try {", + " const updateDataCollectionResponse = await collections.updateDataCollection(updatedCollection);", + " return updateDataCollectionResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Returns a promise that resolves to the updated collection:", + " * {", + " * \"_id\": \"shirts\",", + " * \"collectionType\": \"NATIVE\",", + " * \"displayName\": \"Shirts\",", + " * \"displayField\": \"shirts\",", + " * \"capabilities\": {", + " * \"dataOperations\": [", + " * \"IS_REFERENCED\",", + " * \"INSERT\",", + " * \"SAVE\",", + " * \"BULK_INSERT\",", + " * \"BULK_UPDATE\",", + " * \"UPDATE\",", + " * \"TRUNCATE\",", + " * \"REMOVE\",", + " * \"REMOVE_REFERENCE\",", + " * \"COUNT\",", + " * \"FIND\",", + " * \"REPLACE_REFERENCES\",", + " * \"BULK_REMOVE\",", + " * \"INSERT_REFERENCE\",", + " * \"GET\",", + " * \"BULK_SAVE\",", + " * \"QUERY_REFERENCED\",", + " * \"DISTINCT\",", + " * \"AGGREGATE\"", + " * ],", + " * \"collectionOperations\": [", + " * \"UPDATE\",", + " * \"REMOVE\"", + " * ],", + " * \"indexLimits\": {", + " * \"regular\": 3,", + " * \"unique\": 1,", + " * \"total\": 4", + " * }", + " * },", + " * \"fields\": [", + " * {", + " * \"key\": \"name\",", + " * \"displayName\": \"Item Name\",", + " * \"type\": \"TEXT\",", + " * \"systemField\": false,", + " * \"capabilities\": {", + " * \"sortable\": true,", + " * \"queryOperators\": [", + " * \"EQ\",", + " * \"LT\",", + " * \"GT\",", + " * \"NE\",", + " * \"LTE\",", + " * \"GTE\",", + " * \"STARTS_WITH\",", + " * \"ENDS_WITH\",", + " * \"CONTAINS\",", + " * \"HAS_SOME\",", + " * \"HAS_ALL\",", + " * \"EXISTS\",", + " * \"URLIZED\"", + " * ]", + " * },", + " * \"encrypted\": false,", + " * \"description\": \"Name of item, required\",", + " * \"required\": true", " * },", " * {", - " * \"key\": \"_createdDate\",", - " * \"displayName\": \"Created Date\",", - " * \"type\": \"DATETIME\",", - " * \"systemField\": true,", + " * \"key\": \"price\",", + " * \"displayName\": \"Price of Item\",", + " * \"type\": \"NUMBER\",", + " * \"systemField\": false,", " * \"capabilities\": {", " * \"sortable\": true,", " * \"queryOperators\": [", @@ -1895,15 +2363,55 @@ " * \"URLIZED\"", " * ]", " * },", - " * \"encrypted\": false", + " * \"encrypted\": false,", + " * \"description\": \"Price of item, required\",", + " * \"required\": true", " * },", " * {", - " * \"key\": \"_updatedDate\",", - " * \"displayName\": \"Updated Date\",", - " * \"type\": \"DATETIME\",", + " * \"key\": \"desc\",", + " * \"displayName\": \"Item Description\",", + " * \"type\": \"TEXT\",", + " * \"systemField\": false,", + " * \"capabilities\": {", + " * \"sortable\": true,", + " * \"queryOperators\": [", + " * \"EQ\",", + " * \"LT\",", + " * \"GT\",", + " * \"NE\",", + " * \"LTE\",", + " * \"GTE\",", + " * \"STARTS_WITH\",", + " * \"ENDS_WITH\",", + " * \"CONTAINS\",", + " * \"HAS_SOME\",", + " * \"HAS_ALL\",", + " * \"EXISTS\",", + " * \"URLIZED\"", + " * ]", + " * },", + " * \"encrypted\": false,", + " * \"description\": \"Item description, not required\"", + " * },", + " * {", + " * \"key\": \"_id\",", + " * \"displayName\": \"ID\",", + " * \"type\": \"TEXT\",", " * \"systemField\": true,", " * \"capabilities\": {", " * \"sortable\": true,", + " * \"queryOperators\": [", + " * \"EQ\",", + " * \"LT\",", + " * \"GT\",", + " * \"NE\",", + " * \"LTE\",", + " * \"GTE\",", + " * \"STARTS_WITH\",", + " * \"ENDS_WITH\",", + " * \"CONTAINS\",", + " * \"HAS_SOME\",", + " * \"HAS_ALL\",", " * \"EXISTS\",", " * \"URLIZED\"", " * ]", @@ -1911,8 +2419,8 @@ " * \"encrypted\": false", " * },", " * {", - " * \"key\": \"_draftDate\",", - " * \"displayName\": \"Unpublish Date\",", + " * \"key\": \"_createdDate\",", + " * \"displayName\": \"Created Date\",", " * \"type\": \"DATETIME\",", " * \"systemField\": true,", " * \"capabilities\": {", @@ -1934,13 +2442,51 @@ " * ]", " * },", " * \"encrypted\": false", - " * }", - " * ],", - " * \"permissions\": {", - " * \"insert\": \"SITE_MEMBER_AUTHOR\",", - " * \"update\": \"SITE_MEMBER_AUTHOR\",", - " * \"remove\": \"SITE_MEMBER_AUTHOR\",", - " * \"read\": \"ANYONE\"", + " * },", + " * {", + " * \"key\": \"_updatedDate\",", + " * \"displayName\": \"Updated Date\",", + " * \"type\": \"DATETIME\",", + " * \"systemField\": true,", + " * \"capabilities\": {", + " * \"sortable\": true,", + " * \"EXISTS\",", + " * \"URLIZED\"", + " * ]", + " * },", + " * \"encrypted\": false", + " * },", + " * {", + " * \"key\": \"_draftDate\",", + " * \"displayName\": \"Unpublish Date\",", + " * \"type\": \"DATETIME\",", + " * \"systemField\": true,", + " * \"capabilities\": {", + " * \"sortable\": true,", + " * \"queryOperators\": [", + " * \"EQ\",", + " * \"LT\",", + " * \"GT\",", + " * \"NE\",", + " * \"LTE\",", + " * \"GTE\",", + " * \"STARTS_WITH\",", + " * \"ENDS_WITH\",", + " * \"CONTAINS\",", + " * \"HAS_SOME\",", + " * \"HAS_ALL\",", + " * \"EXISTS\",", + " * \"URLIZED\"", + " * ]", + " * },", + " * \"encrypted\": false", + " * }", + " * ],", + " * \"permissions\": {", + " * \"insert\": \"SITE_MEMBER_AUTHOR\",", + " * \"update\": \"SITE_MEMBER_AUTHOR\",", + " * \"remove\": \"SITE_MEMBER_AUTHOR\",", + " * \"read\": \"ANYONE\"", " * },", " * \"revision\": \"2\",", " * \"plugins\": [", @@ -1969,7 +2515,8 @@ " * \"_createdDate\": \"2023-07-23T11:38:41.518Z\",", " * \"_updatedDate\": \"2023-07-23T13:13:49.154Z\"", " * };", - " */ " + " */", + "" ], "extra": { "description": "This function effectively replaces the existing collection with the collection passed as a parameter. " @@ -1978,16 +2525,31 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "updateDataCollection", "isAdminMethod": true } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Array", "members": [ @@ -2009,7 +2571,360 @@ "referenceType": "wix-data-v2.Collections.TypeMetadata" } ], - "doc": "Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays." + "doc": "Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ArraySizeRange", + "members": [ + { + "name": "maxSize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.\n\nDefault: No validation\n" + }, + { + "name": "minSize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.\n\nDefault: No validation\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGetDataCollectionsOptions", + "members": [ + { + "name": "consistentRead", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to retrieve data from the primary database instance.\nThis decreases performance but ensures data retrieved is up to date even immediately after an update.\nLearn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n\nDefault: `false`\n" + }, + { + "name": "dataCollectionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the collections to retrieve." + }, + { + "name": "includeReferencedCollections", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the returned collection list should include referenced collections.\n\nDefault: `false`\n" + }, + { + "name": "showDeletedCollections", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to include deleted collections.\n\nDefault: `false`\n" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.Sorting" + } + ], + "doc": "Sorting preferences." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGetDataCollectionsPageBySnapshotsRequest", + "members": [ + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.Paging" + } + ], + "doc": "Pagination information." + }, + { + "name": "snapshotIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Ids of schema snapshot" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGetDataCollectionsPageBySnapshotsResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.PagingMetadataV2" + } + ], + "doc": "Paging information." + }, + { + "name": "snapshotCollections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.SnapshotCollection" + } + ] + } + } + ], + "doc": "List of snapshot collection map" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGetDataCollectionsRequest", + "members": [ + { + "name": "consistentRead", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to retrieve data from the primary database instance.\nThis decreases performance but ensures data retrieved is up to date even immediately after an update.\nLearn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n\nDefault: `false`\n" + }, + { + "name": "dataCollectionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the collections to retrieve." + }, + { + "name": "includeReferencedCollections", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the returned collection list should include referenced collections.\n\nDefault: `false`\n" + }, + { + "name": "showDeletedCollections", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to include deleted collections.\n\nDefault: `false`\n" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.Sorting" + } + ], + "doc": "Sorting preferences." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGetDataCollectionsResponse", + "members": [ + { + "name": "activeCollections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.DataCollection" + } + ] + } + } + ], + "doc": "List of requested collections.\nWhen `include_referenced_collections` is `true` in the request, referenced collections are included here." + }, + { + "name": "deletedCollections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.DataCollection" + } + ] + } + } + ], + "doc": "List of requested deleted collections. Only populated when `showDeletedCollections` is true in the request." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Calculator", + "members": [ + { + "name": "fieldsPattern", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.FieldsPattern" + } + ], + "doc": "Value is calculated according to pattern, whitespaces are replaced with dash [-]." + }, + { + "name": "urlizedOnlyPattern", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.UrlizedOnlyPattern" + } + ], + "doc": "Value is only URL encoded." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCalculatorPatternOneOf", + "members": [ + "fieldsPattern", + "urlizedOnlyPattern" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculatorPatternOneOf", + "members": [ + { + "name": "fieldsPattern", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.FieldsPattern" + } + ], + "doc": "Value is calculated according to pattern, whitespaces are replaced with dash [-]." + }, + { + "name": "urlizedOnlyPattern", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.UrlizedOnlyPattern" + } + ], + "doc": "Value is only URL encoded." } ], "docs": { @@ -2019,40 +2934,30 @@ } }, { - "name": "ArraySizeRange", + "name": "CmsOptions", "members": [ { - "name": "maxSize", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Maximum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.\n\nDefault: No validation\n" - }, - { - "name": "minSize", + "name": "internal", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Minimum permitted number of items in an array field. Relevant for fields that hold arrays, such as those of type `ARRAY`, `ARRAY_STRING`, or `ARRAY_DOCUMENT`.\n\nDefault: No validation\n" + "doc": "Indicates an internal CMS field. The CMS does not display internal fields.\n\nDefault: `false`\n" } ], "docs": { "description": [ - "" + "Options for the CMS plugin." ] } }, { - "name": "BulkGetDataCollectionsOptions", + "name": "CollectionCapabilities", "members": [ { - "name": "dataCollectionIds", + "name": "collectionOperations", "optional": true, "type": [ { @@ -2066,37 +2971,53 @@ } } ], - "doc": "IDs of the collections to retrieve." + "doc": "Collection operations supported. The listed operations can be performed on the collection itself.\n+ `UPDATE`: Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed.\n+ `REMOVE`: Allows deleting the entire collection. If not included, the collection can't be deleted." }, { - "name": "includeReferencedCollections", + "name": "dataOperations", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Whether the returned collection list should include referenced collections.\n\nDefault: `false`\n" + "doc": "Data operations the collection supports. The listed operations can be performed on data the collection contains.\n\nSupported values: `AGGREGATE`, `BULK_INSERT`, `BULK_REMOVE`, `BULK_SAVE`, `BULK_UPDATE`, `COUNT`, `DISTINCT`, `FIND`, `GET`, `INSERT`, `INSERT_REFERENCE`, `IS_REFERENCED`, `QUERY_REFERENCED`, `REMOVE`, `REMOVE_REFERENCE`, `REPLACE_REFERENCES`, `SAVE`, `TRUNCATE`, `UPDATE`.\n" }, { - "name": "showDeletedCollections", + "name": "indexLimits", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-data-v2.Collections.IndexLimits" } ], - "doc": "Whether to include deleted collections.\n\nDefault: `false`\n" - }, + "doc": "Maximum number of indexes for the collection." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateDataCollectionFieldOptions", + "members": [ { - "name": "sort", - "optional": true, + "name": "field", "type": [ { - "referenceType": "wix-data-v2.Collections.Sorting" + "referenceType": "wix-data-v2.Collections.Field" } ], - "doc": "Sorting preferences." + "doc": "field to create" } ], "docs": { @@ -2106,34 +3027,45 @@ } }, { - "name": "BulkGetDataCollectionsPageBySnapshotsRequest", + "name": "CreateDataCollectionFieldRequest", "members": [ { - "name": "paging", - "optional": true, + "name": "dataCollectionId", "type": [ { - "referenceType": "wix-data-v2.Collections.Paging" + "nativeType": "string" } ], - "doc": "Pagination information." + "doc": "ID of data collection to update" }, { - "name": "snapshotIds", + "name": "field", + "type": [ + { + "referenceType": "wix-data-v2.Collections.Field" + } + ], + "doc": "field to create" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateDataCollectionFieldResponse", + "members": [ + { + "name": "dataCollection", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-data-v2.Collections.DataCollection" } ], - "doc": "Ids of schema snapshot" + "doc": "updated data collection" } ], "docs": { @@ -2143,18 +3075,56 @@ } }, { - "name": "BulkGetDataCollectionsPageBySnapshotsResponse", + "name": "CreateDataCollectionRequest", "members": [ { - "name": "pagingMetadata", + "name": "collection", + "type": [ + { + "referenceType": "wix-data-v2.Collections.DataCollection" + } + ], + "doc": "Collection details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateDataCollectionResponse", + "members": [ + { + "name": "collection", "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.PagingMetadataV2" + "referenceType": "wix-data-v2.Collections.DataCollection" } ], - "doc": "Paging information." - }, + "doc": "Details of collection created." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateDataCollectionsSnapshotRequest", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateDataCollectionsSnapshotResponse", + "members": [ { "name": "snapshotCollections", "optional": true, @@ -2164,13 +3134,23 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-data-v2.Collections.SnapshotCollection" + "referenceType": "wix-data-v2.Collections.DataCollection" } ] } } ], - "doc": "List of snapshot collection map" + "doc": "data collections in snapshot" + }, + { + "name": "snapshotId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "created snapshot ID" } ], "docs": { @@ -2180,10 +3160,106 @@ } }, { - "name": "BulkGetDataCollectionsRequest", + "name": "DataCollection", "members": [ { - "name": "dataCollectionIds", + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date the collection was created." + }, + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID. For example, `my-first-collection`. May include a namespace." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date the collection was last updated." + }, + { + "name": "capabilities", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.CollectionCapabilities" + } + ], + "doc": "Capabilities the collection supports." + }, + { + "name": "collectionType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection type. Indicates how the collection was created and is stored.\n\n* `NATIVE`: User-created collection.\n* `WIX_APP`: [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app, including [starter collections](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-starter-collections) created when a Wix app is installed.\n* `BLOCKS_APP`: Collection created by a Wix Blocks app.\n* `EXTERNAL`: Collection located in externally connected storage." + }, + { + "name": "defaultDisplayOrder", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.Sort" + } + ], + "doc": "Indicates how the collection's items are sorted by default when a query doesn't specify an order." + }, + { + "name": "displayField", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The field whose value the CMS displays to represent the collection item when referenced in a different collection." + }, + { + "name": "displayName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection's display name as shown in the CMS. For example, `My First Collection`." + }, + { + "name": "displayNamespace", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.\nEmpty for all data collections not owned by internal Wix apps." + }, + { + "name": "fields", "optional": true, "type": [ { @@ -2191,56 +3267,39 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-data-v2.Collections.Field" } ] } } ], - "doc": "IDs of the collections to retrieve." + "doc": "Collection's field structure." }, { - "name": "includeReferencedCollections", + "name": "maxPageSize", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether the returned collection list should include referenced collections.\n\nDefault: `false`\n" + "doc": "Maximum number of items returned in a single query, based on the underlying storage.\nNative collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.\nExternal collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000." }, { - "name": "showDeletedCollections", + "name": "ownerAppId", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether to include deleted collections.\n\nDefault: `false`\n" + "doc": "ID of the app that defined this collection. For user-defined collections, this value is null." }, { - "name": "sort", - "optional": true, - "type": [ - { - "referenceType": "wix-data-v2.Collections.Sorting" - } - ], - "doc": "Sorting preferences." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkGetDataCollectionsResponse", - "members": [ - { - "name": "activeCollections", + "name": "pagingModes", + "readOnly": true, "optional": true, "type": [ { @@ -2248,16 +3307,26 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-data-v2.Collections.DataCollection" + "nativeType": "string" } ] } } ], - "doc": "List of requested collections.\nWhen `include_referenced_collections` is `true` in the request, referenced collections are included here." + "doc": "All paging modes the collection supports. In native collections, offset-based paging is supported by default." }, { - "name": "deletedCollections", + "name": "permissions", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.Permissions" + } + ], + "doc": "Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action." + }, + { + "name": "plugins", "optional": true, "type": [ { @@ -2265,117 +3334,88 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-data-v2.Collections.DataCollection" + "referenceType": "wix-data-v2.Collections.Plugin" } ] } } ], - "doc": "List of requested deleted collections. Only populated when `showDeletedCollections` is true in the request." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Calculator", - "members": [ - { - "name": "fieldsPattern", - "optional": true, - "type": [ - { - "referenceType": "wix-data-v2.Collections.FieldsPattern" - } - ], - "doc": "Value is calculated according to pattern, whitespaces are replaced with dash [-]." + "doc": "All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality." }, { - "name": "urlizedOnlyPattern", + "name": "revision", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.UrlizedOnlyPattern" + "nativeType": "string" } ], - "doc": "Value is only URL encoded." + "doc": "Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must pass the latest revision number." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCalculatorPatternOneOf", - "members": [ - "fieldsPattern", - "urlizedOnlyPattern" - ] - } - ] - }, "docs": { "description": [ - "" + "A data collection determines the structure of data to be stored in a database." ] } }, { - "name": "CalculatorPatternOneOf", + "name": "DataCollectionChangedEvent", "members": [ { - "name": "fieldsPattern", + "name": "fieldsAdded", "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.FieldsPattern" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.Field" + } + ] + } } ], - "doc": "Value is calculated according to pattern, whitespaces are replaced with dash [-]." + "doc": "list of new fields" }, { - "name": "urlizedOnlyPattern", + "name": "fieldsRemoved", "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.UrlizedOnlyPattern" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.Field" + } + ] + } } ], - "doc": "Value is only URL encoded." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CmsOptions", - "members": [ + "doc": "list of removed fields" + }, { - "name": "internal", + "name": "fieldsUpdated", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.FieldUpdate" + } + ] + } } ], - "doc": "Indicates an internal CMS field. The CMS does not display internal fields.\n\nDefault: `false`\n" - } - ], - "docs": { - "description": [ - "Options for the CMS plugin." - ] - } - }, - { - "name": "CollectionCapabilities", - "members": [ + "doc": "list of changed fields" + }, { - "name": "collectionOperations", + "name": "pluginsAdded", "optional": true, "type": [ { @@ -2383,16 +3423,16 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-data-v2.Collections.Plugin" } ] } } ], - "doc": "Collection operations supported. The listed operations can be performed on the collection itself.\n+ `UPDATE`: Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed.\n+ `REMOVE`: Allows deleting the entire collection. If not included, the collection can't be deleted." + "doc": "list of new plugins" }, { - "name": "dataOperations", + "name": "pluginsRemoved", "optional": true, "type": [ { @@ -2400,23 +3440,30 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-data-v2.Collections.Plugin" } ] } } ], - "doc": "Data operations the collection supports. The listed operations can be performed on data the collection contains.\n\nSupported values: `AGGREGATE`, `BULK_INSERT`, `BULK_REMOVE`, `BULK_SAVE`, `BULK_UPDATE`, `COUNT`, `DISTINCT`, `FIND`, `GET`, `INSERT`, `INSERT_REFERENCE`, `IS_REFERENCED`, `QUERY_REFERENCED`, `REMOVE`, `REMOVE_REFERENCE`, `REPLACE_REFERENCES`, `SAVE`, `TRUNCATE`, `UPDATE`.\n" + "doc": "list of removed plugins" }, { - "name": "indexLimits", + "name": "pluginsUpdated", "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.IndexLimits" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.PluginUpdate" + } + ] + } } ], - "doc": "Maximum number of indexes for the collection." + "doc": "list of changed plugins" } ], "docs": { @@ -2426,16 +3473,27 @@ } }, { - "name": "CreateDataCollectionFieldOptions", + "name": "DataCollectionClonedEvent", "members": [ { - "name": "field", + "name": "originId", + "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.Field" + "nativeType": "string" } ], - "doc": "field to create" + "doc": "original collection ID, may be same as current one" + }, + { + "name": "originInstanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "original instance collection is cloned from" } ], "docs": { @@ -2445,25 +3503,16 @@ } }, { - "name": "CreateDataCollectionFieldRequest", + "name": "DeleteDataCollectionFieldOptions", "members": [ { - "name": "dataCollectionId", + "name": "fieldKey", "type": [ { "nativeType": "string" } ], - "doc": "ID of data collection to update" - }, - { - "name": "field", - "type": [ - { - "referenceType": "wix-data-v2.Collections.Field" - } - ], - "doc": "field to create" + "doc": "Field key to delete" } ], "docs": { @@ -2473,17 +3522,25 @@ } }, { - "name": "CreateDataCollectionFieldResponse", + "name": "DeleteDataCollectionFieldRequest", "members": [ { - "name": "dataCollection", - "optional": true, + "name": "dataCollectionId", "type": [ { - "referenceType": "wix-data-v2.Collections.DataCollection" + "nativeType": "string" } ], - "doc": "updated data collection" + "doc": "ID of data collection to update" + }, + { + "name": "fieldKey", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Field key to delete" } ], "docs": { @@ -2493,16 +3550,17 @@ } }, { - "name": "CreateDataCollectionRequest", + "name": "DeleteDataCollectionFieldResponse", "members": [ { - "name": "collection", + "name": "dataCollection", + "optional": true, "type": [ { "referenceType": "wix-data-v2.Collections.DataCollection" } ], - "doc": "Collection details." + "doc": "updated data collection" } ], "docs": { @@ -2512,17 +3570,16 @@ } }, { - "name": "CreateDataCollectionResponse", + "name": "DeleteDataCollectionRequest", "members": [ { - "name": "collection", - "optional": true, + "name": "dataCollectionId", "type": [ { - "referenceType": "wix-data-v2.Collections.DataCollection" + "nativeType": "string" } ], - "doc": "Details of collection created." + "doc": "ID of the collection to delete." } ], "docs": { @@ -2532,7 +3589,7 @@ } }, { - "name": "CreateDataCollectionsSnapshotRequest", + "name": "DeleteDataCollectionResponse", "members": [], "docs": { "description": [ @@ -2541,25 +3598,8 @@ } }, { - "name": "CreateDataCollectionsSnapshotResponse", + "name": "DeleteDataCollectionsSnapshotRequest", "members": [ - { - "name": "snapshotCollections", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.DataCollection" - } - ] - } - } - ], - "doc": "data collections in snapshot" - }, { "name": "snapshotId", "optional": true, @@ -2568,7 +3608,7 @@ "nativeType": "string" } ], - "doc": "created snapshot ID" + "doc": "snapshot ID to delete" } ], "docs": { @@ -2578,19 +3618,17 @@ } }, { - "name": "DataCollection", + "name": "DeleteDataCollectionsSnapshotResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEvent", "members": [ - { - "name": "_createdDate", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Date the collection was created." - }, { "name": "_id", "optional": true, @@ -2599,291 +3637,132 @@ "nativeType": "string" } ], - "doc": "Collection ID. For example, `my-first-collection`. May include a namespace." - }, - { - "name": "_updatedDate", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Date the collection was last updated." + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { - "name": "capabilities", - "readOnly": true, + "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.CollectionCapabilities" + "referenceType": "wix-data-v2.Collections.ActionEvent" } ], - "doc": "Capabilities the collection supports." + "doc": "" }, { - "name": "collectionType", - "readOnly": true, + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-data-v2.Collections.EntityCreatedEvent" } ], - "doc": "Collection type. Indicates how the collection was created and is stored.\n\n* `NATIVE`: User-created collection.\n* `WIX_APP`: [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app, including [starter collections](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-starter-collections) created when a Wix app is installed.\n* `BLOCKS_APP`: Collection created by a Wix Blocks app.\n* `EXTERNAL`: Collection located in externally connected storage." + "doc": "" }, { - "name": "defaultDisplayOrder", - "readOnly": true, + "name": "deletedEvent", "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.Sort" + "referenceType": "wix-data-v2.Collections.EntityDeletedEvent" } ], - "doc": "Indicates how the collection's items are sorted by default when a query doesn't specify an order." + "doc": "" }, { - "name": "displayField", + "name": "entityEventSequence", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The field whose value the CMS displays to represent the collection item when referenced in a different collection." + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." }, { - "name": "displayName", + "name": "entityFqdn", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Collection's display name as shown in the CMS. For example, `My First Collection`." + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" }, { - "name": "displayNamespace", - "readOnly": true, + "name": "entityId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.\nEmpty for all data collections not owned by internal Wix apps." - }, - { - "name": "fields", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.Field" - } - ] - } - } - ], - "doc": "Collection's field structure." + "doc": "ID of the entity associated with the event." }, { - "name": "maxPageSize", - "readOnly": true, + "name": "eventTime", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Date" } ], - "doc": "Maximum number of items returned in a single query, based on the underlying storage.\nNative collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.\nExternal collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000." + "doc": "Event timestamp." }, { - "name": "ownerAppId", - "readOnly": true, + "name": "originatedFrom", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the app that defined this collection. For user-defined collections, this value is null." - }, - { - "name": "pagingModes", - "readOnly": true, - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "All paging modes the collection supports. In native collections, offset-based paging is supported by default." - }, - { - "name": "permissions", - "optional": true, - "type": [ - { - "referenceType": "wix-data-v2.Collections.Permissions" - } - ], - "doc": "Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action." - }, - { - "name": "plugins", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.Plugin" - } - ] - } - } - ], - "doc": "All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality." + "doc": "If present, indicates the action that triggered the event." }, { - "name": "revision", - "readOnly": true, + "name": "slug", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must pass the latest revision number." - } - ], - "docs": { - "description": [ - "A data collection determines the structure of data to be stored in a database." - ] - } - }, - { - "name": "DataCollectionChangedEvent", - "members": [ - { - "name": "fieldsAdded", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.Field" - } - ] - } - } - ], - "doc": "list of new fields" - }, - { - "name": "fieldsRemoved", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.Field" - } - ] - } - } - ], - "doc": "list of removed fields" - }, - { - "name": "fieldsUpdated", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.FieldUpdate" - } - ] - } - } - ], - "doc": "list of changed fields" - }, - { - "name": "pluginsAdded", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.Plugin" - } - ] - } - } - ], - "doc": "list of new plugins" + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" }, { - "name": "pluginsRemoved", + "name": "triggeredByAnonymizeRequest", "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.Plugin" - } - ] - } + "type": [ + { + "nativeType": "boolean" } ], - "doc": "list of removed plugins" + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { - "name": "pluginsUpdated", + "name": "updatedEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-data-v2.Collections.PluginUpdate" - } - ] - } + "referenceType": "wix-data-v2.Collections.EntityUpdatedEvent" } ], - "doc": "list of changed plugins" + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, "docs": { "description": [ "" @@ -2891,27 +3770,47 @@ } }, { - "name": "DataCollectionClonedEvent", + "name": "DomainEventBodyOneOf", "members": [ { - "name": "originId", + "name": "actionEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-data-v2.Collections.ActionEvent" } ], - "doc": "original collection ID, may be same as current one" + "doc": "" }, { - "name": "originInstanceId", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-data-v2.Collections.EntityCreatedEvent" } ], - "doc": "original instance collection is cloned from" + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.EntityUpdatedEvent" + } + ], + "doc": "" } ], "docs": { @@ -2921,16 +3820,17 @@ } }, { - "name": "DeleteDataCollectionFieldOptions", + "name": "EntityCreatedEvent", "members": [ { - "name": "fieldKey", + "name": "entityAsJson", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Field key to delete" + "doc": "" } ], "docs": { @@ -2940,25 +3840,17 @@ } }, { - "name": "DeleteDataCollectionFieldRequest", + "name": "EntityDeletedEvent", "members": [ { - "name": "dataCollectionId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of data collection to update" - }, - { - "name": "fieldKey", + "name": "deletedEntityAsJson", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Field key to delete" + "doc": "Entity that was deleted" } ], "docs": { @@ -2968,17 +3860,17 @@ } }, { - "name": "DeleteDataCollectionFieldResponse", + "name": "EntityUpdatedEvent", "members": [ { - "name": "dataCollection", + "name": "currentEntityAsJson", "optional": true, "type": [ { - "referenceType": "wix-data-v2.Collections.DataCollection" + "nativeType": "string" } ], - "doc": "updated data collection" + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], "docs": { @@ -2988,45 +3880,37 @@ } }, { - "name": "DeleteDataCollectionRequest", + "name": "Failure", "members": [ { - "name": "dataCollectionId", + "name": "code", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the collection to delete." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteDataCollectionResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteDataCollectionsSnapshotRequest", - "members": [ + "doc": "Error code.\n- `WDE0112`: Unknown error while building collection index.\n- `WDE0113`: Duplicate key error while building collection index.\n- `WDE0114`: Document too large while building collection index." + }, { - "name": "snapshotId", + "name": "description", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "snapshot ID to delete" + "doc": "Description of the failure." + }, + { + "name": "itemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the data item that caused the failure.\nFor example, if `unique` is `true`, the ID of an item containing a duplicate value." } ], "docs": { @@ -3035,15 +3919,6 @@ ] } }, - { - "name": "DeleteDataCollectionsSnapshotResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, { "name": "Field", "members": [ @@ -3434,7 +4309,18 @@ }, { "name": "GetDataCollectionOptions", - "members": [], + "members": [ + { + "name": "consistentRead", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to retrieve data from the primary database instance.\nThis decreases performance but ensures data retrieved is up to date even immediately after an update.\nLearn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n\nDefault: `false`\n" + } + ], "docs": { "description": [ "" @@ -3444,6 +4330,16 @@ { "name": "GetDataCollectionRequest", "members": [ + { + "name": "consistentRead", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to retrieve data from the primary database instance.\nThis decreases performance but ensures data retrieved is up to date even immediately after an update.\nLearn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n\nDefault: `false`\n" + }, { "name": "dataCollectionId", "type": [ @@ -3517,6 +4413,115 @@ ] } }, + { + "name": "Index", + "members": [ + { + "name": "caseInsensitive", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the index ignores case.\n\nDefault: `false`\n" + }, + { + "name": "failure", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Collections.Failure" + } + ], + "doc": "Contains details about the reasons for failure when `status` is `FAILED`." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.IndexField" + } + ] + } + } + ], + "doc": "Fields for which the index is defined.\n\nMax: 3 fields (for a unique index: 1 field)\n" + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the index." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Current status of the index.\n- `BUILDING`: Index creation is in progress.\n- `ACTIVE`: Index has been successfully created and can be used in queries.\n- `DROPPING`: Index is in the process of being dropped.\n- `DROPPED`: Index has been dropped successfully.\n- `FAILED`: Index creation has failed.\n- `INVALID`: Index contains incorrectly indexed data." + }, + { + "name": "unique", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the index enforces uniqueness of values in the field for which it is defined.\nIf `true`, the index can have only one field.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "An index is a map of a collection's data, organized according to specific fields to increase query speed." + ] + } + }, + { + "name": "IndexField", + "members": [ + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order for the index. Base on how the data is regularly queried.\n\nDefault: `ASC`\n" + }, + { + "name": "path", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Path of the field to index. For example: `title` or `options.price`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "IndexLimits", "members": [ @@ -3560,6 +4565,16 @@ { "name": "ListDataCollectionsOptions", "members": [ + { + "name": "consistentRead", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to retrieve data from the primary database instance.\nThis decreases performance but ensures data retrieved is up to date even immediately after an update.\nLearn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n\nDefault: `false`\n" + }, { "name": "paging", "optional": true, @@ -3590,6 +4605,16 @@ { "name": "ListDataCollectionsRequest", "members": [ + { + "name": "consistentRead", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to retrieve data from the primary database instance.\nThis decreases performance but ensures data retrieved is up to date even immediately after an update.\nLearn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n\nDefault: `false`\n" + }, { "name": "paging", "optional": true, @@ -4429,6 +5454,23 @@ ], "doc": "snapshot collection" }, + { + "name": "indexes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-data-v2.Collections.Index" + } + ] + } + } + ], + "doc": "snapshot of collection indexes" + }, { "name": "snapshotId", "optional": true, diff --git a/wix-data-v2/wix-data-v2/Collections/guides/data-collections-1-intro.md b/wix-data-v2/wix-data-v2/Collections/guides/data-collections-1-intro.md index cb14b8ad3e..628265b50d 100644 --- a/wix-data-v2/wix-data-v2/Collections/guides/data-collections-1-intro.md +++ b/wix-data-v2/wix-data-v2/Collections/guides/data-collections-1-intro.md @@ -4,7 +4,7 @@ title: Introduction # About the Data Collections API -  + The Data Collections API enables you to create, delete, and modify the structure of data collections in a Wix site. diff --git a/wix-data-v2/wix-data-v2/Events.service.json b/wix-data-v2/wix-data-v2/Events.service.json index caddc28801..9a42c03cc7 100644 --- a/wix-data-v2/wix-data-v2/Events.service.json +++ b/wix-data-v2/wix-data-v2/Events.service.json @@ -34,6 +34,7 @@ "doc": null }, "docs": { + "summary": "Triggered when an external database connection is created.", "description": [], "examples": [ { @@ -83,6 +84,7 @@ "doc": null }, "docs": { + "summary": "Triggered when an external database connection is deleted.", "description": [], "examples": [ { @@ -132,6 +134,7 @@ "doc": null }, "docs": { + "summary": "Triggered when an external database connection is updated.", "description": [], "examples": [ { @@ -158,6 +161,26 @@ } ], "messages": [ + { + "name": "wixVeloEventsActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "wixVeloEventsBackendEventMetadata", "members": [ @@ -215,7 +238,7 @@ "nativeType": "boolean" } ], - "doc": "Whether the external database supports creating or updating collections." + "doc": "Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them." }, { "name": "fieldTypes", @@ -232,7 +255,7 @@ } } ], - "doc": "Field types supported by the external database.\nThis option only affects collection creation and update requests." + "doc": "Field types the external database supports.\nThis field only applies when `collectionModificationsSupported` is `true`." } ], "docs": { @@ -252,7 +275,7 @@ "nativeType": "string" } ], - "doc": "Reason for the failure, if a connection isn't established successfully.\n+ `NONE`: No connection failure.\n+ `COMMUNICATION_FAILURE`: General communication failure.\n+ `DESTINATION_HOST_UNREACHABLE`: External database host is unreachable.\n+ `UNAUTHORIZED`: Unauthorized to access external database." + "doc": "If and why a connection attempt failed.\n+ `NONE`: No connection failure.\n+ `COMMUNICATION_FAILURE`: General communication failure.\n+ `DESTINATION_HOST_UNREACHABLE`: External database host is unreachable.\n+ `UNAUTHORIZED`: Unauthorized to access external database.\n+ `DESTINATION_ENDPOINT_NOT_DEFINED`: `Endpoint` property is not set." }, { "name": "hasCollections", @@ -285,6 +308,16 @@ { "name": "wixVeloEventsCreateExternalDatabaseConnectionRequest", "members": [ + { + "name": "connectionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Connection type." + }, { "name": "externalDatabaseConnection", "type": [ @@ -351,9 +384,282 @@ ] } }, + { + "name": "wixVeloEventsDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "wixVeloEventsDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "wixVeloEventsEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "wixVeloEventsEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "wixVeloEventsEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "wixVeloEventsExternalDatabaseConnection", "members": [ + { + "name": "capabilities", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.Events.wixVeloEventsCapabilities", + "displayName": "Capabilities" + } + ], + "doc": "The external database's capabilities." + }, { "name": "configuration", "optional": true, @@ -414,7 +720,7 @@ "displayName": "ExternalDatabaseConnection" } ], - "doc": "" + "doc": "Created external database connection." }, { "name": "metadata", @@ -424,7 +730,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -444,7 +750,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -464,7 +770,7 @@ "displayName": "ExternalDatabaseConnection" } ], - "doc": "" + "doc": "Updated external database connection." }, { "name": "metadata", @@ -474,7 +780,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { diff --git a/wix-data-v2/wix-data-v2/ExternalDatabaseConnections.service.json b/wix-data-v2/wix-data-v2/ExternalDatabaseConnections.service.json index 9fce81af28..9f8a0c13a9 100644 --- a/wix-data-v2/wix-data-v2/ExternalDatabaseConnections.service.json +++ b/wix-data-v2/wix-data-v2/ExternalDatabaseConnections.service.json @@ -21,6 +21,16 @@ ], "doc": "External database connection details.", "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.CreateExternalDatabaseConnectionOptions" + } + ], + "doc": "Options for creating an external database connection.", + "required": false } ], "requiredFields": [ @@ -45,105 +55,73 @@ "docs": { "summary": "Creates a new external database connection.", "description": [ - "The `options.externalDatabaseConnection` parameter must include a name, base URL, and configuration details for the external database.\nIf any of these are missing, the external database connection isn't created.\n\nThis function is not a universal function and runs only on the backend." + "The `externalDatabaseConnection` parameter must include a `name`, `endpoint`, and `configuration` details for the external database.\nIf any of these are missing, the external database connection isn't created." ], "examples": [ { - "title": "Create an external database connection", + "title": "Create an external database connection ", "body": [ + "import { Permissions, webMethod } from \"wix-web-module\";", "import { externalDatabaseConnections } from \"wix-data.v2\";", + "import { elevate } from \"wix-auth\";", "", - "/* Sample external connection object: ", - " *", - " * const externalDatabaseConnection = {", - " * \"externalDatabaseConnection\": {", - " * \"configuration\": {", - " * \"secretKey\": \"\"", - " * },", - " * \"endpoint\": \"\",", - " * \"name\": \"connectionName\"", - " * }", - " * };", - " */", - "", - "export async function myCreateExternalDbConnection(externalDatabaseConnection) {", - " try {", - " const createdExternalDbConnection = await externalDatabaseConnections.createExternalDatabaseConnection(externalDatabaseConnection);", - " return createdExternalDbConnection; ", - " } catch(error) {", - " console.log(error)", - " // Handle the error", - " }", - "}", + "const elevatedCreateExternalDbConnection = elevate(externalDatabaseConnections.createExternalDatabaseConnection);", "", - "/* Returns a promise that resolves to the created external database connection:", + "/* Sample externalDatabaseConnection object:", + " * ", " * {", - " * \"name\": \"connectionName\",", - " * \"endpoint\": \"\",", - " * \"configuration\": {", - " * \"secretKey\": \"\"", + " * capabilities: {", + " * collectionModificationsSupported: false,", + " * fieldTypes: []", " * },", - " * \"connectionStatus\": {", - " * \"successful\": true,", - " * \"causeOfFailure\": \"NONE\",", - " * \"hasCollections\": false", + " * configuration: {", + " * secretKey: '74dbd6d6-ec5b-4668-8229-c77379bc6431'", " * },", - " * \"protocolVersion\": \"V2\"", + " * endpoint: 'https://example.com/my-external-database',", + " * name: 'connectionOne'", " * }", - " */" - ] - }, - { - "title": "Create an external database connection ", - "body": [ - "import { externalDatabaseConnections } from \"wix-data.v2\";", - "", - "/* Sample external connection object: ", - " *", - " * const externalDatabaseConnection = {", - " * \"externalDatabaseConnection\": {", - " * \"configuration\": {", - " * \"secretKey\": \"\"", - " * \"dbName\": \"database1\",", - " * \"description\": \"This is a connection to an AWS database.\"", - " * },", - " * \"endpoint\": \"\",", - " * \"name\": \"connectionName\"", - " * }", - " * };", " */", "", - "export async function myCreateExternalDbConnection(externalDatabaseConnection) {", - " try {", - " const createdExternalDbConnection = await externalDatabaseConnections.createExternalDatabaseConnection(externalDatabaseConnection);", - " return createdExternalDbConnection; ", - " } catch(error) {", - " console.log(error)", - " // Handle the error", + "export const myCreateExternalDbConnectionFunction = webMethod (", + " Permissions.Admin, ", + " async (newExternalDatabaseConnection) => {", + " try {", + " const createExternalDbConnectionResponse = await elevatedCreateExternalDbConnection(newExternalDatabaseConnection);", + "", + " const dbConnectionStatus = createExternalDbConnectionResponse.connectionStatus; ", + " const dbCapabilities = createExternalDbConnectionResponse.capabilities; ", + "", + " console.log('Successfully created an external database connection. Full response:', createExternalDbConnectionResponse);", + "", + " return createExternalDbConnectionResponse; ", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", " }", - "}", + ")", "", - "/* Returns a promise that resolves to the created external database connection with additional configurations:", + "/* Promise resolves to:", + " * ", " * {", - " * \"name\": \"connectionName\",", - " * \"endpoint\": \"\",", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", + " * }", " * \"configuration\": {", - " * \"secretKey\": \"\",", - " * \"dbName\": \"database1\",", - " * \"description\": \"This is a connection to an AWS database.\"", + " * \"secretKey\": \"74dbd6d6-ec5b-4668-8229-c77379bc6431\"", " * },", " * \"connectionStatus\": {", - " * \"successful\": true,", " * \"causeOfFailure\": \"NONE\",", - " * \"hasCollections\": false", + " * \"hasCollections\": \"YES\"", + " * \"successful\": true,", " * },", - " * \"protocolVersion\": \"V2\"", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connectionOne\",", + " * \"protocolVersion\": \"V2\",", " * }", " */" - ], - "extra": { - "description": "This function creates a connection to an existing database hosted on external platforms such as Google Cloud Platform, AWS, or Microsoft Azure. The connection is configured more extensively, based on the external database's API." - } + ] } ] }, @@ -191,23 +169,35 @@ "docs": { "summary": "Deletes an external database connection.", "description": [ - "> **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database you need to create a new external database connection.\n\nThis function is not a universal function and runs only on the backend." + "> **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database you need to create a new external database connection." ], "examples": [ { - "title": "Deletes an external database connection", + "title": "Delete an external database connection ", "body": [ + "import { Permissions, webMethod } from \"wix-web-module\";", "import { externalDatabaseConnections } from \"wix-data.v2\";", + "import { elevate } from \"wix-auth\";", "", - "export async function myDeleteExternalDbConnection(name) {", - " try {", - " await externalDatabaseConnections.deleteExternalDatabaseConnection(name) ", - " return; ", - " } catch(error) {", - " console.log(error)", - " // Handle the error", + "const elevatedDeleteExternalDbConnection = elevate(externalDatabaseConnections.deleteExternalDatabaseConnection);", + "", + "/* ", + " * Sample name value: 'ConnectionOne'", + " */", + "", + "export const myDeleteExternalDbConnection = webMethod(", + " Permissions.Admin,", + " async (name) => {", + " try {", + " await elevatedDeleteExternalDbConnection(name);", + "", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " } ", " }", - "}", + ")", "", "/* Promise resolves to void */" ] @@ -257,43 +247,58 @@ }, "docs": { "summary": "Retrieves an external database connection by name.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { - "title": "Gets an external database connection", + "title": "Get an external database connection ", "body": [ + "import { Permissions, webMethod } from \"wix-web-module\";", "import { externalDatabaseConnections } from \"wix-data.v2\";", + "import { elevate } from \"wix-auth\";", "", - "/* Sample name parameter: ", - " *", - " * const name = ;", - " * ", + "const elevatedGetExternalDbConnection = elevate(externalDatabaseConnections.getExternalDatabaseConnection);", + "", + "/* ", + " * Sample name value: 'ConnectionOne'", " */", "", - "export async function myGetExternalDbConnection(name) {", - " try {", - " const retrievedDb = await externalDatabaseConnections.getExternalDatabaseConnection(name); ", - " return retrievedDb; ", - " } catch(error) {", - " console.log(error)", - " // Handle the error", + "export const myGetExternalDbConnection = webMethod(", + " Permissions.Admin,", + " async (name) => {", + " try {", + " const getExternalDbConnectionResponse = await elevatedGetExternalDbConnection(name);", + "", + " const connectionSuccessful = getExternalDbConnectionResponse.connectionStatus.successful; ", + " const dbEndpoint = getExternalDbConnectionResponse.endpoint;", + "", + " console.log(`Retrieved the ${name} external database connection, which is ${connectionSuccessful ? 'successful' : 'unsuccessful'}`);", + " console.log(`It is mounted at ${dbEndpoint}`);", + "", + " return getExternalDbConnectionResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " } ", " }", - "}", + ")", "", - "/* Returns a promise that resolves to the retrieved external database connection:", + "/* Promise resolves to:", + " * ", " * {", - " * \"name\": \"\",", - " * \"endpoint\": \"\",", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": true,", + " * \"fieldTypes\": []", + " * }", " * \"configuration\": {", - " * \"secretKey\": \"\"", + " * \"secretKey\": \"74dbd6d6-ec5b-4668-8229-c77379bc6431\"", " * },", " * \"connectionStatus\": {", - " * \"successful\": true,", " * \"causeOfFailure\": \"NONE\",", - " * \"hasCollections\": true", + " * \"hasCollections\": \"YES\"", + " * \"successful\": true,", " * },", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connectionOne\",", " * \"protocolVersion\": \"V2\"", " * }", " */" @@ -342,115 +347,220 @@ }, "docs": { "summary": "Retrieves a list of all external database collections associated with the site or project.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { - "title": "List existing external database connections", + "title": "List existing external database connections with pagination ", "body": [ + "import { Permissions, webMethod } from \"wix-web-module\";", "import { externalDatabaseConnections } from \"wix-data.v2\";", + "import { elevate } from \"wix-auth\";", + "", + "const elevatedListExternalDbConnections = elevate(externalDatabaseConnections.listExternalDatabaseConnections);", + "", + "/* Sample options object:", + " * ", + " * {", + " * paging: {", + " * limit: 3,", + " * offset: 1", + " * }", + " * }", + " */", + "", + "export const myListExternalDatabaseConnectionsFunctionOptions = webMethod(", + " Permissions.Admin,", + " async (options) => {", + " try {", + " const listExternalDbConnectionsResponse = await elevatedListExternalDbConnections(options);", "", - "export async function myListDataCollectionsFunction(options) { ", - " try {", - " const myExternalDatabaseConnections = await externalDatabaseConnections.listExternalDatabaseConnections();", - " return myExternalDatabaseConnections;", - " } catch (error) {", - " console.error(error);", - " // Handle the error ", - " } ", - "}", + " const firstConnectionName = listExternalDbConnectionsResponse.externalDatabaseConnections[0].name;", + " const firstConnectionHaveCollections = listExternalDbConnectionsResponse.externalDatabaseConnections[0].connectionStatus.hasCollections;", + "", + " console.log('Here is a list of all current external database connections: ', listExternalDbConnectionsResponse.externalDatabaseConnections);", + "", + " return listExternalDbConnectionsResponse; ", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ")", "", - "/* Returns a promise that resolves to a list of external database connections:", + "/* Promise resolves to:", " * {", " * \"externalDatabaseConnections\": [", " * {", - " * \"name\": \"\",", - " * \"endpoint\": \"\",", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", + " * }", " * \"configuration\": {", - " * \"secretKey\": \"\"", + " * \"secretKey\": \"kvod85qz-fk40-mfi5-mfi4-mflqpmgl4f1\"", " * },", " * \"connectionStatus\": {", " * \"successful\": true,", " * \"causeOfFailure\": \"NONE\",", - " * \"hasCollections\": true", + " * \"hasCollections\": \"YES\"", " * },", - " * \"protocolVersion\": \"V2\"", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connectionFour\",", + " * \"protocolVersion\": \"V2\",", " * },", " * {", - " * \"name\": \"\",", - " * \"endpoint\": \"\",", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", + " * }", " * \"configuration\": {", - " * \"secretKey\": \"\"", + " * \"secretKey\": \"lfoe8tfd-fl35-mfo4-mfd1-mvkf99bjfi30\"", " * },", " * \"connectionStatus\": {", " * \"successful\": true,", " * \"causeOfFailure\": \"NONE\",", - " * \"hasCollections\": true", + " * \"hasCollections\": \"YES\"", " * },", - " * \"protocolVersion\": \"V2\"", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connectionThree\",", + " * \"protocolVersion\": \"V2\",", + " * },", + " * {", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", + " * }", + " * \"configuration\": {", + " * \"secretKey\": \"fkapguvn-kf5z-kfo4-kg94-nfoem4pamfi6\"", + " * },", + " * \"connectionStatus\": {", + " * \"successful\": true,", + " * \"causeOfFailure\": \"NONE\",", + " * \"hasCollections\": \"YES\"", + " * },", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connectionTwo\",", + " * \"protocolVersion\": \"V2\",", " * }", " * ],", " * \"pagingMetadata\": {", - " * \"count\": 2,", - " * \"offset\": 0,", - " * \"total\": 2,", + " * \"count\": 3,", + " * \"offset\": 1,", + " * \"total\": 5,", " * \"tooManyToCount\": false", " * }", " * }", - " */" + " */ " ] }, { - "title": "List existing external database connections using advanced configuration", + "title": "List existing external database connections ", "body": [ + "import { Permissions, webMethod } from \"wix-web-module\";", "import { externalDatabaseConnections } from \"wix-data.v2\";", + "import { elevate } from \"wix-auth\";", "", - "/* Sample options parameter:", - " *", - " * const options = {", - " * paging: {", - " * limit: 5, ", - " * offset: 1", - " * }", - " * };", - " */ ", + "const elevatedListExternalDbConnections = elevate(externalDatabaseConnections.listExternalDatabaseConnections);", "", - "export async function myListDataCollectionsFunction(options) { ", - " try {", - " const myExternalDatabaseConnections = await externalDatabaseConnections.listExternalDatabaseConnections(options);", - " return myExternalDatabaseConnections;", - " } catch (error) {", - " console.error(error);", - " // Handle the error ", - " } ", - "}", + "export const myListExternalDatabaseConnectionsFunction = webMethod(", + " Permissions.Admin,", + " async () => {", + " try {", + " const listExternalDbConnectionsResponse = await elevatedListExternalDbConnections();", "", - "/* Returns a promise that resolves to a list of up to five external database connections with an offset of one:", - " * {", - " * \"externalDatabaseConnections\": [", - " * {", - " * \"name\": \"\", // Starts with the second connection on the list", - " * \"endpoint\": \"\",", - " * \"configuration\": {", - " * \"secretKey\": \"\",", - " * \"addedField\": \"addedValue\"", - " * },", - " * \"connectionStatus\": {", - " * \"successful\": true,", - " * \"causeOfFailure\": \"NONE\",", - " * \"hasCollections\": true", - " * },", - " * \"protocolVersion\": \"V2\"", + " const firstConnectionName = listExternalDbConnectionsResponse.externalDatabaseConnections[0].name;", + " const firstConnectionHaveCollections = listExternalDbConnectionsResponse.externalDatabaseConnections[0].connectionStatus.hasCollections;", + "", + " console.log('Here is a list of all current external database connections: ', listExternalDbConnectionsResponse.externalDatabaseConnections);", + "", + " return listExternalDbConnectionsResponse; ", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ")", + "", + "/* Promise resolves to:", + " * [", + " * {", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", " * }", - " * ],", - " * \"pagingMetadata\": { ", - " * \"count\": 1,", - " * \"offset\": 1,", - " * \"total\": 2,", - " * \"tooManyToCount\": false", + " * \"configuration\": {", + " * \"secretKey\": \"fkapmf9s-kf5z-lg04-mfia-kfo294pamvi5\"", + " * },", + " * \"connectionStatus\": {", + " * \"successful\": true,", + " * \"causeOfFailure\": \"NONE\",", + " * \"hasCollections\": \"YES\"", + " * },", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connection1\",", + " * \"protocolVersion\": \"V2\",", + " * },", + " * {", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", + " * }", + " * \"configuration\": {", + " * \"secretKey\": \"ukapguvn-kf5z-kfo4-kg94-nfoem4pamfi6\"", + " * },", + " * \"connectionStatus\": {", + " * \"successful\": true,", + " * \"causeOfFailure\": \"NONE\",", + " * \"hasCollections\": \"YES\"", + " * },", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connectionFour\",", + " * \"protocolVersion\": \"V2\",", + " * },", + " * {", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", + " * }", + " * \"configuration\": {", + " * \"secretKey\": \"kf0pguvn-mgoi-kfo4-kg94-nfoefds5mfi6\"", + " * },", + " * \"connectionStatus\": {", + " * \"successful\": true,", + " * \"causeOfFailure\": \"NONE\",", + " * \"hasCollections\": \"YES\"", + " * },", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connectionThree\",", + " * \"protocolVersion\": \"V2\",", + " * },", + " * {", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", + " * }", + " * \"configuration\": {", + " * \"secretKey\": \"fergfy84-kf5z-fdsf-kg94-nfoegfdg67i6\"", + " * },", + " * \"connectionStatus\": {", + " * \"successful\": true,", + " * \"causeOfFailure\": \"NONE\",", + " * \"hasCollections\": \"YES\"", + " * },", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connectionTwo\",", + " * \"protocolVersion\": \"V2\",", + " * },", + " * {", + " * \"applicationId\": \"8b7e9a62-t5hd-4372-gres-c6fb7762600b\"", + " * \"connectionStatus\": {", + " * \"successful\": false,", + " * \"causeOfFailure\": \"DESTINATION_ENDPOINT_NOT_DEFINED\",", + " * \"hasCollections\": \"UNKNOWN\"", + " * },", + " * \"name\": \"extDbSpi\",", + " * \"protocolVersion\": \"V3\",", " * }", - " * }", + " * ]", " */" ] } @@ -485,7 +595,7 @@ "referenceType": "wix-data-v2.ExternalDatabaseConnections.UpdateExternalDatabaseConnection" } ], - "doc": "", + "doc": "Updated external database connection details. The existing connection is replaced with this version.", "required": true } ], @@ -511,65 +621,73 @@ "docs": { "summary": "Updates an external database connection.", "description": [ - "An external database collection name must be provided in `name`.\nIf an existing external database connection is found with the same name, that connection's details are updated.\nIf no external database connection has that name, the request fails.\n\n> **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.\n\nThis function is not a universal function and runs only on the backend." + "An external database collection name must be provided in `name`.\nIf an existing external database connection is found with the same name, that connection's details are updated.\nIf no external database connection has that name, the request fails.\n\n> **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost." ], "examples": [ { "title": "Update an existing external database connection ", "body": [ + "import { Permissions, webMethod } from \"wix-web-module\";", "import { externalDatabaseConnections } from \"wix-data.v2\";", + "import { elevate } from \"wix-auth\";", + "", + "const elevatedUpdateExternalDatabaseConnection = elevate(externalDatabaseConnections.updateExternalDatabaseConnection);", "", - "/* Sample external connection object: ", + "/* ", + " * Sample name value: 'connectionOne'", " *", - " * const externalDatabaseConnection = {", - " * \"name\": \"\",", - " * \"externalDatabaseConnection\": {", - " * \"endpoint\": \"\",", - " * \"configuration\": {", - " * \"secretKey\": \"\"", - " * \"addedField\": \"addedValue\"", - " * // Add additional fields here ", - " * },", - " * \"connectionStatus\": {", - " * \"successful\": true,", - " * \"causeOfFailure\": \"NONE\",", - " * \"hasCollections\": true", - " * },", - " * \"protocolVersion\": \"V2\"", - " * }", - " * };", + " * Sample externalDatabaseConnection object:", + " * ", + " * {", + " * capabilities: {", + " * collectionModificationsSupported: false,", + " * fieldTypes: []", + " * },", + " * configuration: {", + " * secretKey: '74dbd6d6-ec5b-4668-8229-c77379bc6431',", + " * username: 'Jane Doe'", + " * },", + " * endpoint: 'https://example.com/my-external-database'", + " * }", " */", "", - "export async function myUpdateExternalDatabaseConnectionFunction(name, externalDatabaseConnection) {", - " try {", - " const updatedExternalDatabaseConnection = await externalDatabaseConnections.updateExternalDatabaseConnection(name, externalDatabaseConnection);", - " return updatedExternalDatabaseConnection; ", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " } ", - "} ", + "export const myUpdateExternalDatabaseConnectionFunction = webMethod(", + " Permissions.Admin,", + " async (name, externalDatabaseConnection) => {", + " try {", + " const updateExternalDatabaseConnectionResponse = await elevatedUpdateExternalDatabaseConnection(name, externalDatabaseConnection);", + "", + " console.log(`The ${name} connection was updated with the new values. It is currently mounted at ${updateExternalDatabaseConnectionResponse.endpoint}`);", "", - "/* Returns a promise that resolves to the updated external database connection:", + " return updateExternalDatabaseConnectionResponse; ", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ")", + "", + "/* Promise resolves to:", " * {", - " * \"name\": \"\",", - " * \"endpoint\": \"\",", + " * \"capabilities\": {", + " * \"collectionModificationsSupported\": false,", + " * \"fieldTypes\": []", + " * }", " * \"configuration\": {", - " * \"secretKey\": \"\"", - " * \"addedField\": \"addedValue\"", + " * \"secretKey\": \"74dbd6d6-ec5b-4668-8229-c77379bc6431\",", + " * \"username\": \"Jane Doe\"", " * },", " * \"connectionStatus\": {", " * \"successful\": true,", " * \"causeOfFailure\": \"NONE\",", - " * \"hasCollections\": false", + " * \"hasCollections\": \"YES\"", " * },", - " * \"protocolVersion\": \"V2\"", + " * \"endpoint\": \"https://example.com/my-external-database\",", + " * \"name\": \"connection1\",", + " * \"protocolVersion\": \"\"", " * }", - " */ " - ], - "extra": { - "description": "This function effectively replaces the existing database connection with one passed as a parameter" - } + " */" + ] } ] }, @@ -584,6 +702,26 @@ } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Capabilities", "members": [ @@ -595,7 +733,7 @@ "nativeType": "boolean" } ], - "doc": "Whether the external database supports creating or updating collections." + "doc": "Whether the external database supports creating new collections, updating the structure of existing collections, or deleting them." }, { "name": "fieldTypes", @@ -612,7 +750,7 @@ } } ], - "doc": "Field types supported by the external database.\nThis option only affects collection creation and update requests." + "doc": "Field types the external database supports.\nThis field only applies when `collectionModificationsSupported` is `true`." } ], "docs": { @@ -632,7 +770,7 @@ "nativeType": "string" } ], - "doc": "Reason for the failure, if a connection isn't established successfully.\n+ `NONE`: No connection failure.\n+ `COMMUNICATION_FAILURE`: General communication failure.\n+ `DESTINATION_HOST_UNREACHABLE`: External database host is unreachable.\n+ `UNAUTHORIZED`: Unauthorized to access external database." + "doc": "If and why a connection attempt failed.\n+ `NONE`: No connection failure.\n+ `COMMUNICATION_FAILURE`: General communication failure.\n+ `DESTINATION_HOST_UNREACHABLE`: External database host is unreachable.\n+ `UNAUTHORIZED`: Unauthorized to access external database.\n+ `DESTINATION_ENDPOINT_NOT_DEFINED`: `Endpoint` property is not set." }, { "name": "hasCollections", @@ -662,9 +800,39 @@ ] } }, + { + "name": "CreateExternalDatabaseConnectionOptions", + "members": [ + { + "name": "connectionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Connection type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "CreateExternalDatabaseConnectionRequest", "members": [ + { + "name": "connectionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Connection type." + }, { "name": "externalDatabaseConnection", "type": [ @@ -729,9 +897,273 @@ ] } }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ExternalDatabaseConnection", "members": [ + { + "name": "capabilities", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.Capabilities" + } + ], + "doc": "The external database's capabilities." + }, { "name": "configuration", "optional": true, @@ -979,6 +1411,17 @@ { "name": "UpdateExternalDatabaseConnection", "members": [ + { + "name": "capabilities", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-data-v2.ExternalDatabaseConnections.Capabilities" + } + ], + "doc": "The external database's capabilities." + }, { "name": "configuration", "optional": true, diff --git a/wix-data-v2/wix-data-v2/Indexes.service.json b/wix-data-v2/wix-data-v2/Indexes.service.json index fa08a3c2cf..f5ffc324ef 100644 --- a/wix-data-v2/wix-data-v2/Indexes.service.json +++ b/wix-data-v2/wix-data-v2/Indexes.service.json @@ -58,35 +58,234 @@ "docs": { "summary": "Creates an index for a data collection.", "description": [ - "The index can't be used immediately, as the process of generating the index takes time.\nYou can check whether your index is ready using `listIndexes()`.\n\nNote that when an index fails to create, the failed index still occupies a slot.\nTo remove the failed index and free up the slot for a new index, use `dropIndex()`.\n\nThis function is not a universal function and runs only on the backend." + "The index can't be used immediately, as the process of generating the index takes time.\nYou can check whether your index is ready using `listIndexes()`.\n\nNote that when an index fails to create, the failed index still occupies a slot.\nTo remove the failed index and free up the slot for a new index, use `dropIndex()`." ], "examples": [ { - "title": "createIndex example", + "title": "Create an index (dashboard page code)", "body": [ "import { indexes } from 'wix-data.v2';", - " ", - " async function createIndex(dataCollectionId, index, options) {", - " try {", - " const result = await indexes.createIndex(dataCollectionId, index, options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* ", + " * Sample dataCollectionId value = 'Jackets'", + " *", + " * Sample index value: ", + " * {", + " * fields: [", + " * {", + " * path: 'price'", + " * }", + " * ],", + " * name: 'byPrice'", + " * }", + " */", + "", + "", + "export async function myCreateIndexFunction(dataCollectionId, index) {", + " try {", + " const createIndexResponse = await indexes.createIndex(dataCollectionId, index);", + " console.log(`Successfully created an index named ${createIndexResponse.name}. Full response: `, createIndexResponse);", + "", + " return createIndexResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"caseInsensitive\": false,", + " * \"fields\": [", + " * {", + " * \"order\": \"ASC\",", + " * \"path\": \"price\"", + " * }", + " * ],", + " * \"name\": \"byPrice\",", + " * \"status\": \"BUILDING\",", + " * \"unique\": false,", + " * }", + " */", + "" + ] + }, + { + "title": "Create an index (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { indexes } from 'wix-data.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* ", + " * Sample dataCollectionId value = 'Jackets'", + " *", + " * Sample index value: ", + " * {", + " * fields: [", + " * {", + " * path: 'price'", + " * }", + " * ],", + " * name: 'byPrice'", + " * }", + " */", + "", + "export const myCreateIndexFunction = webMethod(Permissions.Anyone, async (dataCollectionId, index) => {", + " try {", + " const elevatedCreateIndex = elevate(indexes.createIndex);", + " const createIndexResponse = await elevatedCreateIndex(dataCollectionId, index);", + " console.log(`Successfully created an index named ${createIndexResponse.name}. Full response: `, createIndexResponse);", + "", + " return createIndexResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"caseInsensitive\": false,", + " * \"fields\": [", + " * {", + " * \"order\": \"ASC\",", + " * \"path\": \"price\"", + " * }", + " * ],", + " * \"name\": \"byPrice\",", + " * \"status\": \"BUILDING\",", + " * \"unique\": false,", + " * }", + " */", + "" + ] + }, + { + "title": "Create an index ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { indexes } from 'wix-data.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* ", + " * Sample dataCollectionId value = 'Jackets'", + " *", + " * Sample index value: ", + " * {", + " * caseInsensitive: true,", + " * fields: [", + " * {", + " * path: 'itemName'", + " * },", + " * {", + " * path: 'price'", + " * },", + " * {", + " * order: 'DESC',", + " * path: 'size'", + " * }", + " * ],", + " * name: 'byItemNameAndPriceAndSize'", + " * }", + " */", + "", + "export const myCreateIndexFunction = webMethod(Permissions.Anyone, async (dataCollectionId, index) => {", + " try {", + " const elevatedCreateIndex = elevate(indexes.createIndex);", + " const createIndexResponse = await elevatedCreateIndex(dataCollectionId, index);", + " console.log(`Successfully created an index named ${createIndexResponse.name}. Full response: `, createIndexResponse);", + "", + " return createIndexResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"caseInsensitive\": true,", + " * \"fields\": [", + " * {", + " * \"order\": \"ASC\",", + " * \"path\": \"itemName\"", + " * }, ", + " * {", + " * \"order\": \"ASC\",", + " * \"path\": \"price\"", + " * },", + " * {", + " * \"order\": \"DESC\",", + " * \"path\": \"size\"", + " * }", + " * ],", + " * \"name\": \"byItemNameAndPriceAndSize\",", + " * \"status\": \"BUILDING\",", + " * \"unique\": false,", + " * }", + " */", + "" + ], + "extra": { + "description": "Create a case-insensitive index based on the item name and price in ascending order, and item size in descending order " + } + }, + { + "title": "Create a unique index ", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { indexes } from 'wix-data.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* ", + " * Sample dataCollectionId value = 'shoes';", + " * ", + " * Sample index value = ", + " * {", + " * name: 'bySerialNum',", + " * unique: true,", + " * fields: [", + " * {", + " * path: 'serial'", + " * }", + " * ]", + " * };", + "*/", + "", + "export const myCreateIndexFunction = webMethod(Permissions.Anyone, async (dataCollectionId, index) => {", + " try {", + " const elevatedCreateIndex = elevate(indexes.createIndex);", + " const createUniqueIndexResponse = await elevatedCreateIndex(dataCollectionId, index);", + " console.log(`Successfully created an index named ${createUniqueIndexResponse.name}. Full response: `, createUniqueIndexResponse);", + "", + " return createUniqueIndexResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Returns a promise that resolves to the index being created:", + " * {", + " * \"caseInsensitive\": false,", + " * \"fields\": [", + " * {", + " * \"order\": \"ASC\",", + " * \"path\": \"serial\"", + " * }", + " * ],", + " * \"name\": \"bySerialNum\",", + " * \"status\": \"BUILDING\",", + " * \"unique\": true,", + " * }", + " */", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "createIndex", "isAdminMethod": true }, @@ -136,35 +335,62 @@ "docs": { "summary": "Removes an index from a data collection.", "description": [ - "The process of dropping an index from a collection takes time.\nYou can check whether your index has been dropped by calling `listIndexes()`.\n\nThis function is not a universal function and runs only on the backend." + "The process of dropping an index from a collection takes time.\nYou can check whether your index has been dropped by calling `listIndexes()`." ], "examples": [ { - "title": "dropIndex example", + "title": "Drop an index (dashboard page code)", + "body": [ + "import { indexes } from \"wix-data.v2\";", + "", + "/* ", + " * Sample dataCollectionId value = 'Jackets'", + " *", + " * Sample indexName value = 'BySizeAndAvailability'", + "*/", + "", + "export async function myDropIndexFunction(dataCollectionId, indexName) {", + " try {", + " await indexes.dropIndex(dataCollectionId, indexName);", + " console.log(`The ${indexName} index is being dropped.`);", + "", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */", + "" + ] + }, + { + "title": "Drop an index (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { indexes } from 'wix-data.v2';", - " ", - " async function dropIndex(dataCollectionId, indexName, options) {", - " try {", - " const result = await indexes.dropIndex(dataCollectionId, indexName, options);", + "import { elevate } from 'wix-auth';", + "", + "export const myDropIndexFunction = webMethod(Permissions.Anyone, async (dataCollectionId, indexName) => {", + " try {", + " const elevatedDropIndex = elevate(indexes.dropIndex);", + " await elevatedDropIndex(dataCollectionId, indexName);", + " console.log(`The ${indexName} index is being dropped.`);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to void */" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "dropIndex", "isAdminMethod": true }, @@ -213,35 +439,151 @@ "docs": { "summary": "Lists all indexes defined for a data collection.", "description": [ - "When an index's status is `ACTIVE`, it is ready to use.\nWhile it is still being created, its status is `BUILDING`.\n\nWhen an index's status is `DROPPED`, it has been dropped successfully.\nWhile it is still in the process of being removed, its status is `DROPPING`.\n\nThis function is not a universal function and runs only on the backend." + "When an index's status is `ACTIVE`, it is ready to use.\nWhile it is still being created, its status is `BUILDING`.\n\nWhen an index's status is `DROPPED`, it has been dropped successfully.\nWhile it is still in the process of being removed, its status is `DROPPING`." ], "examples": [ { - "title": "listIndexes example", + "title": "List indexes (dashboard page code)", "body": [ + "import { indexes } from \"wix-data.v2\";", + "", + "/* ", + " * Sample dataCollectionId value = 'Jackets'", + " *", + " * Sample options value = {", + " * limit: 5", + " * }", + "*/", + "", + "export async function myListIndexesFunction(dataCollectionId, options) {", + " try {", + " const listIndexesResponse = await indexes.listIndexes(dataCollectionId, options);", + " console.log(`List of indexes for this collection: ${listIndexesResponse.indexes}`);", + "", + " return listIndexesResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to a list of indexes for the specified collection, with paging metadata:", + "* {", + "* \"indexes\": [", + "* {", + "* \"caseInsensitive\": true,", + "* \"fields\": [", + "* {", + "* \"order\": \"ASC\"", + "* \"path\": \"itemName\",", + "* },", + "* {", + "* \"order\": \"DESC\"", + "* \"path\": \"size\",", + "* }", + "* ],", + "* \"name\": \"byItemNameAndSize\",", + "* \"status\": \"ACTIVE\",", + "* \"unique\": false,", + "* },", + "* {", + "* \"caseInsensitive\": false", + "* \"fields\": [", + "* {", + "* \"order\": \"ASC\"", + "* \"path\": \"size\",", + "* },", + "* {", + "* \"order\": \"DESC\"", + "* \"path\": \"available\",", + "* }", + "* ],", + "* \"name\": \"bySizeAndAvailability\",", + "* \"status\": \"ACTIVE\",", + "* \"unique\": false,", + "* }", + "* ],", + "* \"pagingMetadata\": {", + "* \"count\": 2,", + "* \"offset\": 0,", + "* \"total\": 2,", + "* \"tooManyToCount\": false", + "* }", + "* }", + "*/", + "" + ] + }, + { + "title": "List indexes (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { indexes } from 'wix-data.v2';", - " ", - " async function listIndexes(dataCollectionId, options) {", - " try {", - " const result = await indexes.listIndexes(dataCollectionId, options);", + "import { elevate } from 'wix-auth';", + "", + "export const myListIndexesFunction = webMethod(Permissions.Anyone, async (dataCollectionId, options) => {", + " try {", + " const elevatedListIndexes = elevate(indexes.listIndexes);", + " const listIndexesResponse = await elevatedListIndexes(dataCollectionId, options);", + " console.log(`List of indexes for this collection: ${listIndexesResponse.indexes}`);", + "", + " return listIndexesResponse;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Promise resolves to a list of indexes for the specified collection, with paging metadata:", + "* {", + "* \"indexes\": [", + "* {", + "* \"caseInsensitive\": true,", + "* \"fields\": [", + "* {", + "* \"order\": \"ASC\"", + "* \"path\": \"itemName\",", + "* },", + "* {", + "* \"order\": \"DESC\"", + "* \"path\": \"size\",", + "* }", + "* ],", + "* \"name\": \"byItemNameAndSize\",", + "* \"status\": \"ACTIVE\",", + "* \"unique\": false,", + "* },", + "* {", + "* \"caseInsensitive\": false", + "* \"fields\": [", + "* {", + "* \"order\": \"ASC\"", + "* \"path\": \"size\",", + "* },", + "* {", + "* \"order\": \"DESC\"", + "* \"path\": \"available\",", + "* }", + "* ],", + "* \"name\": \"bySizeAndAvailability\",", + "* \"status\": \"ACTIVE\",", + "* \"unique\": false,", + "* }", + "* ],", + "* \"pagingMetadata\": {", + "* \"count\": 2,", + "* \"offset\": 0,", + "* \"total\": 2,", + "* \"tooManyToCount\": false", + "* }", + "* }", + "*/", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "listIndexes", "isAdminMethod": true } diff --git a/wix-data-v2/wix-data-v2/Indexes/guides/indexes-1-intro.md b/wix-data-v2/wix-data-v2/Indexes/guides/indexes-1-intro.md index 7d8b50556a..8fb43e3851 100644 --- a/wix-data-v2/wix-data-v2/Indexes/guides/indexes-1-intro.md +++ b/wix-data-v2/wix-data-v2/Indexes/guides/indexes-1-intro.md @@ -4,7 +4,7 @@ title: Introduction # About the Indexes API -  + The Indexes API enables you to create indexes for data collections, to make querying data faster. diff --git a/wix-data-v2/wix-data-v2/Items.service.json b/wix-data-v2/wix-data-v2/Items.service.json index 4b6e2720ba..64bb461cf6 100644 --- a/wix-data-v2/wix-data-v2/Items.service.json +++ b/wix-data-v2/wix-data-v2/Items.service.json @@ -44,7 +44,7 @@ "docs": { "summary": "Runs an aggregation on a data collection and returns the resulting list of items.", "description": [ - "An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries.\nYou can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need.\n\nThis function is not a universal function and runs only on the backend." + "An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries.\nYou can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need." ], "examples": [ { @@ -115,7 +115,7 @@ "docs": { "summary": "Inserts one or more references in the specified fields of items in a collection.", "description": [ - "This endpoint adds one or more references to a collection.\nEach new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.\n\nThis function is not a universal function and runs only on the backend." + "This endpoint adds one or more references to a collection.\nEach new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item." ], "examples": [ { @@ -183,7 +183,7 @@ "docs": { "summary": "Adds multiple items to a collection.", "description": [ - "When each item is inserted into a collection, its ID is automatically assigned a random value.\nYou can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.\n\nThis function is not a universal function and runs only on the backend." + "When each item is inserted into a collection, its ID is automatically assigned a random value.\nYou can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail." ], "examples": [ { @@ -253,9 +253,7 @@ }, "docs": { "summary": "Removes one or more references.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "bulkRemoveDataItemReferences example", @@ -322,7 +320,7 @@ "docs": { "summary": "Removes multiple items from a collection.", "description": [ - "If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.\n\n> **Note:** Once an item has been removed from a collection, it can't be restored.\n\nThis function is not a universal function and runs only on the backend." + "If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.\n\n> **Note:** Once an item has been removed from a collection, it can't be restored." ], "examples": [ { @@ -390,7 +388,7 @@ "docs": { "summary": "Inserts or updates multiple items in a collection.", "description": [ - "This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:\n\n+ If you don't provide an ID, a new item is created.\n\n+ If you provide an ID that doesn't exist in the collection, a new item is created with that ID.\n\n+ If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.\n\n> **Note:** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.\n> This means that all of the item's previous fields and values are lost.\n\nThis function is not a universal function and runs only on the backend." + "This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:\n\n+ If you don't provide an ID, a new item is created.\n\n+ If you provide an ID that doesn't exist in the collection, a new item is created with that ID.\n\n+ If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.\n\n> **Note:** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.\n> This means that all of the item's previous fields and values are lost." ], "examples": [ { @@ -458,7 +456,7 @@ "docs": { "summary": "Updates multiple items in a collection.", "description": [ - "This function replaces each specified data item's existing data with the payload provided in the request.\n\nEach item in the request must include an ID. If an item is found in the specified collection with\nthe same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.\n\nWhen an item is updated, its `data._updatedDate` field is changed to the current date and time.\n\n> **Note:**\n> After each item is updated, it only contains the fields included in the request. If the existing item has fields with values and those fields\n> aren't included in the updated item, their values are lost.\n\nThis function is not a universal function and runs only on the backend." + "This function replaces each specified data item's existing data with the payload provided in the request.\n\nEach item in the request must include an ID. If an item is found in the specified collection with\nthe same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.\n\nWhen an item is updated, its `data._updatedDate` field is changed to the current date and time.\n\n> **Note:**\n> After each item is updated, it only contains the fields included in the request. If the existing item has fields with values and those fields\n> aren't included in the updated item, their values are lost." ], "examples": [ { @@ -525,7 +523,7 @@ "docs": { "summary": "Counts the number of items in a data collection that match the provided filtering preferences.", "description": [ - "> **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.\n\nThis function is not a universal function and runs only on the backend." + "> **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`." ], "examples": [ { @@ -603,7 +601,7 @@ "docs": { "summary": "Retrieves an item from a collection.", "description": [ - "> **Note**: When calling `getDataItem()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.\n\nThis function is not a universal function and runs only on the backend." + "> **Note**: When calling `getDataItem()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`." ], "examples": [ { @@ -671,7 +669,7 @@ "docs": { "summary": "Adds an item to a collection.", "description": [ - "An item can only be inserted into an existing connection.\nYou can create a new collection using the Data Collections API.\n\nWhen an item is inserted into a collection, the item's ID is automatically assigned a random value.\nYou can optionally provide a custom ID in `dataItem.id` when inserting the item.\nIf you specify an ID that already exists in the collection, the insertion will fail.\n\nIf `options.dataItem.data` is empty, a new item is created with no data fields.\n\nThis function is not a universal function and runs only on the backend." + "An item can only be inserted into an existing connection.\nYou can create a new collection using the Data Collections API.\n\nWhen an item is inserted into a collection, the item's ID is automatically assigned a random value.\nYou can optionally provide a custom ID in `dataItem.id` when inserting the item.\nIf you specify an ID that already exists in the collection, the insertion will fail.\n\nIf `options.dataItem.data` is empty, a new item is created with no data fields." ], "examples": [ { @@ -741,7 +739,7 @@ "docs": { "summary": "Inserts a reference in the specified field in an item in a collection.", "description": [ - "A reference in `options.dataItemReference` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.\n\nThis function is not a universal function and runs only on the backend." + "A reference in `options.dataItemReference` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item." ], "examples": [ { @@ -811,7 +809,7 @@ "docs": { "summary": "Checks whether a field in a referring item contains a reference to a specified item.", "description": [ - "> **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.\n\nThis function is not a universal function and runs only on the backend." + "> **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`." ], "examples": [ { @@ -871,7 +869,7 @@ "docs": { "summary": "Creates a query to retrieve items from a database collection.", "description": [ - "The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a `DataItemsQueryBuilder` object.\n\nThe returned object contains the query definition which is typically used to run the query using the `find()` function.\n\nYou can refine the query by chaining `DataItemsQueryBuilder` functions onto the query. `DataItemsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDataItems()` returns.\n\nThe `queryDataItems()` function runs with the following `DataItemsQueryBuilder` defaults that you can override:\n\n+ `skip`: 0\n+ `limit`: 50\n+ `descending`: by `_createdDate`\n\nThe functions that are chained to `queryDataItems()` are applied in the order they are called. For example, if you sort on an `age` field in ascending order and then on a `name` field in descending order, the results are sorted first by the age of the items and then, if there are multiple results with the same age, the items are sorted by name in descending order, per age value.\n\nIf the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To get the data from referenced items, specify them in the `options.includeReferencedItems` parameter.\n\n> **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.\n\n\n\nThis function is not a universal function and runs only on the backend." + "The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a `DataItemsQueryBuilder` object.\n\nThe returned object contains the query definition which is typically used to run the query using the `find()` function.\n\nYou can refine the query by chaining `DataItemsQueryBuilder` functions onto the query. `DataItemsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDataItems()` returns.\n\nThe `queryDataItems()` function runs with the following `DataItemsQueryBuilder` defaults that you can override:\n\n+ `skip`: 0\n+ `limit`: 50\n+ `descending`: by `_createdDate`\n\nThe functions that are chained to `queryDataItems()` are applied in the order they are called. For example, if you sort on an `age` field in ascending order and then on a `name` field in descending order, the results are sorted first by the age of the items and then, if there are multiple results with the same age, the items are sorted by name in descending order, per age value.\n\nIf the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To get the data from referenced items, specify them in the `options.includeReferencedItems` parameter.\n\n> **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.\n\n" ], "examples": [ { @@ -931,7 +929,7 @@ "docs": { "summary": "Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.", "description": [ - "As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.\nHowever, `queryDistinctValues()` doesn't return all of the full items that match the query.\nRather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.\nIf more than one item has the same value for that field, that value appears only once.\n\nFor more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n\n> **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.\n\nThis function is not a universal function and runs only on the backend." + "As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.\nHowever, `queryDistinctValues()` doesn't return all of the full items that match the query.\nRather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.\nIf more than one item has the same value for that field, that value appears only once.\n\nFor more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n\n> **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`." ], "examples": [ { @@ -998,7 +996,7 @@ "docs": { "summary": "Retrieves the full items referenced in the specified field of an item.", "description": [ - "Reference and multi-reference fields refer to items in different collections.\nUse this function to retrieve the full details of the referenced items themselves.\n\nFor example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.\nQuerying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.\nThis gives you information from the **People** collection about each of the actors in the specified movie.\n\n> **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.\n\nThis function is not a universal function and runs only on the backend." + "Reference and multi-reference fields refer to items in different collections.\nUse this function to retrieve the full details of the referenced items themselves.\n\nFor example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.\nQuerying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.\nThis gives you information from the **People** collection about each of the actors in the specified movie.\n\n> **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`." ], "examples": [ { @@ -1076,7 +1074,7 @@ "docs": { "summary": "Removes an item from a collection.", "description": [ - "If any items in other collections reference the removed item in reference or multi-reference fields, those fields are cleared.\n\n> **Note:**\n> Once an item has been removed from a collection, it can't be restored.\n\nThis function is not a universal function and runs only on the backend." + "If any items in other collections reference the removed item in reference or multi-reference fields, those fields are cleared.\n\n> **Note:**\n> Once an item has been removed from a collection, it can't be restored." ], "examples": [ { @@ -1146,9 +1144,7 @@ }, "docs": { "summary": "Removes the specified reference from the specified field.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "removeDataItemReference example", @@ -1216,7 +1212,7 @@ "docs": { "summary": "Replaces references in a specified field of a specified data item.", "description": [ - "This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.\nThe function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.\n\n> **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.\n\nThis function is not a universal function and runs only on the backend." + "This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.\nThe function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.\n\n> **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed." ], "examples": [ { @@ -1284,7 +1280,7 @@ "docs": { "summary": "Inserts or updates an item in a collection.", "description": [ - "The `saveDataItem()` function inserts or updates the specified item, depending on whether it already exists in the collection.\n\n+ If you don't provide an ID, a new item is created.\n\n+ If you provide an ID that does not exist in the collection, a new item is created with that ID.\n\n+ If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.\n\n> **Note:** When you provide an item with an ID that already exists in the collection, the payload you provide in `options.dataItem.data` replaces the existing item with that ID.\n> This means that the item's previous fields and values are lost.\n\nThis function is not a universal function and runs only on the backend." + "The `saveDataItem()` function inserts or updates the specified item, depending on whether it already exists in the collection.\n\n+ If you don't provide an ID, a new item is created.\n\n+ If you provide an ID that does not exist in the collection, a new item is created with that ID.\n\n+ If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.\n\n> **Note:** When you provide an item with an ID that already exists in the collection, the payload you provide in `options.dataItem.data` replaces the existing item with that ID.\n> This means that the item's previous fields and values are lost." ], "examples": [ { @@ -1351,7 +1347,7 @@ "docs": { "summary": "Removes all items from a collection.", "description": [ - "If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.\n\n> **Note:**\n> Once items have been removed from a collection, they can't be restored.\n\nThis function is not a universal function and runs only on the backend." + "If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.\n\n> **Note:**\n> Once items have been removed from a collection, they can't be restored." ], "examples": [ { @@ -1430,7 +1426,7 @@ "docs": { "summary": "Updates an item in a collection.", "description": [ - "This function replaces the data item's existing data with the payload provided in `options.dataItem.data` in the request.\n\nTo update an item, you need to specify an item ID and a collection ID.\nIf an item is found in the specified collection with the specified ID, that item is updated.\nIf the collection doesn't contain an item with that ID, the request fails.\n\nWhen an item is updated, its `data._updatedDate` field is changed to the current date and time.\n\n> **Note:**\n> After an item is updated, it only contains the fields included in the `options.dataItem.data` payload in the `updateDataItem()` call.\n> If the existing item has fields with values and those fields aren't included in the updated item, their values are lost.\n\nThis function is not a universal function and runs only on the backend." + "This function replaces the data item's existing data with the payload provided in `options.dataItem.data` in the request.\n\nTo update an item, you need to specify an item ID and a collection ID.\nIf an item is found in the specified collection with the specified ID, that item is updated.\nIf the collection doesn't contain an item with that ID, the request fails.\n\nWhen an item is updated, its `data._updatedDate` field is changed to the current date and time.\n\n> **Note:**\n> After an item is updated, it only contains the fields included in the `options.dataItem.data` payload in the `updateDataItem()` call.\n> If the existing item has fields with values and those fields aren't included in the updated item, their values are lost." ], "examples": [ { @@ -1526,6 +1522,16 @@ ], "doc": "Filter applied to the collection's data prior to running the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object." }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" + }, { "name": "paging", "optional": true, @@ -1643,6 +1649,16 @@ ], "doc": "Filter applied to the collection's data prior to running the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object." }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" + }, { "name": "paging", "optional": true, @@ -2741,6 +2757,16 @@ } ], "doc": "Filter object in the following format:\n\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`.\n\nExamples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n" + }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" } ], "docs": { @@ -2780,6 +2806,16 @@ } ], "doc": "Filter object in the following format:\n\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`.\n\nExamples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n" + }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" } ], "docs": { @@ -2959,6 +2995,16 @@ } ], "doc": "ID of the collection from which to retrieve the data item." + }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" } ], "docs": { @@ -2997,6 +3043,16 @@ } ], "doc": "ID of the data item to retrieve." + }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" } ], "docs": { @@ -3703,6 +3759,16 @@ ], "doc": "Properties for which to include referenced items in the query's results.\nUp to 50 referenced items can be included for each item that matches the query." }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" + }, { "name": "returnTotalCount", "optional": true, @@ -3759,6 +3825,16 @@ ], "doc": "Properties for which to include referenced items in the query's results.\nUp to 50 referenced items can be included for each item that matches the query." }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" + }, { "name": "query", "optional": true, @@ -3875,6 +3951,16 @@ ], "doc": "Filter object in the following format:\n\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`.\n\nExamples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n" }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" + }, { "name": "order", "optional": true, @@ -3975,6 +4061,16 @@ ], "doc": "Filter object in the following format:\n\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`.\n\nExamples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n" }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" + }, { "name": "order", "optional": true, @@ -4122,6 +4218,16 @@ ], "doc": "ID of the collection containing the referring item." }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" + }, { "name": "order", "optional": true, @@ -4222,6 +4328,16 @@ ], "doc": "ID of the collection containing the referring item." }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language.\n**Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n\nIf not provided, result text is not translated.\n" + }, { "name": "order", "optional": true, diff --git a/wix-data-v2/wix-data-v2/Items/DataItemsQueryResult.service.json b/wix-data-v2/wix-data-v2/Items/DataItemsQueryResult.service.json index 70ca0f031b..15a483ee0a 100644 --- a/wix-data-v2/wix-data-v2/Items/DataItemsQueryResult.service.json +++ b/wix-data-v2/wix-data-v2/Items/DataItemsQueryResult.service.json @@ -11,6 +11,9 @@ { "name": "currentPage", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } @@ -209,6 +212,9 @@ { "name": "totalCount", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } @@ -245,6 +251,9 @@ { "name": "totalPages", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } diff --git a/wix-data/wix-data.service.json b/wix-data/wix-data.service.json index e449d3b5a9..96e8c5548e 100644 --- a/wix-data/wix-data.service.json +++ b/wix-data/wix-data.service.json @@ -1,6 +1,7 @@ { "name": "wix-data", "mixes": [], - "labels": [], + "labels": + [ "changed" ], "location": { "lineno": 72, "filename": "data-api.js" }, @@ -3150,17 +3151,14 @@ { "name": "consistentRead", "type": "boolean", "doc": "When `true`, reads data from the primary database instance. \nThis decreases performance but ensures data retrieved is up to date even immediately after an update. \nSee [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.\n\nDefault: `false`", - "optional": true }, - { "name": "language", - "type": "string", - "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language. **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\nIf not provided, result text is not translated.", "optional": true } ], "extra": { }, - "labels": [] }, + "labels": + [ "changed" ] }, { "name": "WixDataQueryOptions", "locations": - [ { "lineno": 32, + [ { "lineno": 29, "filename": "data-api.js" } ], "docs": { "summary": "An object that you pass as the `options` parameter that modifies how an operation is performed.", @@ -3229,10 +3227,15 @@ { "name": "appOptions", "type": "wix-data.WixStoresProductQuery", "doc": "Optional filters specific to querying [Wix Stores Products Collection Fields](https://support.wix.com/en/article/velo-wix-stores-products-collection-fields).", + "optional": true }, + { "name": "language", + "type": "string", + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language. **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\nIf not provided, result text is not translated.", "optional": true } ], "extra": { }, - "labels": [] }, + "labels": + [ "changed" ] }, { "name": "WixDataQueryReferencedOptions", "locations": [ { "lineno": 628, diff --git a/wix-data/wix-data/WixDataAggregate.service.json b/wix-data/wix-data/WixDataAggregate.service.json index 1074ce7c45..0c29cf84da 100644 --- a/wix-data/wix-data/WixDataAggregate.service.json +++ b/wix-data/wix-data/WixDataAggregate.service.json @@ -55,7 +55,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 385, + [ { "lineno": 388, "filename": "aggregate.js" } ], "docs": { "summary": "Adds a sort to an aggregation, sorting by the items or groups by the specified properties in ascending order.", @@ -162,7 +162,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 294, + [ { "lineno": 297, "filename": "aggregate.js" } ], "docs": { "summary": "Refines a `WixDataAggregate` to only contain the average value from each aggregation group.", @@ -329,7 +329,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 360, + [ { "lineno": 363, "filename": "aggregate.js" } ], "docs": { "summary": "Refines a `WixDataAggregate` to contain the item count of each group in the aggregation.", @@ -435,7 +435,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 417, + [ { "lineno": 420, "filename": "aggregate.js" } ], "docs": { "summary": "Adds a sort to an aggregation, sorting by the items or groups by the specified properties in descending order.", @@ -542,7 +542,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 56, + [ { "lineno": 59, "filename": "aggregate.js" } ], "docs": { "summary": "Filters out items from being used in an aggregation.", @@ -645,7 +645,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 81, + [ { "lineno": 84, "filename": "aggregate.js" } ], "docs": { "summary": "Groups items together in an aggregation.", @@ -664,7 +664,7 @@ "", " To filter grouped results, use the [`having()`](#having) function.", " > **Notes:** ", - " > + Aggregations can only be used on collections you have created. They cannot be used on [Wix App Collections](https://support.wix.com/en/article/working-with-wix-app-collections).", + " > + Aggregations can only be used on collections you have created. They cannot be used on [Wix App Collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code).", " > + You can only call the `group()` function once per aggregate query." ], "links": [], "examples": @@ -825,7 +825,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 114, + [ { "lineno": 117, "filename": "aggregate.js" } ], "docs": { "summary": "Filters out groups from being returned from an aggregation.", @@ -946,7 +946,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 164, + [ { "lineno": 167, "filename": "aggregate.js" } ], "docs": { "summary": "Limits the number of items or groups the aggregation returns.", @@ -1066,7 +1066,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 208, + [ { "lineno": 211, "filename": "aggregate.js" } ], "docs": { "summary": "Refines a `WixDataAggregate` to only contain the maximum value from each aggregation group.", @@ -1260,7 +1260,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 251, + [ { "lineno": 254, "filename": "aggregate.js" } ], "docs": { "summary": "Refines a `WixDataAggregate` to only contain the minimum value from each aggregation group.", @@ -1454,7 +1454,7 @@ [ "wix-data.WixDataAggregateResult" ] }, "doc": "Fulfilled - A Promise that resolves to the results of the aggregation.\nRejected - Error that caused the aggregation to fail." }, "locations": - [ { "lineno": 188, + [ { "lineno": 191, "filename": "aggregate.js" } ], "docs": { "summary": "Runs the aggregation and returns the results.", @@ -1531,7 +1531,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 139, + [ { "lineno": 142, "filename": "aggregate.js" } ], "docs": { "summary": "Sets the number of items or groups to skip before returning aggregation results.", @@ -1652,7 +1652,7 @@ { "type": "wix-data.WixDataAggregate", "doc": "A `WixDataAggregate` object representing the refined aggregation." }, "locations": - [ { "lineno": 327, + [ { "lineno": 330, "filename": "aggregate.js" } ], "docs": { "summary": "Refines a `WixDataAggregate` to contain the sum from each aggregation group.", @@ -1848,9 +1848,14 @@ { "name": "consistentRead", "type": "boolean", "doc": "When `true`, reads data from the primary database instance. \nThis decreases performance but ensures data retrieved is up to date even immediately after an update. \nSee [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.\n\nDefault: `false`", + "optional": true }, + { "name": "language", + "type": "string", + "doc": "Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf provided, the result text is returned in the specified language. **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\nIf not provided, result text is not translated.", "optional": true } ], "extra": { }, - "labels": [] } ], + "labels": + [ "changed" ] } ], "extra": { } } \ No newline at end of file diff --git a/wix-data/wix-data/WixDataAggregateResult.service.json b/wix-data/wix-data/WixDataAggregateResult.service.json index 725ff54e85..08c6f4a5c0 100644 --- a/wix-data/wix-data/WixDataAggregateResult.service.json +++ b/wix-data/wix-data/WixDataAggregateResult.service.json @@ -3,7 +3,7 @@ "mixes": [], "labels": [], "location": - { "lineno": 449, + { "lineno": 452, "filename": "aggregate.js" }, "docs": { "summary": "The results of an aggregation, containing the aggregated values.", @@ -25,7 +25,7 @@ "typeParams": [ "Object" ] }, "locations": - [ { "lineno": 458, + [ { "lineno": 461, "filename": "aggregate.js" } ], "docs": { "summary": "Gets the aggregated values.", @@ -78,7 +78,7 @@ "set": false, "type": "number", "locations": - [ { "lineno": 491, + [ { "lineno": 494, "filename": "aggregate.js" } ], "docs": { "summary": "Returns the number of values in the aggregate results.", @@ -115,7 +115,7 @@ { "type": "boolean", "doc": "`true` if there are more results." }, "locations": - [ { "lineno": 478, + [ { "lineno": 481, "filename": "aggregate.js" } ], "docs": { "summary": "Indicates if the aggregation has more results.", @@ -178,7 +178,7 @@ [ "wix-data.WixDataAggregateResult" ] }, "doc": "Fulfilled - An aggregate object with the next page of aggregate results.\nRejected - The errors that caused the rejection." }, "locations": - [ { "lineno": 503, + [ { "lineno": 506, "filename": "aggregate.js" } ], "docs": { "summary": "Retrieves the next page of aggregate results.", diff --git a/wix-ecom-backend/metadata.json b/wix-ecom-backend/metadata.json index 27db46441b..fadc4d3e30 100644 --- a/wix-ecom-backend/metadata.json +++ b/wix-ecom-backend/metadata.json @@ -1,6 +1,6 @@ { "name": "@wix/wix-ecom-backend", - "fingerprint": "ec689da06c033e0dab2ea945c44a738feaac5401189a2bc25aea0d2a", + "fingerprint": "30b279fd139dc8a04ca18e95bd6c672725ff21ba7e850514cddaa146", "groupId": "com.wixpress.velo-autogen", "artifactId": "wix-ecom-backend-velo-autogen", "module": "wix-ecom-backend" diff --git a/wix-ecom-backend/wix-ecom-backend.service.json b/wix-ecom-backend/wix-ecom-backend.service.json index 80414a218c..d712923871 100644 --- a/wix-ecom-backend/wix-ecom-backend.service.json +++ b/wix-ecom-backend/wix-ecom-backend.service.json @@ -188,10 +188,10 @@ "hidden": true }, { - "name": "invoices", + "name": "orderFulfillments", "type": [ { - "referenceType": "wix-ecom-backend.Invoices" + "referenceType": "wix-ecom-backend.OrderFulfillments" } ], "docs": { @@ -203,10 +203,10 @@ "hidden": true }, { - "name": "orderFulfillments", + "name": "orderInvoices", "type": [ { - "referenceType": "wix-ecom-backend.OrderFulfillments" + "referenceType": "wix-ecom-backend.OrderInvoices" } ], "docs": { diff --git a/wix-ecom-backend/wix-ecom-backend/AbandonedCheckouts.service.json b/wix-ecom-backend/wix-ecom-backend/AbandonedCheckouts.service.json index 5440731362..1e13201f93 100644 --- a/wix-ecom-backend/wix-ecom-backend/AbandonedCheckouts.service.json +++ b/wix-ecom-backend/wix-ecom-backend/AbandonedCheckouts.service.json @@ -442,113 +442,69 @@ } }, { - "name": "Aggregation", + "name": "BuyerInfo", "members": [ { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.DateHistogramAggregation" - } - ], - "doc": "" - }, - { - "name": "fieldPath", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" - }, - { - "name": "groupBy", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.GroupByAggregation" - } - ], - "doc": "" + "doc": "Wix customer ID" }, { - "name": "name", + "name": "email", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" - }, - { - "name": "nested", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.NestedAggregation" - } - ], - "doc": "" + "doc": "Customer's email address" }, { - "name": "range", + "name": "firstName", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeAggregation" + "nativeType": "string" } ], - "doc": "" + "doc": "Customer's first name" }, { - "name": "scalar", + "name": "identityType", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ScalarAggregation" + "nativeType": "string" } ], - "doc": "" + "doc": "Customer information" }, { - "name": "type", + "name": "lastName", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'NESTED'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" + "doc": "Customer's last name" }, { - "name": "value", + "name": "phone", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueAggregation" + "nativeType": "string" } ], - "doc": "" + "doc": "Customer's phone number" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfAggregationKindOneOf", - "members": [ - "dateHistogram", - "nested", - "range", - "scalar", - "value" - ] - } - ] - }, "docs": { "description": [ "" @@ -556,26 +512,8 @@ } }, { - "name": "AggregationData", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.AggregationResults" - } - ] - } - } - ], - "doc": "key = aggregation name (as derived from search request)" - } - ], + "name": "Cancel", + "members": [], "docs": { "description": [ "" @@ -583,174 +521,144 @@ } }, { - "name": "AggregationKindOneOf", + "name": "CartAbandonedEvent", "members": [ { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.DateHistogramAggregation" - } - ], - "doc": "" - }, - { - "name": "nested", + "name": "abandonTime", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.NestedAggregation" + "nativeType": "Date" } ], - "doc": "" + "doc": "Time the cart was abandoned" }, { - "name": "range", + "name": "buyerInfo", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeAggregation" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.BuyerInfo" } ], - "doc": "" + "doc": "Buyer information" }, { - "name": "scalar", + "name": "cartId", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ScalarAggregation" + "nativeType": "string" } ], "doc": "" }, { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueAggregation" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "AggregationResults", - "members": [ - { - "name": "dateHistogram", + "name": "checkoutUrl", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.DateHistogramResults" + "nativeType": "string" } ], - "doc": "" + "doc": "Checkout URL - checkout with the abandoned cart details" }, { - "name": "fieldPath", + "name": "couponId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Coupon ID (if relevant)" }, { - "name": "groupedByValue", + "name": "creationTime", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.GroupByValueResults" + "nativeType": "Date" } ], - "doc": "" + "doc": "Time the cart was created" }, { - "name": "name", + "name": "itemsCount", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "" + "doc": "Amount of items in cart" }, { - "name": "nested", + "name": "totals", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.NestedResults" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.Totals" } ], - "doc": "" - }, + "doc": "Subtotal of all line items in cart, not before shipping and taxes" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CartRecoveredEvent", + "members": [ { - "name": "ranges", + "name": "abandonedTime", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeResults" + "nativeType": "Date" } ], - "doc": "" + "doc": "Time the cart was abandoned" }, { - "name": "scalar", + "name": "cartId", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.AggregationResultsScalarResult" + "nativeType": "string" } ], "doc": "" }, { - "name": "type", + "name": "creationTime", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'NESTED'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" + "doc": "Time the cart was created" }, { - "name": "values", + "name": "recoveredTime", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueResults" + "nativeType": "Date" } ], - "doc": "" + "doc": "Time the cart was recovered" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfAggregationResultsResultOneOf", - "members": [ - "dateHistogram", - "groupedByValue", - "nested", - "ranges", - "scalar", - "values" - ] - } - ] - }, "docs": { "description": [ "" @@ -758,67 +666,57 @@ } }, { - "name": "AggregationResultsResultOneOf", + "name": "CommonCursorPaging", "members": [ { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.DateHistogramResults" - } - ], - "doc": "" - }, - { - "name": "groupedByValue", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.GroupByValueResults" - } - ], - "doc": "" - }, - { - "name": "nested", + "name": "cursor", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.NestedResults" + "nativeType": "string" } ], - "doc": "" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { - "name": "ranges", + "name": "limit", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeResults" + "nativeType": "number" } ], - "doc": "" - }, + "doc": "Maximum number of items to return in the results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursors", + "members": [ { - "name": "scalar", + "name": "next", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.AggregationResultsScalarResult" + "nativeType": "string" } ], - "doc": "" + "doc": "Cursor string pointing to the next page in the list of results." }, { - "name": "values", + "name": "prev", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueResults" + "nativeType": "string" } ], - "doc": "" + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -828,27 +726,27 @@ } }, { - "name": "AggregationResultsScalarResult", + "name": "CommonPaging", "members": [ { - "name": "type", + "name": "limit", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Supported values:\n- `'AVG'`\n- `'COUNT_DISTINCT'`\n- `'MAX'`\n- `'MIN'`\n- `'SUM'`\n- `'UNKNOWN_SCALAR_TYPE'`" + "doc": "Number of items to load." }, { - "name": "value", + "name": "offset", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "" + "doc": "Number of items to skip in the current sort order." } ], "docs": { @@ -858,861 +756,57 @@ } }, { - "name": "BuyerInfo", + "name": "CommonPagingMetadataV2", "members": [ { - "name": "_id", + "name": "count", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Wix customer ID" + "doc": "Number of items returned in the response." }, { - "name": "email", + "name": "cursors", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.CommonCursors" } ], - "doc": "Customer's email address" + "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." }, { - "name": "firstName", + "name": "offset", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Customer's first name" + "doc": "Offset that was requested." }, { - "name": "identityType", + "name": "tooManyToCount", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Customer information" + "doc": "Flag that indicates the server failed to calculate the `total` field." }, { - "name": "lastName", + "name": "total", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Customer's last name" - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's phone number" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Cancel", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CartAbandonedEvent", - "members": [ - { - "name": "abandonTime", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Time the cart was abandoned" - }, - { - "name": "buyerInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.BuyerInfo" - } - ], - "doc": "Buyer information" - }, - { - "name": "cartId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "checkoutUrl", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Checkout URL - checkout with the abandoned cart details" - }, - { - "name": "couponId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon ID (if relevant)" - }, - { - "name": "creationTime", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Time the cart was created" - }, - { - "name": "itemsCount", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Amount of items in cart" - }, - { - "name": "totals", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.Totals" - } - ], - "doc": "Subtotal of all line items in cart, not before shipping and taxes" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CartRecoveredEvent", - "members": [ - { - "name": "abandonedTime", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Time the cart was abandoned" - }, - { - "name": "cartId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "creationTime", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Time the cart was created" - }, - { - "name": "recoveredTime", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Time the cart was recovered" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Complete", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CursorPaging", - "members": [ - { - "name": "cursor", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" - }, - { - "name": "limit", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Number of items to load." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CursorPagingMetadata", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Number of items returned in the response." - }, - { - "name": "cursors", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.Cursors" - } - ], - "doc": "Offset that was requested." - }, - { - "name": "hasNext", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CursorSearch", - "members": [ - { - "name": "aggregations", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.Aggregation" - } - ] - } - } - ], - "doc": "Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition." - }, - { - "name": "cursorPaging", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.CursorPaging" - } - ], - "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" - }, - { - "name": "filter", - "optional": true, - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)" - }, - { - "name": "search", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.SearchDetails" - } - ], - "doc": "free text to match in searchable fields" - }, - { - "name": "sort", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.Sorting" - } - ] - } - } - ], - "doc": "Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCursorSearchPagingMethodOneOf", - "members": [ - "cursorPaging" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CursorSearchPagingMethodOneOf", - "members": [ - { - "name": "cursorPaging", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.CursorPaging" - } - ], - "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Cursors", - "members": [ - { - "name": "next", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Cursor pointing to next page in the list of results." - }, - { - "name": "prev", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Cursor pointing to previous page in the list of results." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DateHistogramAggregation", - "members": [ - { - "name": "interval", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'DAY'`\n- `'HOUR'`\n- `'MINUTE'`\n- `'MONTH'`\n- `'SECOND'`\n- `'UNKNOWN_INTERVAL'`\n- `'WEEK'`\n- `'YEAR'`" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DateHistogramResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DateHistogramResults", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.DateHistogramResult" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DomainEvent", - "members": [ - { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." - }, - { - "name": "actionEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ActionEvent" - } - ], - "doc": "" - }, - { - "name": "createdEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityCreatedEvent" - } - ], - "doc": "" - }, - { - "name": "deletedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityDeletedEvent" - } - ], - "doc": "" - }, - { - "name": "entityEventSequence", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." - }, - { - "name": "entityFqdn", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" - }, - { - "name": "entityId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of the entity associated with the event." - }, - { - "name": "eventTime", - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Event timestamp." - }, - { - "name": "originatedFrom", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "If present, indicates the action that triggered the event." - }, - { - "name": "slug", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" - }, - { - "name": "triggeredByAnonymizeRequest", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." - }, - { - "name": "updatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityUpdatedEvent" - } - ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfDomainEventBodyOneOf", - "members": [ - "actionEvent", - "createdEvent", - "deletedEvent", - "updatedEvent" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DomainEventBodyOneOf", - "members": [ - { - "name": "actionEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ActionEvent" - } - ], - "doc": "" - }, - { - "name": "createdEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityCreatedEvent" - } - ], - "doc": "" - }, - { - "name": "deletedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityDeletedEvent" - } - ], - "doc": "" - }, - { - "name": "updatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityUpdatedEvent" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Empty", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "EntityCreatedEvent", - "members": [ - { - "name": "entityAsJson", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "EntityDeletedEvent", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "EntityUpdatedEvent", - "members": [ - { - "name": "currentEntityAsJson", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "FullAddressContactDetails", - "members": [ - { - "name": "company", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Company name.\nMax length: `50`" - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "First name.\nMax length: `100`" - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Last name.\nMax length: `100`" - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Phone number." - }, - { - "name": "vatId", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.VatId" - } - ], - "doc": "Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed." - } - ], - "docs": { - "description": [ - "Full contact details for an address" - ] - } - }, - { - "name": "GetAbandonedCheckoutRequest", - "members": [ - { - "name": "abandonedCheckoutId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Abandoned checkout ID." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetAbandonedCheckoutResponse", - "members": [ - { - "name": "abandonedCheckout", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.AbandonedCheckout" - } - ], - "doc": "The requested abandoned checkout." + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." } ], "docs": { @@ -1722,96 +816,38 @@ } }, { - "name": "GroupByAggregation", + "name": "CommonSorting", "members": [ { - "name": "fieldPath", + "name": "fieldName", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Name of the field to sort by." }, { - "name": "name", + "name": "order", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueAggregation" - } - ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfGroupByAggregationKindOneOf", - "members": [ - "value" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GroupByAggregationKindOneOf", - "members": [ - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueAggregation" - } - ], - "doc": "" + "doc": "Sort order." } ], "docs": { "description": [ "" - ] - } - }, - { - "name": "GroupByValueResults", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.NestedValueAggregationResult" - } - ] - } - } - ], - "doc": "" - } - ], + ] + } + }, + { + "name": "Complete", + "members": [], "docs": { "description": [ "" @@ -1819,27 +855,27 @@ } }, { - "name": "HeadersEntry", + "name": "CursorPaging", "members": [ { - "name": "key", + "name": "cursor", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { - "name": "value", + "name": "limit", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "" + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -1849,17 +885,27 @@ } }, { - "name": "IncludeMissingValuesOptions", + "name": "Cursors", "members": [ { - "name": "addToBucket", + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor string pointing to the next page in the list of results." + }, + { + "name": "prev", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "can specify custom bucket name. Defaults are [string -> \"N/A\"], [int -> \"0\"], [bool -> \"false\"] ..." + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -1869,154 +915,124 @@ } }, { - "name": "MultiCurrencyPrice", + "name": "DomainEvent", "members": [ { - "name": "amount", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Amount." + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { - "name": "convertedAmount", - "readOnly": true, + "name": "actionEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.ActionEvent" } ], - "doc": "Converted amount." + "doc": "" }, { - "name": "formattedAmount", - "readOnly": true, + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityCreatedEvent" } ], - "doc": "Amount formatted with currency symbol." + "doc": "" }, { - "name": "formattedConvertedAmount", - "readOnly": true, + "name": "deletedEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityDeletedEvent" } ], - "doc": "Converted amount formatted with currency symbol." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "NestedAggregation", - "members": [ + "doc": "" + }, { - "name": "nestedAggregations", + "name": "entityEventSequence", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.NestedAggregationItem" - } - ] - } + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one" - ] - } - }, - { - "name": "NestedAggregationItem", - "members": [ + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, { - "name": "dateHistogram", + "name": "entityFqdn", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.DateHistogramAggregation" + "nativeType": "string" } ], - "doc": "" + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" }, { - "name": "fieldPath", + "name": "entityId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "ID of the entity associated with the event." }, { - "name": "name", + "name": "eventTime", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "" + "doc": "Event timestamp." }, { - "name": "range", + "name": "originatedFrom", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeAggregation" + "nativeType": "string" } ], - "doc": "" + "doc": "If present, indicates the action that triggered the event." }, { - "name": "scalar", + "name": "slug", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ScalarAggregation" + "nativeType": "string" } ], - "doc": "" + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" }, { - "name": "type", + "name": "triggeredByAnonymizeRequest", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { - "name": "value", + "name": "updatedEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueAggregation" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityUpdatedEvent" } ], "doc": "" @@ -2025,12 +1041,12 @@ "extra": { "oneOfGroups": [ { - "name": "oneOfNestedAggregationItemKindOneOf", + "name": "oneOfDomainEventBodyOneOf", "members": [ - "dateHistogram", - "range", - "scalar", - "value" + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" ] } ] @@ -2042,44 +1058,44 @@ } }, { - "name": "NestedAggregationItemKindOneOf", + "name": "DomainEventBodyOneOf", "members": [ { - "name": "dateHistogram", + "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.DateHistogramAggregation" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.ActionEvent" } ], "doc": "" }, { - "name": "range", + "name": "createdEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeAggregation" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityCreatedEvent" } ], "doc": "" }, { - "name": "scalar", + "name": "deletedEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ScalarAggregation" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityDeletedEvent" } ], "doc": "" }, { - "name": "value", + "name": "updatedEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueAggregation" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.EntityUpdatedEvent" } ], "doc": "" @@ -2092,10 +1108,19 @@ } }, { - "name": "NestedAggregationResults", + "name": "Empty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", "members": [ { - "name": "fieldPath", + "name": "entityAsJson", "optional": true, "type": [ { @@ -2103,70 +1128,48 @@ } ], "doc": "" - }, + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ { - "name": "name", + "name": "deletedEntityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" - }, - { - "name": "ranges", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeResults" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.AggregationResultsScalarResult" - } - ], - "doc": "" - }, + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ { - "name": "type", + "name": "currentEntityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'NESTED'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" - }, - { - "name": "values", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueResults" - } - ], - "doc": "" + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfNestedAggregationResultsResultOneOf", - "members": [ - "ranges", - "scalar", - "values" - ] - } - ] - }, "docs": { "description": [ "" @@ -2174,102 +1177,78 @@ } }, { - "name": "NestedAggregationResultsResultOneOf", + "name": "FullAddressContactDetails", "members": [ { - "name": "ranges", + "name": "company", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeResults" + "nativeType": "string" } ], - "doc": "" + "doc": "Company name.\nMax length: `50`" }, { - "name": "scalar", + "name": "firstName", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.AggregationResultsScalarResult" + "nativeType": "string" } ], - "doc": "" + "doc": "First name.\nMax length: `100`" }, { - "name": "values", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueResults" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "NestedResultValue", - "members": [ - { - "name": "dateHistogram", + "name": "lastName", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueResult" + "nativeType": "string" } ], - "doc": "" + "doc": "Last name.\nMax length: `100`" }, { - "name": "range", + "name": "phone", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeResult" + "nativeType": "string" } ], - "doc": "" + "doc": "Phone number." }, { - "name": "scalar", + "name": "vatId", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ScalarResult" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.VatId" } ], - "doc": "" - }, + "doc": "Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed." + } + ], + "docs": { + "description": [ + "Full contact details for an address" + ] + } + }, + { + "name": "GetAbandonedCheckoutRequest", + "members": [ { - "name": "value", - "optional": true, + "name": "abandonedCheckoutId", "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueResult" + "nativeType": "string" } ], - "doc": "" + "doc": "Abandoned checkout ID." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfNestedResultValueResultOneOf", - "members": [ - "dateHistogram", - "range", - "scalar", - "value" - ] - } - ] - }, "docs": { "description": [ "" @@ -2277,34 +1256,34 @@ } }, { - "name": "NestedResultValueResultOneOf", + "name": "GetAbandonedCheckoutResponse", "members": [ { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueResult" - } - ], - "doc": "" - }, - { - "name": "range", + "name": "abandonedCheckout", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeResult" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.AbandonedCheckout" } ], - "doc": "" - }, + "doc": "The requested abandoned checkout." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "HeadersEntry", + "members": [ { - "name": "scalar", + "name": "key", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ScalarResult" + "nativeType": "string" } ], "doc": "" @@ -2314,7 +1293,7 @@ "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueResult" + "nativeType": "string" } ], "doc": "" @@ -2327,54 +1306,50 @@ } }, { - "name": "NestedResults", + "name": "MultiCurrencyPrice", "members": [ { - "name": "results", + "name": "amount", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.Results" - } - ] - } + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "results of `NESTED` aggregation type in a flattened form\naggregations in resulting array are keyed by requested aggregation `name`." - ] - } - }, - { - "name": "NestedValueAggregationResult", - "members": [ + "doc": "Amount." + }, { - "name": "nestedResults", + "name": "convertedAmount", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.NestedAggregationResults" + "nativeType": "string" } ], - "doc": "" + "doc": "Converted amount." }, { - "name": "value", + "name": "formattedAmount", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Amount formatted with currency symbol." + }, + { + "name": "formattedConvertedAmount", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Converted amount formatted with currency symbol." } ], "docs": { @@ -2678,170 +1653,6 @@ ] } }, - { - "name": "RangeAggregation", - "members": [ - { - "name": "buckets", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeBucket" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RangeAggregationResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "from", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "to", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RangeBucket", - "members": [ - { - "name": "from", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Inclusive lower bound of the range. Required if to is not given." - }, - { - "name": "to", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Exclusive upper bound of the range. Required if from is not given." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RangeResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "from", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "to", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RangeResults", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.RangeAggregationResult" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "RawHttpResponse", "members": [ @@ -2962,38 +1773,8 @@ "name": "payload", "optional": true, "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Results", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.NestedResultValue" - } - ] - } + { + "nativeType": "string" } ], "doc": "" @@ -3006,39 +1787,77 @@ } }, { - "name": "ScalarAggregation", + "name": "Search", "members": [ { - "name": "type", + "name": "cursorPaging", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.CommonCursorPaging" } ], - "doc": "Supported values:\n- `'AVG'`\n- `'COUNT_DISTINCT'`\n- `'MAX'`\n- `'MIN'`\n- `'SUM'`\n- `'UNKNOWN_SCALAR_TYPE'`" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ScalarResult", - "members": [ + "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + }, { - "name": "value", + "name": "filter", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Object" } ], - "doc": "" + "doc": "A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.AbandonedCheckouts.CommonPaging" + } + ], + "doc": "Pointer to page of results using offset. Can not be used together with 'cursor_paging'" + }, + { + "name": "search", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.AbandonedCheckouts.SearchDetails" + } + ], + "doc": "free text to match in searchable fields" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.AbandonedCheckouts.CommonSorting" + } + ] + } + } + ], + "doc": "Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSearchPagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, "docs": { "description": [ "" @@ -3053,7 +1872,7 @@ "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.CursorSearch" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.Search" } ], "doc": "WQL query expression." @@ -3073,7 +1892,7 @@ "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.CursorSearch" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.Search" } ], "doc": "WQL query expression." @@ -3105,22 +1924,12 @@ ], "doc": "List of abandoned checkouts." }, - { - "name": "aggregationData", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.AggregationData" - } - ], - "doc": "Aggregation data." - }, { "name": "pagingMetadata", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.CursorPagingMetadata" + "referenceType": "wix-ecom-backend.AbandonedCheckouts.CommonPagingMetadataV2" } ], "doc": "Paging metadata. Contains cursor which can be used in next query." @@ -3189,6 +1998,36 @@ ] } }, + { + "name": "SearchPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.AbandonedCheckouts.CommonCursorPaging" + } + ], + "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.AbandonedCheckouts.CommonPaging" + } + ], + "doc": "Pointer to page of results using offset. Can not be used together with 'cursor_paging'" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Sorting", "members": [ @@ -3544,183 +2383,6 @@ ] } }, - { - "name": "ValueAggregation", - "members": [ - { - "name": "includeOptions", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.IncludeMissingValuesOptions" - } - ], - "doc": "options for including missing values" - }, - { - "name": "limit", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "How many aggregations would you like to return? Can be between 1 and 250. 10 is the default." - }, - { - "name": "missingValues", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "should missing values be included or excluded from the aggregation results. Default is EXCLUDE" - }, - { - "name": "sortDirection", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'ASC'`\n- `'DESC'`" - }, - { - "name": "sortType", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'COUNT'`\n- `'VALUE'`" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfValueAggregationOptionsOneOf", - "members": [ - "includeOptions" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ValueAggregationOptionsOneOf", - "members": [ - { - "name": "includeOptions", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.IncludeMissingValuesOptions" - } - ], - "doc": "options for including missing values" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ValueAggregationResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ValueResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ValueResults", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.AbandonedCheckouts.ValueAggregationResult" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "VatId", "members": [ diff --git a/wix-ecom-backend/wix-ecom-backend/BackInStockNotifications.service.json b/wix-ecom-backend/wix-ecom-backend/BackInStockNotifications.service.json index 85465ad036..b94062b349 100644 --- a/wix-ecom-backend/wix-ecom-backend/BackInStockNotifications.service.json +++ b/wix-ecom-backend/wix-ecom-backend/BackInStockNotifications.service.json @@ -388,12 +388,12 @@ "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", - "|`_id`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`startsWith()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#startsWith),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", - "|`contactId`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`startsWith()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#startsWith),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", - "|`status`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", - "|`autoNotified`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", - "|`_createdDate`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`gt()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#gt),[`ge()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ge),[`lt()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#lt),[`le()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#le),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", - "|`itemUrl`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`startsWith()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#startsWith),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|" + "|`_id`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`hasSome()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#hasSome),[`startsWith()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#startsWith),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", + "|`contactId`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`hasSome()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#hasSome),[`startsWith()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#startsWith),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", + "|`status`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`hasSome()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#hasSome),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", + "|`autoNotified`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`hasSome()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#hasSome),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", + "|`_createdDate`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`hasSome()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#hasSome),[`lt()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#lt),[`le()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#le),[`gt()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#gt),[`ge()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ge),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|", + "|`itemUrl`|[`eq()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#eq),[`ne()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ne),[`exists()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#exists),[`in()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#in),[`hasSome()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#hasSome),[`startsWith()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#startsWith),[`ascending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#ascending),[`descending()`](wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder#descending)|" ], "examples": [ { @@ -725,7 +725,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -735,7 +735,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -745,12 +745,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -813,7 +813,7 @@ "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { "name": "limit", @@ -823,7 +823,7 @@ "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -843,7 +843,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." }, { "name": "prev", @@ -853,7 +853,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -1114,7 +1114,18 @@ }, { "name": "EntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" diff --git a/wix-ecom-backend/wix-ecom-backend/BackInStockNotifications/RequestsQueryBuilder.service.json b/wix-ecom-backend/wix-ecom-backend/BackInStockNotifications/RequestsQueryBuilder.service.json index 81ca0ad4b9..81f1291a2d 100644 --- a/wix-ecom-backend/wix-ecom-backend/BackInStockNotifications/RequestsQueryBuilder.service.json +++ b/wix-ecom-backend/wix-ecom-backend/BackInStockNotifications/RequestsQueryBuilder.service.json @@ -624,6 +624,103 @@ ], "syntaxName": "gt" }, + { + "name": "hasSome", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `values`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "any" + } + ] + } + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-ecom-backend.BackInStockNotifications.RequestsQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items whose specified property contains any of the specified values.", + "description": [ + "The `hasSome()` function refines a `RequestsQueryBuilder` to match only items where the value of the specified `propertyName` equals any of the specified `values`.", + "Matching strings with `hasSome()` is case-sensitive, so `'text'` isn't equal to `'Text'`.", + "If the specified property is an array, `hasSome()` matches if any of that array's elements equal any of the specified values." + ], + "examples": [ + { + "title": "Add a `hasSome` filter to a query", + "body": [ + "const query =", + " backInStockNotifications.queryBackInStockNotificationRequests.hasSome(", + " 'labelIds',", + " ['red', 'blue', 'purple']", + " );", + "" + ] + }, + { + "title": "Create a query, add a `hasSome` filter, and run it", + "body": [ + "import { backInStockNotifications } from 'wix-ecom-backend';", + "", + "export async function myQueryFunction() {", + " const results = await backInStockNotifications", + " .queryBackInStockNotificationRequests()", + " .hasSome('labelIds', ['red', 'blue', 'purple'])", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "hasSome" + }, { "name": "in", "params": [ diff --git a/wix-ecom-backend/wix-ecom-backend/Cart.service.json b/wix-ecom-backend/wix-ecom-backend/Cart.service.json index 8c3735b14f..0053676499 100644 --- a/wix-ecom-backend/wix-ecom-backend/Cart.service.json +++ b/wix-ecom-backend/wix-ecom-backend/Cart.service.json @@ -92,7 +92,7 @@ " \"lineItems\": [{", " \"catalogReference\": {", " // Wix Stores appId", - " \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " // Wix Stores productId", " \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\"", " },", @@ -124,7 +124,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -282,7 +282,7 @@ " lineItems: [{", " catalogReference: {", " // appId for Wix Stores Catalog", - " appId: \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " appId: \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " // example of Wix Stores productId", " catalogItemId: \"c8539b66-7a44-fe18-affc-afec4be8562a\"", " },", @@ -313,7 +313,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -732,7 +732,7 @@ " * \"quantity\": 5,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1140,7 +1140,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1319,7 +1319,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1659,7 +1659,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1870,7 +1870,7 @@ " * \"quantity\": 2,", " * \"catalogReference\": {", " * \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"e62fee23-7878-437a-bf0e-292f17d11cb5\"", " * }", @@ -1947,7 +1947,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"1a2d7e83-4bef-31d5-09e1-3326ee271c09\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"132b84e8-aab8-47a1-a1f6-2c47557b64a4\"", " * }", @@ -2502,7 +2502,7 @@ "doc": "The sum of all the tax from line items that calculated by the tax identifiers." }, { - "name": "jurisdictionName", + "name": "jurisdiction", "optional": true, "type": [ { @@ -2539,7 +2539,7 @@ "nativeType": "string" } ], - "doc": "The rate at which this tax detail was calculated, a number between 0.0 to 1.0." + "doc": "The rate at which this tax detail was calculated." }, { "name": "taxType", @@ -2598,76 +2598,6 @@ ] } }, - { - "name": "AppliedCoupon", - "members": [ - { - "name": "code", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon code" - }, - { - "name": "convertedDiscountValue", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Converted discount value" - }, - { - "name": "couponId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon internal ID" - }, - { - "name": "couponType", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Type (e.g., moneyOff, percentOff)" - }, - { - "name": "discountValue", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Discount value" - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon name" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "AppliedDiscount", "members": [ @@ -2817,56 +2747,6 @@ ] } }, - { - "name": "BuyerDetails", - "members": [ - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Email address" - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's first name" - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's last name" - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Phone number" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "BuyerInfo", "members": [ @@ -3473,147 +3353,6 @@ ] } }, - { - "name": "CartAddress", - "members": [ - { - "name": "address", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.CommonAddress" - } - ], - "doc": "Address" - }, - { - "name": "contactDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.CommonFullAddressContactDetails" - } - ], - "doc": "Contact details" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CartCompletedEvent", - "members": [ - { - "name": "appliedCoupon", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.AppliedCoupon" - } - ], - "doc": "Coupon applied to this cart" - }, - { - "name": "billingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.CartAddress" - } - ], - "doc": "Customer's billing address" - }, - { - "name": "buyerInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.V1BuyerInfo" - } - ], - "doc": "Customer's Wix ID" - }, - { - "name": "buyerNote", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Message from the customer" - }, - { - "name": "cartId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "completedTime", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Time the cart was created" - }, - { - "name": "currency", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.Currency" - } - ], - "doc": "Currency used for pricing in this store" - }, - { - "name": "shippingInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.ShippingInfo" - } - ], - "doc": "Cart shipping information" - }, - { - "name": "totals", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.Totals" - } - ], - "doc": "Totals for order's line items" - }, - { - "name": "weightUnit", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Weight measurement unit - defaults to site's weight unit. Supported values:\n+ `\"KG\"`\n+ `\"LB\"`" - } - ], - "docs": { - "description": [ - "This webhook is triggered when a customer has completed their checkout. In most cases, an order will be created immediately and an Order Event webhook will also be triggered. In some cases, the payment provider may list the order as \"pending\" - and the order will not be created until the payment is listed as \"approved.\"" - ] - } - }, { "name": "CartDiscount", "members": [ @@ -3696,7 +3435,7 @@ "nativeType": "string" } ], - "doc": "ID of the catalog app. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -3706,7 +3445,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `serviceId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -3716,12 +3455,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value form. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -3766,261 +3505,60 @@ } }, { - "name": "CommonAddress", + "name": "Coupon", "members": [ { - "name": "addressLine", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Main address line, usually street and number as free text." + "doc": "Coupon ID." }, { - "name": "addressLine1", + "name": "code", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Main address line, usually street and number as free text." - }, + "doc": "Coupon code." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCartOptions", + "members": [ { - "name": "addressLine2", + "name": "cartInfo", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.Cart.Cart" } ], - "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." + "doc": "Cart info." }, { - "name": "city", + "name": "couponCode", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "City name." + "doc": "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)." }, { - "name": "country", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Country code." - }, - { - "name": "postalCode", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Zip/postal code." - }, - { - "name": "streetAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.StreetAddress" - } - ], - "doc": "Street name and number." - }, - { - "name": "subdivision", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCommonAddressStreetOneOf", - "members": [ - "addressLine", - "streetAddress" - ] - } - ] - }, - "docs": { - "description": [ - "Physical address" - ] - } - }, - { - "name": "CommonAddressStreetOneOf", - "members": [ - { - "name": "addressLine", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Main address line, usually street and number as free text." - }, - { - "name": "streetAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.StreetAddress" - } - ], - "doc": "Street name and number." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CommonFullAddressContactDetails", - "members": [ - { - "name": "company", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's company name." - }, - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Email associated with the address." - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's first name." - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's last name." - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's phone number." - }, - { - "name": "vatId", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.VatId" - } - ], - "doc": "Tax info. Currently usable only in Brazil." - } - ], - "docs": { - "description": [ - "Full contact details for an address" - ] - } - }, - { - "name": "Coupon", - "members": [ - { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon ID." - }, - { - "name": "code", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon code." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateCartOptions", - "members": [ - { - "name": "cartInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.Cart" - } - ], - "doc": "Cart info." - }, - { - "name": "couponCode", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "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)." - }, - { - "name": "lineItems", + "name": "lineItems", "optional": true, "type": [ { @@ -4354,47 +3892,37 @@ } }, { - "name": "Currency", + "name": "CustomLineItem", "members": [ { - "name": "code", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Currency code" + "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." }, { - "name": "symbol", + "name": "catalogReference", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.Cart.CatalogReference" } ], - "doc": "Currency symbol" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CustomLineItem", - "members": [ + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." + }, { - "name": "_id", + "name": "depositAmount", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." + "doc": "Optional - partial payment for the given item to be paid upfront during the checkout.\nEligible for catalog items with type `DEPOSIT_ONLINE`.\nIf omitted - item's price will not be split and is expected to be paid in single installment" }, { "name": "descriptionLines", @@ -4413,6 +3941,26 @@ ], "doc": "Custom line item description lines. Used for displaying the cart, checkout and order." }, + { + "name": "fullPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Item price **before** catalog-defined discount. Defaults to `price` when not provided." + }, + { + "name": "itemType", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.ItemType" + } + ], + "doc": "Required** - Item type. Either a preset type or custom." + }, { "name": "media", "optional": true, @@ -4433,6 +3981,16 @@ ], "doc": "Custom line item name." }, + { + "name": "paymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.\n+ `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n+ `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." + }, { "name": "physicalProperties", "optional": true, @@ -4441,7 +3999,7 @@ "referenceType": "wix-ecom-backend.Cart.PhysicalProperties" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - Physical properties of the item. When relevant, contains information such as SKU and item weight." }, { "name": "price", @@ -4463,6 +4021,16 @@ ], "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." }, + { + "name": "productName", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.ProductName" + } + ], + "doc": "*Required** - Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" + }, { "name": "quantity", "optional": true, @@ -4473,6 +4041,36 @@ ], "doc": "Custom line item quantity.\n\nMin: `1`\nMax: `100000`\n" }, + { + "name": "quantityAvailable", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Optional - Item quantity available for purchase. Only return this if inventory is managed.\nNot returning this field means that the buyer can \"infinitely\" tick up the number of items in the cart." + }, + { + "name": "rootCatalogItemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n+ For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n+ in most cases, this field is the name as `catalogReference.catalogItemId`.\n+ Used in membership validation." + }, + { + "name": "serviceProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.ServiceProperties" + } + ], + "doc": "Optional - Service properties. When relevant, this contains information such as date and number of participants.\nUsed, among other things, when checking for valid memberships." + }, { "name": "taxGroupId", "optional": true, @@ -4482,37 +4080,16 @@ } ], "doc": "Tax group ID for this custom line item." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCustomLineItemItemPropertiesOneOf", - "members": [ - "digitalFile", - "physicalProperties" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CustomLineItemItemPropertiesOneOf", - "members": [ + }, { - "name": "physicalProperties", + "name": "url", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Cart.PhysicalProperties" + "nativeType": "string" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.\nThe URL is optional and if not provided, the site URL will be used." } ], "docs": { @@ -4798,6 +4375,16 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.SystemError" + } + ], + "doc": "" + }, { "name": "tracing", "optional": true, @@ -4835,6 +4422,7 @@ "name": "oneOfDetailsKindOneOf", "members": [ "applicationError", + "systemError", "validationError" ] } @@ -4859,6 +4447,16 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.SystemError" + } + ], + "doc": "" + }, { "name": "validationError", "optional": true, @@ -5170,7 +4768,18 @@ }, { "name": "EntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -5568,7 +5177,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -6010,7 +5619,7 @@ } } ], - "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`." + "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead." }, { "name": "taxRate", @@ -6060,7 +5669,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -6101,7 +5710,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -6354,6 +5963,36 @@ ] } }, + { + "name": "LineItemDiscount", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of line item the discount applies to." + }, + { + "name": "totalDiscountAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.MultiCurrencyPrice" + } + ], + "doc": "Discount value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "LineItemPricesData", "members": [ @@ -6435,7 +6074,7 @@ "referenceType": "wix-ecom-backend.Cart.MultiCurrencyPrice" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price after discounts, and before tax." } ], "docs": { @@ -7252,7 +6891,7 @@ "nativeType": "string" } ], - "doc": "Media ID in media manager." + "doc": "Media ID in Wix Media Manager." }, { "name": "fileName", @@ -7262,7 +6901,7 @@ "nativeType": "string" } ], - "doc": "Original file name." + "doc": "Original filename." }, { "name": "fileType", @@ -7463,7 +7102,7 @@ "referenceType": "wix-ecom-backend.Cart.MultiCurrencyPrice" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price of shipping after discounts (when relevant), and before tax." } ], "docs": { @@ -7589,87 +7228,6 @@ ] } }, - { - "name": "ShippingInfo", - "members": [ - { - "name": "pickupDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.V1PickupDetails" - } - ], - "doc": "Pickup details when this object describes pickup" - }, - { - "name": "shippingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.CartAddress" - } - ], - "doc": "Shipment details when this object describes shipment" - }, - { - "name": "shippingRuleDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.ShippingRuleDetails" - } - ], - "doc": "Selected shipping rule details" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfShippingInfoDetailsOneOf", - "members": [ - "pickupDetails", - "shippingAddress" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ShippingInfoDetailsOneOf", - "members": [ - { - "name": "pickupDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.V1PickupDetails" - } - ], - "doc": "Pickup details when this object describes pickup" - }, - { - "name": "shippingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.CartAddress" - } - ], - "doc": "Shipment details when this object describes shipment" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ShippingInformation", "members": [ @@ -7835,56 +7393,6 @@ ] } }, - { - "name": "ShippingRuleDetails", - "members": [ - { - "name": "deliveryOption", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Rule title (as provided by the store owner)" - }, - { - "name": "estimatedDeliveryTime", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Shipping option delivery time" - }, - { - "name": "optionId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Selected option ID" - }, - { - "name": "ruleId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Selected shipping rule ID" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "StreetAddress", "members": [ @@ -7915,36 +7423,6 @@ ] } }, - { - "name": "Subdivision", - "members": [ - { - "name": "code", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Short subdivision code." - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Subdivision full name." - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "SubscriptionOptionInfo", "members": [ @@ -8006,17 +7484,37 @@ "nativeType": "number" } ], - "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`." - }, + "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`." + }, + { + "name": "frequency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Frequency of recurring payment." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SystemError", + "members": [ { - "name": "frequency", + "name": "errorCode", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Frequency of recurring payment." + "doc": "Error code." } ], "docs": { @@ -8126,6 +7624,96 @@ ] } }, + { + "name": "TaxBreakdown", + "members": [ + { + "name": "jurisdiction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\"." + }, + { + "name": "jurisdictionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the jurisdiction in which this tax detail applies." + }, + { + "name": "nonTaxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.MultiCurrencyPrice" + } + ], + "doc": "The amount of this line item price that was considered nontaxable. (Decimal value)" + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)" + }, + { + "name": "taxAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.MultiCurrencyPrice" + } + ], + "doc": "The amount of tax estimated for this line item. (Decimal value)" + }, + { + "name": "taxName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\nThis name should be explicit enough to allow the merchant to understand what tax was calculated." + }, + { + "name": "taxType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc." + }, + { + "name": "taxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Cart.MultiCurrencyPrice" + } + ], + "doc": "The taxable amount of this line item." + } + ], + "docs": { + "description": [ + "TaxBreakdown represents tax information for a line item.\nIt holds the tax amount and the tax rate for each tax authority that apply on the line item." + ] + } + }, { "name": "TaxCalculationDetails", "members": [ @@ -8300,7 +7888,7 @@ "nativeType": "string" } ], - "doc": "Subscription option name." + "doc": "Subscription option name in the site's default language." }, { "name": "translated", @@ -8310,87 +7898,7 @@ "nativeType": "string" } ], - "doc": "Translated subscription option name." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Totals", - "members": [ - { - "name": "discount", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total calculated discount value, according to order.discount" - }, - { - "name": "quantity", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total line items quantity" - }, - { - "name": "shipping", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total shipping price, including tax" - }, - { - "name": "subtotal", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Subtotal of all line items, before tax" - }, - { - "name": "tax", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total tax" - }, - { - "name": "total", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total price" - }, - { - "name": "weight", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total items weight" + "doc": "Subscription option name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -8843,76 +8351,6 @@ ] } }, - { - "name": "V1BuyerInfo", - "members": [ - { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer details" - }, - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's email address" - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's first name" - }, - { - "name": "identity_Type", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's relationship to the website" - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's last name" - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's phone number" - } - ], - "docs": { - "description": [ - "This might expand and add additional data" - ] - } - }, { "name": "V1Coupon", "members": [ @@ -8983,46 +8421,6 @@ ] } }, - { - "name": "V1PickupDetails", - "members": [ - { - "name": "buyerDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.BuyerDetails" - } - ], - "doc": "Customer details" - }, - { - "name": "pickupAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Cart.CommonAddress" - } - ], - "doc": "Pickup address" - }, - { - "name": "pickupInstructions", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Store owner's pickup instructions" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ValidationError", "members": [ diff --git a/wix-ecom-backend/wix-ecom-backend/Checkout.service.json b/wix-ecom-backend/wix-ecom-backend/Checkout.service.json index e34fe1d0b6..fc67cce928 100644 --- a/wix-ecom-backend/wix-ecom-backend/Checkout.service.json +++ b/wix-ecom-backend/wix-ecom-backend/Checkout.service.json @@ -94,7 +94,7 @@ " \"lineItems\": [{", " \"catalogReference\": {", " // Wix Stores appId", - " \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " // Wix Stores productId", " \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", " // Wix Stores variantId", @@ -129,7 +129,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -230,7 +230,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"e62fee23-7878-437a-bf0e-292f17d11cb5\"", " * }", @@ -587,7 +587,7 @@ " \"quantity\": 3,", " \"catalogReference\": {", " // Wix Stores appId", - " \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " // Wix Stores productId", " \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\"", " }", @@ -615,7 +615,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -876,7 +876,7 @@ " \"quantity\": 3,", " \"catalogReference\": {", " // Wix Stores appId", - " \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " // Wix Stores productId", " \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\"", " }", @@ -884,7 +884,7 @@ " {", " \"quantity\": 1,", " \"catalogReference\": {", - " \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", " \"options\": {", " \"variantId\": \"2f430d69-9b75-4874-bfbd-c5f6fa5aff3d\",", @@ -897,7 +897,7 @@ " {", " \"quantity\": 1,", " \"catalogReference\": {", - " \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " \"catalogItemId\": \"9fe8c5b2-9c94-7153-ebb9-8533695e2b6f\",", " \"options\": {", " \"Size\": \"Large\",", @@ -977,7 +977,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1078,7 +1078,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"2f430d69-9b75-4874-bfbd-c5f6fa5aff3d\",", " * \"customTextFields\": {", @@ -1208,7 +1208,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"9fe8c5b2-9c94-7153-ebb9-8533695e2b6f\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"Size\": \"Large\",", " * \"Color\": \"White\"", @@ -1687,7 +1687,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1788,7 +1788,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"2f430d69-9b75-4874-bfbd-c5f6fa5aff3d\",", " * \"customTextFields\": {", @@ -1925,7 +1925,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"9fe8c5b2-9c94-7153-ebb9-8533695e2b6f\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"Size\": \"Large\",", " * \"Color\": \"White\"", @@ -2458,7 +2458,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -2559,7 +2559,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"2f430d69-9b75-4874-bfbd-c5f6fa5aff3d\",", " * \"customTextFields\": {", @@ -2696,7 +2696,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"9fe8c5b2-9c94-7153-ebb9-8533695e2b6f\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"Size\": \"Large\",", " * \"Color\": \"White\"", @@ -3080,7 +3080,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"1a2d7e83-4bef-31d5-09e1-3326ee271c09\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"132b84e8-aab8-47a1-a1f6-2c47557b64a4\"", " * }", @@ -3574,7 +3574,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -4141,7 +4141,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -4518,7 +4518,7 @@ " * \"quantity\": 10,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -5218,7 +5218,7 @@ "doc": "The sum of all the tax from line items that calculated by the tax identifiers." }, { - "name": "jurisdictionName", + "name": "jurisdiction", "optional": true, "type": [ { @@ -5255,7 +5255,7 @@ "nativeType": "string" } ], - "doc": "The rate at which this tax detail was calculated, a number between 0.0 to 1.0." + "doc": "The rate at which this tax detail was calculated." }, { "name": "taxType", @@ -5963,7 +5963,7 @@ "nativeType": "string" } ], - "doc": "ID of the catalog app. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -5973,7 +5973,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `serviceId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -5983,12 +5983,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value form. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -6297,6 +6297,16 @@ ], "doc": "Additional settings for customization of the checkout process.\n\nCustom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).\n" }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.ExtendedFields" + } + ], + "doc": "Custom field data for the checkout object.\n\n[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.\n" + }, { "name": "giftCard", "readOnly": true, @@ -6500,7 +6510,7 @@ "nativeType": "string" } ], - "doc": "Description line color name in site's default language." + "doc": "Description line color name in the site's default language." }, { "name": "translated", @@ -6510,7 +6520,7 @@ "nativeType": "string" } ], - "doc": "Translated description line color name according to buyer language. Defaults to `original` when not provided." + "doc": "Description line color name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -7218,6 +7228,26 @@ ], "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." }, + { + "name": "catalogReference", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.CatalogReference" + } + ], + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." + }, + { + "name": "depositAmount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - partial payment for the given item to be paid upfront during the checkout.\nEligible for catalog items with type `DEPOSIT_ONLINE`.\nIf omitted - item's price will not be split and is expected to be paid in single installment" + }, { "name": "descriptionLines", "optional": true, @@ -7235,6 +7265,26 @@ ], "doc": "Custom line item description lines. Used for displaying the cart, checkout and order." }, + { + "name": "fullPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Item price **before** catalog-defined discount. Defaults to `price` when not provided." + }, + { + "name": "itemType", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.ItemType" + } + ], + "doc": "Required** - Item type. Either a preset type or custom." + }, { "name": "media", "optional": true, @@ -7255,6 +7305,16 @@ ], "doc": "Custom line item name." }, + { + "name": "paymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.\n+ `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n+ `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." + }, { "name": "physicalProperties", "optional": true, @@ -7263,7 +7323,7 @@ "referenceType": "wix-ecom-backend.Checkout.PhysicalProperties" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - Physical properties of the item. When relevant, contains information such as SKU and item weight." }, { "name": "price", @@ -7285,6 +7345,16 @@ ], "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." }, + { + "name": "productName", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.ProductName" + } + ], + "doc": "*Required** - Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" + }, { "name": "quantity", "optional": true, @@ -7295,6 +7365,36 @@ ], "doc": "Custom line item quantity.\n\nMin: `1`\nMax: `100000`\n" }, + { + "name": "quantityAvailable", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Optional - Item quantity available for purchase. Only return this if inventory is managed.\nNot returning this field means that the buyer can \"infinitely\" tick up the number of items in the cart." + }, + { + "name": "rootCatalogItemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n+ For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n+ in most cases, this field is the name as `catalogReference.catalogItemId`.\n+ Used in membership validation." + }, + { + "name": "serviceProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.ServiceProperties" + } + ], + "doc": "Optional - Service properties. When relevant, this contains information such as date and number of participants.\nUsed, among other things, when checking for valid memberships." + }, { "name": "taxGroupId", "optional": true, @@ -7304,37 +7404,16 @@ } ], "doc": "Tax group ID for this custom line item." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCustomLineItemItemPropertiesOneOf", - "members": [ - "digitalFile", - "physicalProperties" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CustomLineItemItemPropertiesOneOf", - "members": [ + }, { - "name": "physicalProperties", + "name": "url", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Checkout.PhysicalProperties" + "nativeType": "string" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.\nThe URL is optional and if not provided, the site URL will be used." } ], "docs": { @@ -7581,7 +7660,7 @@ "nativeType": "string" } ], - "doc": "Description line name in site's default language." + "doc": "Description line name in the site's default language." }, { "name": "translated", @@ -7591,7 +7670,7 @@ "nativeType": "string" } ], - "doc": "Translated description line item according to buyer language. Defaults to `original` when not provided." + "doc": "Description line name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -7643,6 +7722,16 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.SystemError" + } + ], + "doc": "" + }, { "name": "tracing", "optional": true, @@ -7680,6 +7769,7 @@ "name": "oneOfDetailsKindOneOf", "members": [ "applicationError", + "systemError", "validationError" ] } @@ -7704,6 +7794,16 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.SystemError" + } + ], + "doc": "" + }, { "name": "validationError", "optional": true, @@ -8116,7 +8216,18 @@ }, { "name": "EntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -8164,7 +8275,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -8665,7 +8776,7 @@ } } ], - "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`." + "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead." }, { "name": "taxRate", @@ -8715,7 +8826,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -8756,7 +8867,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -9023,7 +9134,7 @@ "referenceType": "wix-ecom-backend.Checkout.MultiCurrencyPrice" } ], - "doc": "__Deprecated.__ Use `totalPriceAfterTax` minus `taxDetails.totalTax` instead." + "doc": "Total price after discounts, and before tax." }, { "name": "url", @@ -9043,6 +9154,36 @@ ] } }, + { + "name": "LineItemDiscount", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of line item the discount applies to." + }, + { + "name": "totalDiscountAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.MultiCurrencyPrice" + } + ], + "doc": "Discount value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "LineItemQuantityUpdate", "members": [ @@ -9769,7 +9910,7 @@ "nativeType": "string" } ], - "doc": "Description line plain text value in site's default language." + "doc": "Description line plain text value in the site's default language." }, { "name": "translated", @@ -9779,7 +9920,7 @@ "nativeType": "string" } ], - "doc": "Translated description line plain text value according to buyer language. Defaults to `original` when not provided." + "doc": "Description line plain text value translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -9799,7 +9940,7 @@ "nativeType": "string" } ], - "doc": "Required.** Original price description in site's default language." + "doc": "__Required.__ Price description in the site's default language." }, { "name": "translated", @@ -9809,7 +9950,7 @@ "nativeType": "string" } ], - "doc": "Translated price description according to buyer language. Defaults to `original` when not provided." + "doc": "Price description translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -10019,7 +10160,7 @@ "nativeType": "string" } ], - "doc": "__Required.__ Original item name in site's default language.\nMin: 1 character\nMax: 200 characters" + "doc": "__Required.__ Item name in the site's default language.\n\nMin: 1 character.\nMax: 200 characters.\n" }, { "name": "translated", @@ -10029,7 +10170,7 @@ "nativeType": "string" } ], - "doc": "Optional. Translated item name according to buyer language. Defaults to `original` when not provided.\nMin: 1 character\nMax: 400 characters" + "doc": "Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`.\n" } ], "docs": { @@ -10271,7 +10412,7 @@ "nativeType": "string" } ], - "doc": "Media ID in media manager." + "doc": "Media ID in Wix Media Manager." }, { "name": "fileName", @@ -10281,7 +10422,7 @@ "nativeType": "string" } ], - "doc": "Original file name." + "doc": "Original filename." }, { "name": "fileType", @@ -10482,7 +10623,7 @@ "referenceType": "wix-ecom-backend.Checkout.MultiCurrencyPrice" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price of shipping after discounts (when relevant), and before tax." } ], "docs": { @@ -10576,7 +10717,7 @@ "nativeType": "number" } ], - "doc": "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." + "doc": "The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room." }, { "name": "scheduledDate", @@ -10586,7 +10727,7 @@ "nativeType": "Date" } ], - "doc": "Date and time the service is supposed to be provided in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the time of the class." + "doc": "Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\nFor example, the start time of a class." } ], "docs": { @@ -10637,6 +10778,16 @@ } ], "doc": "Whether tax is included in the price" + }, + { + "name": "taxRate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Tax rate % for shipping, as a decimal point >= 0" } ], "docs": { @@ -11274,7 +11425,7 @@ "nativeType": "number" } ], - "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`." + "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`." }, { "name": "frequency", @@ -11293,6 +11444,26 @@ ] } }, + { + "name": "SystemError", + "members": [ + { + "name": "errorCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Target", "members": [ @@ -11394,6 +11565,96 @@ ] } }, + { + "name": "TaxBreakdown", + "members": [ + { + "name": "jurisdiction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\"." + }, + { + "name": "jurisdictionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the jurisdiction in which this tax detail applies." + }, + { + "name": "nonTaxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.MultiCurrencyPrice" + } + ], + "doc": "The amount of this line item price that was considered nontaxable. (Decimal value)" + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)" + }, + { + "name": "taxAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.MultiCurrencyPrice" + } + ], + "doc": "The amount of tax estimated for this line item. (Decimal value)" + }, + { + "name": "taxName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\nThis name should be explicit enough to allow the merchant to understand what tax was calculated." + }, + { + "name": "taxType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc." + }, + { + "name": "taxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.MultiCurrencyPrice" + } + ], + "doc": "The taxable amount of this line item." + } + ], + "docs": { + "description": [ + "TaxBreakdown represents tax information for a line item.\nIt holds the tax amount and the tax rate for each tax authority that apply on the line item." + ] + } + }, { "name": "TaxCalculationDetails", "members": [ @@ -11568,7 +11829,7 @@ "nativeType": "string" } ], - "doc": "Subscription option name." + "doc": "Subscription option name in the site's default language." }, { "name": "translated", @@ -11578,7 +11839,7 @@ "nativeType": "string" } ], - "doc": "Translated subscription option name." + "doc": "Subscription option name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -11883,6 +12144,16 @@ ], "doc": "Additional settings for customization of the checkout process.\n\nCustom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout).\n" }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Checkout.ExtendedFields" + } + ], + "doc": "Custom field data for the checkout object.\n\n[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.\n" + }, { "name": "giftCard", "readOnly": true, diff --git a/wix-ecom-backend/wix-ecom-backend/CheckoutSettings.service.json b/wix-ecom-backend/wix-ecom-backend/CheckoutSettings.service.json index 454b522344..fe8ad98063 100644 --- a/wix-ecom-backend/wix-ecom-backend/CheckoutSettings.service.json +++ b/wix-ecom-backend/wix-ecom-backend/CheckoutSettings.service.json @@ -297,6 +297,26 @@ } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "CheckboxField", "members": [ @@ -566,71 +586,187 @@ } }, { - "name": "DiffmatokyPayload", + "name": "DomainEvent", "members": [ { - "name": "compareChannel", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutSettings.ActionEvent" + } + ], "doc": "" }, { - "name": "entityId", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.CheckoutSettings.EntityCreatedEvent" } ], "doc": "" }, { - "name": "errorInformation", + "name": "deletedEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.CheckoutSettings.ErrorInformation" + "referenceType": "wix-ecom-backend.CheckoutSettings.EntityDeletedEvent" } ], "doc": "" }, { - "name": "left", + "name": "entityEventSequence", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." }, { - "name": "right", + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", "optional": true, "type": [ { "nativeType": "string" } ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutSettings.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutSettings.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutSettings.EntityCreatedEvent" + } + ], "doc": "" }, { - "name": "tags", + "name": "deletedEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-ecom-backend.CheckoutSettings.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutSettings.EntityUpdatedEvent" } ], "doc": "" @@ -652,10 +788,10 @@ } }, { - "name": "ErrorInformation", + "name": "EntityCreatedEvent", "members": [ { - "name": "stackTrace", + "name": "entityAsJson", "optional": true, "type": [ { @@ -671,6 +807,46 @@ ] } }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "GetCheckoutSettingsRequest", "members": [], diff --git a/wix-ecom-backend/wix-ecom-backend/CheckoutTemplates.service.json b/wix-ecom-backend/wix-ecom-backend/CheckoutTemplates.service.json index fceb2806c9..a126f32d93 100644 --- a/wix-ecom-backend/wix-ecom-backend/CheckoutTemplates.service.json +++ b/wix-ecom-backend/wix-ecom-backend/CheckoutTemplates.service.json @@ -9,84 +9,6 @@ "relatedGuides": [], "properties": [], "operations": [ - { - "name": "createAndRedirectToCheckout", - "params": [ - { - "name": "checkoutTemplateId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of the checkout template to use to create a checkout.", - "required": true - }, - { - "name": "siteId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of the site associated with the checkout template.", - "required": true - } - ], - "requiredFields": [ - "checkoutTemplateId", - "siteId" - ], - "ret": { - "type": [ - { - "complexType": { - "nativeType": "Promise", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.CheckoutTemplates.RawHttpResponse" - } - ] - } - } - ], - "doc": null - }, - "docs": { - "summary": "Creates a new checkout based on the checkout template and redirects to the new checkout page.", - "description": [ - "Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n\nTo build a URL that uses this function, follow this format:\n`https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}`\n\nTo create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`." - ], - "examples": [ - { - "title": "createAndRedirectToCheckout example", - "body": [ - "import { checkoutTemplates } from 'wix-ecom-backend';", - " ", - " async function createAndRedirectToCheckout(checkoutTemplateId, siteId) {", - " try {", - " const result = await checkoutTemplates.createAndRedirectToCheckout(checkoutTemplateId, siteId);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " - ] - } - ] - }, - "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], - "syntaxName": "createAndRedirectToCheckout", - "isAdminMethod": true - }, { "name": "createCheckoutFromTemplate", "params": [ @@ -133,7 +55,7 @@ "docs": { "summary": "Creates a new checkout based on the checkout template.", "description": [ - "Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n\nThe customer can be directed to the new checkout using the checkout's `checkoutUrl`.\n\nTo create the new checkout and automatically redirect to the checkout page, use `createAndRedirectToCheckout()`." + "Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.\n\nThe customer can be directed to the new checkout using the checkout's `checkoutUrl`." ], "examples": [ { @@ -162,8 +84,7 @@ "id": "maturity-beta" } ], - "syntaxName": "createCheckoutFromTemplate", - "isAdminMethod": true + "syntaxName": "createCheckoutFromTemplate" }, { "name": "createCheckoutTemplate", @@ -204,7 +125,7 @@ "docs": { "summary": "Creates a checkout template.", "description": [ - "A checkout template is used to create a new checkout that will include predefined information. For example, a single link with\na `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created\nfor that customer with certain checkout information already populated.\n\nThe customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is\nusing the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an\nadditional coupon on top of the sale being offered. If so, they can set `customization.applyCouponLocked` to `true`.\n\nA checkout can be created with a checkout template in 2 ways:\n- `createAndRedirectToCheckout()`. With this function you can build a URL that when clicked will create a new checkout and redirect the customer to that new checkout page.\n- `createCheckoutFromTemplate()`. This function can be called to create a new checkout from the checkout template. You may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`." + "A checkout template is used to create a new checkout that will include predefined information. For example, a single link with\na `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created\nfor that customer with certain checkout information already populated.\n\nThe customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is\nusing the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an\nadditional coupon on top of the sale being offered. If so, they can set `customization.applyCouponLocked` to `true`.\n\nA checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`." ], "examples": [ { @@ -506,6 +427,26 @@ } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "AdditionalFee", "members": [ @@ -747,7 +688,7 @@ "doc": "The sum of all the tax from line items that calculated by the tax identifiers." }, { - "name": "jurisdictionName", + "name": "jurisdiction", "optional": true, "type": [ { @@ -784,7 +725,7 @@ "nativeType": "string" } ], - "doc": "The rate at which this tax detail was calculated, a number between 0.0 to 1.0." + "doc": "The rate at which this tax detail was calculated." }, { "name": "taxType", @@ -1332,7 +1273,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -1342,7 +1283,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -1352,12 +1293,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -1576,6 +1517,16 @@ ], "doc": "Additional settings for customization of the checkout process.\n\nCustom settings can only be set when [creating a checkout](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/checkout/create-checkout).\n" }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.ExtendedFields" + } + ], + "doc": "Custom field data for the checkout object.\n\n[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.\n" + }, { "name": "giftCard", "readOnly": true, @@ -1738,36 +1689,6 @@ ] } }, - { - "name": "CheckoutCreatedFromCheckoutTemplate", - "members": [ - { - "name": "checkoutTemplate", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CheckoutTemplates.CheckoutTemplate" - } - ], - "doc": "checkout template" - }, - { - "name": "createdCheckout", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CheckoutTemplates.Checkout" - } - ], - "doc": "newly created checkout" - } - ], - "docs": { - "description": [ - "Triggered when newly checkout created successfully from checkout template" - ] - } - }, { "name": "CheckoutCustomization", "members": [ @@ -1876,6 +1797,36 @@ ] } }, + { + "name": "CheckoutTemplateUsed", + "members": [ + { + "name": "checkout", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.Checkout" + } + ], + "doc": "newly created checkout" + }, + { + "name": "checkoutTemplate", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.CheckoutTemplate" + } + ], + "doc": "checkout template" + } + ], + "docs": { + "description": [ + "Triggered when newly checkout created successfully from checkout template" + ] + } + }, { "name": "Color", "members": [ @@ -1897,7 +1848,7 @@ "nativeType": "string" } ], - "doc": "Description line color name in site's default language." + "doc": "Description line color name in the site's default language." }, { "name": "translated", @@ -1907,7 +1858,7 @@ "nativeType": "string" } ], - "doc": "Translated description line color name according to buyer language. Defaults to `original` when not provided." + "doc": "Description line color name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -2466,6 +2417,26 @@ ], "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." }, + { + "name": "catalogReference", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.CatalogReference" + } + ], + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." + }, + { + "name": "depositAmount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - partial payment for the given item to be paid upfront during the checkout.\nEligible for catalog items with type `DEPOSIT_ONLINE`.\nIf omitted - item's price will not be split and is expected to be paid in single installment" + }, { "name": "descriptionLines", "optional": true, @@ -2483,6 +2454,26 @@ ], "doc": "Custom line item description lines. Used for display purposes for the cart, checkout and order." }, + { + "name": "fullPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Item price **before** catalog-defined discount. Defaults to `price` when not provided." + }, + { + "name": "itemType", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.ItemType" + } + ], + "doc": "Required** - Item type. Either a preset type or custom." + }, { "name": "media", "optional": true, @@ -2503,6 +2494,16 @@ ], "doc": "Custom line item name." }, + { + "name": "paymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.\n+ `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n+ `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." + }, { "name": "physicalProperties", "optional": true, @@ -2511,7 +2512,7 @@ "referenceType": "wix-ecom-backend.CheckoutTemplates.PhysicalProperties" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - Physical properties of the item. When relevant, contains information such as SKU and item weight." }, { "name": "price", @@ -2533,6 +2534,16 @@ ], "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." }, + { + "name": "productName", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.ProductName" + } + ], + "doc": "*Required** - Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" + }, { "name": "quantity", "optional": true, @@ -2543,6 +2554,36 @@ ], "doc": "Custom line item quantity.\n\nMin: `1`\nMax: `100000`\n" }, + { + "name": "quantityAvailable", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Optional - Item quantity available for purchase. Only return this if inventory is managed.\nNot returning this field means that the buyer can \"infinitely\" tick up the number of items in the cart." + }, + { + "name": "rootCatalogItemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n+ For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n+ in most cases, this field is the name as `catalogReference.catalogItemId`.\n+ Used in membership validation." + }, + { + "name": "serviceProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.ServiceProperties" + } + ], + "doc": "Optional - Service properties. When relevant, this contains information such as date and number of participants.\nUsed, among other things, when checking for valid memberships." + }, { "name": "taxGroupId", "optional": true, @@ -2552,19 +2593,18 @@ } ], "doc": "Tax group ID for this custom line item." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.\nThe URL is optional and if not provided, the site URL will be used." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCustomLineItemItemPropertiesOneOf", - "members": [ - "digitalFile", - "physicalProperties" - ] - } - ] - }, "docs": { "description": [ "" @@ -2572,34 +2612,14 @@ } }, { - "name": "CustomLineItemItemPropertiesOneOf", + "name": "CustomSettings", "members": [ { - "name": "physicalProperties", + "name": "lockCouponCode", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.CheckoutTemplates.PhysicalProperties" - } - ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CustomSettings", - "members": [ - { - "name": "lockCouponCode", - "optional": true, - "type": [ - { - "nativeType": "boolean" + "nativeType": "boolean" } ], "doc": "Whether to restrict the option to add or remove a coupon code on the checkout page.\n\nDefault: `false`\n" @@ -2827,7 +2847,7 @@ "nativeType": "string" } ], - "doc": "Description line name in site's default language." + "doc": "Description line name in the site's default language." }, { "name": "translated", @@ -2837,7 +2857,7 @@ "nativeType": "string" } ], - "doc": "Translated description line item according to buyer language. Defaults to `original` when not provided." + "doc": "Description line name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -2889,6 +2909,16 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.SystemError" + } + ], + "doc": "" + }, { "name": "tracing", "optional": true, @@ -2926,6 +2956,7 @@ "name": "oneOfDetailsKindOneOf", "members": [ "applicationError", + "systemError", "validationError" ] } @@ -2950,6 +2981,16 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.SystemError" + } + ], + "doc": "" + }, { "name": "validationError", "optional": true, @@ -3037,6 +3078,259 @@ ] } }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ExtendedFields", "members": [ @@ -3058,7 +3352,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -3415,7 +3709,7 @@ } } ], - "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`." + "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead." }, { "name": "taxRate", @@ -3465,7 +3759,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -3506,7 +3800,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -3536,7 +3830,7 @@ "referenceType": "wix-ecom-backend.CheckoutTemplates.CatalogReference" } ], - "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info.\n\n> **Note:** For more information on what to pass to `lineItems.catalogReference`, see [eCommerce Integration in the Wix Stores Catalog API](https://dev.wix.com/api/rest/wix-stores/catalog/ecommerce-integration).\n" }, { "name": "quantity", @@ -3942,7 +4236,7 @@ "nativeType": "number" } ], - "doc": "Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`." + "doc": "Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request." } ], "docs": { @@ -4002,7 +4296,7 @@ "nativeType": "string" } ], - "doc": "Description line plain text value in site's default language." + "doc": "Description line plain text value in the site's default language." }, { "name": "translated", @@ -4012,7 +4306,7 @@ "nativeType": "string" } ], - "doc": "Translated description line plain text value according to buyer language. Defaults to `original` when not provided." + "doc": "Description line plain text value translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -4032,7 +4326,7 @@ "nativeType": "string" } ], - "doc": "Required.** Original price description in site's default language." + "doc": "__Required.__ Price description in the site's default language." }, { "name": "translated", @@ -4042,7 +4336,7 @@ "nativeType": "string" } ], - "doc": "Translated price description according to buyer language. Defaults to `original` when not provided." + "doc": "Price description translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -4132,7 +4426,7 @@ "nativeType": "string" } ], - "doc": "__Required.__ Original item name in site's default language.\nMin: 1 character\nMax: 200 characters" + "doc": "__Required.__ Item name in the site's default language.\n\nMin: 1 character.\nMax: 200 characters.\n" }, { "name": "translated", @@ -4142,7 +4436,7 @@ "nativeType": "string" } ], - "doc": "Optional. Translated item name according to buyer language. Defaults to `original` when not provided.\nMin: 1 character\nMax: 400 characters" + "doc": "Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`.\n" } ], "docs": { @@ -4296,7 +4590,7 @@ "nativeType": "string" } ], - "doc": "Media ID in media manager." + "doc": "Media ID in Wix Media Manager." }, { "name": "fileName", @@ -4306,7 +4600,7 @@ "nativeType": "string" } ], - "doc": "Original file name." + "doc": "Original filename." }, { "name": "fileType", @@ -4601,7 +4895,7 @@ "nativeType": "number" } ], - "doc": "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." + "doc": "The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room." }, { "name": "scheduledDate", @@ -4611,7 +4905,7 @@ "nativeType": "Date" } ], - "doc": "Date and time the service is supposed to be provided in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the time of the class." + "doc": "Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\nFor example, the start time of a class." } ], "docs": { @@ -4918,7 +5212,7 @@ "nativeType": "number" } ], - "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`." + "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`." }, { "name": "frequency", @@ -4937,6 +5231,26 @@ ] } }, + { + "name": "SystemError", + "members": [ + { + "name": "errorCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Target", "members": [ @@ -5038,6 +5352,96 @@ ] } }, + { + "name": "TaxBreakdown", + "members": [ + { + "name": "jurisdiction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\"." + }, + { + "name": "jurisdictionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the jurisdiction in which this tax detail applies." + }, + { + "name": "nonTaxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.MultiCurrencyPrice" + } + ], + "doc": "The amount of this line item price that was considered nontaxable. (Decimal value)" + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)" + }, + { + "name": "taxAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.MultiCurrencyPrice" + } + ], + "doc": "The amount of tax estimated for this line item. (Decimal value)" + }, + { + "name": "taxName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\nThis name should be explicit enough to allow the merchant to understand what tax was calculated." + }, + { + "name": "taxType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc." + }, + { + "name": "taxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CheckoutTemplates.MultiCurrencyPrice" + } + ], + "doc": "The taxable amount of this line item." + } + ], + "docs": { + "description": [ + "TaxBreakdown represents tax information for a line item.\nIt holds the tax amount and the tax rate for each tax authority that apply on the line item." + ] + } + }, { "name": "TaxCalculationDetails", "members": [ @@ -5212,7 +5616,7 @@ "nativeType": "string" } ], - "doc": "Subscription option name." + "doc": "Subscription option name in the site's default language." }, { "name": "translated", @@ -5222,7 +5626,7 @@ "nativeType": "string" } ], - "doc": "Translated subscription option name." + "doc": "Subscription option name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { diff --git a/wix-ecom-backend/wix-ecom-backend/CurrentCart.service.json b/wix-ecom-backend/wix-ecom-backend/CurrentCart.service.json index cd3d04b147..41ae6881f2 100644 --- a/wix-ecom-backend/wix-ecom-backend/CurrentCart.service.json +++ b/wix-ecom-backend/wix-ecom-backend/CurrentCart.service.json @@ -81,7 +81,7 @@ " \"lineItems\": [{", " \"catalogReference\": {", " // Wix Stores appId", - " \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " // Wix Stores productId", " \"catalogItemId\": \"1a2d7e83-4bef-31d5-09e1-3326ee271c09\",", " \"options\": {", @@ -116,7 +116,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"1a2d7e83-4bef-31d5-09e1-3326ee271c09\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"132b84e8-aab8-47a1-a1f6-2c47557b64a4\"", " * }", @@ -517,7 +517,7 @@ " * \"quantity\": 5,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -870,9 +870,9 @@ "", " export async function myGetCurrentCartFunction() {", " try {", - " const currentCart = await currentCart.getCurrentCart();", + " const myCurrentCart = await currentCart.getCurrentCart();", " console.log('Success! Retrieved current cart:', currentCart);", - " return currentCart;", + " return myCurrentCart;", " } catch (error) {", " console.error(error);", " // Handle the error", @@ -886,12 +886,12 @@ " import { myGetCurrentCartFunction } from 'backend/my-backend-file';", "", " myGetCurrentCartFunction()", - " .then((cart) => {", - " const formattedCartTotal = cart.subtotal.formattedAmount;", - " const numberOfCartLineItems = cart.lineItems.length;", + " .then((myCurrentCart) => {", + " const formattedCartTotal = myCurrentCart.subtotal.formattedAmount;", + " const numberOfCartLineItems = myCurrentCart.lineItems.length;", "", - " console.log('Success! Retrieved current cart:', cart);", - " return cart;", + " console.log('Success! Retrieved current cart:', myCurrentCart);", + " return myCurrentCart;", " })", " .catch((error) => {", " console.error(error);", @@ -908,7 +908,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1071,7 +1071,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1384,7 +1384,7 @@ " * \"quantity\": 1,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1581,7 +1581,7 @@ " * \"quantity\": 2,", " * \"catalogReference\": {", " * \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"e62fee23-7878-437a-bf0e-292f17d11cb5\"", " * }", @@ -1658,7 +1658,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"1a2d7e83-4bef-31d5-09e1-3326ee271c09\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"132b84e8-aab8-47a1-a1f6-2c47557b64a4\"", " * }", @@ -2213,7 +2213,7 @@ "doc": "The sum of all the tax from line items that calculated by the tax identifiers." }, { - "name": "jurisdictionName", + "name": "jurisdiction", "optional": true, "type": [ { @@ -2250,7 +2250,7 @@ "nativeType": "string" } ], - "doc": "The rate at which this tax detail was calculated, a number between 0.0 to 1.0." + "doc": "The rate at which this tax detail was calculated." }, { "name": "taxType", @@ -2309,76 +2309,6 @@ ] } }, - { - "name": "AppliedCoupon", - "members": [ - { - "name": "code", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon code" - }, - { - "name": "convertedDiscountValue", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Converted discount value" - }, - { - "name": "couponId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon internal ID" - }, - { - "name": "couponType", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Type (e.g., moneyOff, percentOff)" - }, - { - "name": "discountValue", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Discount value" - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon name" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "AppliedDiscount", "members": [ @@ -2528,56 +2458,6 @@ ] } }, - { - "name": "BuyerDetails", - "members": [ - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Email address" - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's first name" - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's last name" - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Phone number" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "BuyerInfo", "members": [ @@ -3184,147 +3064,6 @@ ] } }, - { - "name": "CartAddress", - "members": [ - { - "name": "address", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.CommonAddress" - } - ], - "doc": "Address" - }, - { - "name": "contactDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.CommonFullAddressContactDetails" - } - ], - "doc": "Contact details" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CartCompletedEvent", - "members": [ - { - "name": "appliedCoupon", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.AppliedCoupon" - } - ], - "doc": "Coupon applied to this cart" - }, - { - "name": "billingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.CartAddress" - } - ], - "doc": "Customer's billing address" - }, - { - "name": "buyerInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.V1BuyerInfo" - } - ], - "doc": "Customer's Wix ID" - }, - { - "name": "buyerNote", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Message from the customer" - }, - { - "name": "cartId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "completedTime", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Time the cart was created" - }, - { - "name": "currency", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.Currency" - } - ], - "doc": "Currency used for pricing in this store" - }, - { - "name": "shippingInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.ShippingInfo" - } - ], - "doc": "Cart shipping information" - }, - { - "name": "totals", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.Totals" - } - ], - "doc": "Totals for order's line items" - }, - { - "name": "weightUnit", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Weight measurement unit - defaults to site's weight unit. Supported values:\n+ `\"KG\"`\n+ `\"LB\"`" - } - ], - "docs": { - "description": [ - "This webhook is triggered when a customer has completed their checkout. In most cases, an order will be created immediately and an Order Event webhook will also be triggered. In some cases, the payment provider may list the order as \"pending\" - and the order will not be created until the payment is listed as \"approved.\"" - ] - } - }, { "name": "CartDiscount", "members": [ @@ -3407,7 +3146,7 @@ "nativeType": "string" } ], - "doc": "ID of the catalog app. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -3417,7 +3156,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `serviceId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -3427,12 +3166,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value form. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -3477,261 +3216,60 @@ } }, { - "name": "CommonAddress", + "name": "Coupon", "members": [ { - "name": "addressLine", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Main address line, usually street and number as free text." + "doc": "Coupon ID." }, { - "name": "addressLine1", + "name": "code", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Main address line, usually street and number as free text." - }, + "doc": "Coupon code." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCartRequest", + "members": [ { - "name": "addressLine2", + "name": "cartInfo", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.CurrentCart.Cart" } ], - "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." + "doc": "Cart info." }, { - "name": "city", + "name": "couponCode", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "City name." + "doc": "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)." }, { - "name": "country", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Country code." - }, - { - "name": "postalCode", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Zip/postal code." - }, - { - "name": "streetAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.StreetAddress" - } - ], - "doc": "Street name and number." - }, - { - "name": "subdivision", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCommonAddressStreetOneOf", - "members": [ - "addressLine", - "streetAddress" - ] - } - ] - }, - "docs": { - "description": [ - "Physical address" - ] - } - }, - { - "name": "CommonAddressStreetOneOf", - "members": [ - { - "name": "addressLine", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Main address line, usually street and number as free text." - }, - { - "name": "streetAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.StreetAddress" - } - ], - "doc": "Street name and number." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CommonFullAddressContactDetails", - "members": [ - { - "name": "company", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's company name." - }, - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Email associated with the address." - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's first name." - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's last name." - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's phone number." - }, - { - "name": "vatId", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.VatId" - } - ], - "doc": "Tax info. Currently usable only in Brazil." - } - ], - "docs": { - "description": [ - "Full contact details for an address" - ] - } - }, - { - "name": "Coupon", - "members": [ - { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon ID." - }, - { - "name": "code", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon code." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateCartRequest", - "members": [ - { - "name": "cartInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.Cart" - } - ], - "doc": "Cart info." - }, - { - "name": "couponCode", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "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)." - }, - { - "name": "lineItems", + "name": "lineItems", "optional": true, "type": [ { @@ -4001,47 +3539,37 @@ } }, { - "name": "Currency", + "name": "CustomLineItem", "members": [ { - "name": "code", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Currency code" + "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." }, { - "name": "symbol", + "name": "catalogReference", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.CurrentCart.CatalogReference" } ], - "doc": "Currency symbol" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CustomLineItem", - "members": [ + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." + }, { - "name": "_id", + "name": "depositAmount", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." + "doc": "Optional - partial payment for the given item to be paid upfront during the checkout.\nEligible for catalog items with type `DEPOSIT_ONLINE`.\nIf omitted - item's price will not be split and is expected to be paid in single installment" }, { "name": "descriptionLines", @@ -4060,6 +3588,26 @@ ], "doc": "Custom line item description lines. Used for displaying the cart, checkout and order." }, + { + "name": "fullPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Item price **before** catalog-defined discount. Defaults to `price` when not provided." + }, + { + "name": "itemType", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.ItemType" + } + ], + "doc": "Required** - Item type. Either a preset type or custom." + }, { "name": "media", "optional": true, @@ -4080,6 +3628,16 @@ ], "doc": "Custom line item name." }, + { + "name": "paymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.\n+ `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n+ `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." + }, { "name": "physicalProperties", "optional": true, @@ -4088,7 +3646,7 @@ "referenceType": "wix-ecom-backend.CurrentCart.PhysicalProperties" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - Physical properties of the item. When relevant, contains information such as SKU and item weight." }, { "name": "price", @@ -4110,6 +3668,16 @@ ], "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." }, + { + "name": "productName", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.ProductName" + } + ], + "doc": "*Required** - Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" + }, { "name": "quantity", "optional": true, @@ -4120,6 +3688,36 @@ ], "doc": "Custom line item quantity.\n\nMin: `1`\nMax: `100000`\n" }, + { + "name": "quantityAvailable", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Optional - Item quantity available for purchase. Only return this if inventory is managed.\nNot returning this field means that the buyer can \"infinitely\" tick up the number of items in the cart." + }, + { + "name": "rootCatalogItemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n+ For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n+ in most cases, this field is the name as `catalogReference.catalogItemId`.\n+ Used in membership validation." + }, + { + "name": "serviceProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.ServiceProperties" + } + ], + "doc": "Optional - Service properties. When relevant, this contains information such as date and number of participants.\nUsed, among other things, when checking for valid memberships." + }, { "name": "taxGroupId", "optional": true, @@ -4129,37 +3727,16 @@ } ], "doc": "Tax group ID for this custom line item." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCustomLineItemItemPropertiesOneOf", - "members": [ - "digitalFile", - "physicalProperties" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CustomLineItemItemPropertiesOneOf", - "members": [ + }, { - "name": "physicalProperties", + "name": "url", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.CurrentCart.PhysicalProperties" + "nativeType": "string" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.\nThe URL is optional and if not provided, the site URL will be used." } ], "docs": { @@ -4445,6 +4022,16 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.SystemError" + } + ], + "doc": "" + }, { "name": "tracing", "optional": true, @@ -4482,6 +4069,7 @@ "name": "oneOfDetailsKindOneOf", "members": [ "applicationError", + "systemError", "validationError" ] } @@ -4506,6 +4094,16 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.SystemError" + } + ], + "doc": "" + }, { "name": "validationError", "optional": true, @@ -4817,7 +4415,18 @@ }, { "name": "EntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -5215,7 +4824,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -5657,7 +5266,7 @@ } } ], - "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`." + "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead." }, { "name": "taxRate", @@ -5707,7 +5316,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -5748,7 +5357,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -6001,6 +5610,36 @@ ] } }, + { + "name": "LineItemDiscount", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of line item the discount applies to." + }, + { + "name": "totalDiscountAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.MultiCurrencyPrice" + } + ], + "doc": "Discount value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "LineItemPricesData", "members": [ @@ -6082,7 +5721,7 @@ "referenceType": "wix-ecom-backend.CurrentCart.MultiCurrencyPrice" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price after discounts, and before tax." } ], "docs": { @@ -6899,7 +6538,7 @@ "nativeType": "string" } ], - "doc": "Media ID in media manager." + "doc": "Media ID in Wix Media Manager." }, { "name": "fileName", @@ -6909,7 +6548,7 @@ "nativeType": "string" } ], - "doc": "Original file name." + "doc": "Original filename." }, { "name": "fileType", @@ -7110,7 +6749,7 @@ "referenceType": "wix-ecom-backend.CurrentCart.MultiCurrencyPrice" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price of shipping after discounts (when relevant), and before tax." } ], "docs": { @@ -7236,87 +6875,6 @@ ] } }, - { - "name": "ShippingInfo", - "members": [ - { - "name": "pickupDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.V1PickupDetails" - } - ], - "doc": "Pickup details when this object describes pickup" - }, - { - "name": "shippingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.CartAddress" - } - ], - "doc": "Shipment details when this object describes shipment" - }, - { - "name": "shippingRuleDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.ShippingRuleDetails" - } - ], - "doc": "Selected shipping rule details" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfShippingInfoDetailsOneOf", - "members": [ - "pickupDetails", - "shippingAddress" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ShippingInfoDetailsOneOf", - "members": [ - { - "name": "pickupDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.V1PickupDetails" - } - ], - "doc": "Pickup details when this object describes pickup" - }, - { - "name": "shippingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.CartAddress" - } - ], - "doc": "Shipment details when this object describes shipment" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ShippingInformation", "members": [ @@ -7482,56 +7040,6 @@ ] } }, - { - "name": "ShippingRuleDetails", - "members": [ - { - "name": "deliveryOption", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Rule title (as provided by the store owner)" - }, - { - "name": "estimatedDeliveryTime", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Shipping option delivery time" - }, - { - "name": "optionId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Selected option ID" - }, - { - "name": "ruleId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Selected shipping rule ID" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "StreetAddress", "members": [ @@ -7562,36 +7070,6 @@ ] } }, - { - "name": "Subdivision", - "members": [ - { - "name": "code", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Short subdivision code." - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Subdivision full name." - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "SubscriptionOptionInfo", "members": [ @@ -7653,17 +7131,37 @@ "nativeType": "number" } ], - "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`." - }, + "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`." + }, + { + "name": "frequency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Frequency of recurring payment." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SystemError", + "members": [ { - "name": "frequency", + "name": "errorCode", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Frequency of recurring payment." + "doc": "Error code." } ], "docs": { @@ -7773,6 +7271,96 @@ ] } }, + { + "name": "TaxBreakdown", + "members": [ + { + "name": "jurisdiction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\"." + }, + { + "name": "jurisdictionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the jurisdiction in which this tax detail applies." + }, + { + "name": "nonTaxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.MultiCurrencyPrice" + } + ], + "doc": "The amount of this line item price that was considered nontaxable. (Decimal value)" + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)" + }, + { + "name": "taxAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.MultiCurrencyPrice" + } + ], + "doc": "The amount of tax estimated for this line item. (Decimal value)" + }, + { + "name": "taxName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\nThis name should be explicit enough to allow the merchant to understand what tax was calculated." + }, + { + "name": "taxType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc." + }, + { + "name": "taxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.CurrentCart.MultiCurrencyPrice" + } + ], + "doc": "The taxable amount of this line item." + } + ], + "docs": { + "description": [ + "TaxBreakdown represents tax information for a line item.\nIt holds the tax amount and the tax rate for each tax authority that apply on the line item." + ] + } + }, { "name": "TaxCalculationDetails", "members": [ @@ -7947,7 +7535,7 @@ "nativeType": "string" } ], - "doc": "Subscription option name." + "doc": "Subscription option name in the site's default language." }, { "name": "translated", @@ -7957,87 +7545,7 @@ "nativeType": "string" } ], - "doc": "Translated subscription option name." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Totals", - "members": [ - { - "name": "discount", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total calculated discount value, according to order.discount" - }, - { - "name": "quantity", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total line items quantity" - }, - { - "name": "shipping", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total shipping price, including tax" - }, - { - "name": "subtotal", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Subtotal of all line items, before tax" - }, - { - "name": "tax", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total tax" - }, - { - "name": "total", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total price" - }, - { - "name": "weight", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total items weight" + "doc": "Subscription option name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -8275,76 +7783,6 @@ ] } }, - { - "name": "V1BuyerInfo", - "members": [ - { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer details" - }, - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's email address" - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's first name" - }, - { - "name": "identity_Type", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's relationship to the website" - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's last name" - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's phone number" - } - ], - "docs": { - "description": [ - "This might expand and add additional data" - ] - } - }, { "name": "V1Coupon", "members": [ @@ -8415,46 +7853,6 @@ ] } }, - { - "name": "V1PickupDetails", - "members": [ - { - "name": "buyerDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.BuyerDetails" - } - ], - "doc": "Customer details" - }, - { - "name": "pickupAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.CurrentCart.CommonAddress" - } - ], - "doc": "Pickup address" - }, - { - "name": "pickupInstructions", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Store owner's pickup instructions" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ValidationError", "members": [ diff --git a/wix-ecom-backend/wix-ecom-backend/DiscountRules.service.json b/wix-ecom-backend/wix-ecom-backend/DiscountRules.service.json index 0534b7e5c2..c342838ee0 100644 --- a/wix-ecom-backend/wix-ecom-backend/DiscountRules.service.json +++ b/wix-ecom-backend/wix-ecom-backend/DiscountRules.service.json @@ -244,14 +244,14 @@ "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", - "|`_id`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`startsWith()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#startsWith),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", - "|`revision`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", - "|`_createdDate`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", - "|`_updatedDate`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", - "|`active`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", - "|`name`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`startsWith()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#startsWith),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", - "|`activeTimeInfo.start`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", - "|`activeTimeInfo.end`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|" + "|`_id`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`hasSome()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#hasSome),[`startsWith()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#startsWith),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", + "|`revision`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`hasSome()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#hasSome),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", + "|`_createdDate`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`hasSome()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#hasSome),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", + "|`_updatedDate`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`hasSome()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#hasSome),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", + "|`active`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`hasSome()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#hasSome),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", + "|`name`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`hasSome()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#hasSome),[`startsWith()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#startsWith),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", + "|`activeTimeInfo.start`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`hasSome()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#hasSome),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|", + "|`activeTimeInfo.end`|[`eq()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#eq),[`ne()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ne),[`exists()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#exists),[`in()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#in),[`hasSome()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#hasSome),[`lt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#lt),[`le()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#le),[`gt()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#gt),[`ge()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ge),[`ascending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#ascending),[`descending()`](wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder#descending)|" ], "examples": [ { @@ -619,7 +619,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -629,7 +629,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -639,12 +639,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -1703,7 +1703,18 @@ }, { "name": "EntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -1751,7 +1762,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -1779,6 +1790,16 @@ } ], "doc": "Line items for which to check for discount rules." + }, + { + "name": "purchaseFlowId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" } ], "docs": { @@ -1806,6 +1827,16 @@ } ], "doc": "Line items for which to check for discount rules." + }, + { + "name": "purchaseFlowId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" } ], "docs": { diff --git a/wix-ecom-backend/wix-ecom-backend/DiscountRules/DiscountRulesQueryBuilder.service.json b/wix-ecom-backend/wix-ecom-backend/DiscountRules/DiscountRulesQueryBuilder.service.json index 49870084bb..287940d4b8 100644 --- a/wix-ecom-backend/wix-ecom-backend/DiscountRules/DiscountRulesQueryBuilder.service.json +++ b/wix-ecom-backend/wix-ecom-backend/DiscountRules/DiscountRulesQueryBuilder.service.json @@ -605,6 +605,103 @@ ], "syntaxName": "gt" }, + { + "name": "hasSome", + "params": [ + { + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `values`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "any" + } + ] + } + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-ecom-backend.DiscountRules.DiscountRulesQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "summary": "Refines a query to match items whose specified property contains any of the specified values.", + "description": [ + "The `hasSome()` function refines a `DiscountRulesQueryBuilder` to match only items where the value of the specified `propertyName` equals any of the specified `values`.", + "Matching strings with `hasSome()` is case-sensitive, so `'text'` isn't equal to `'Text'`.", + "If the specified property is an array, `hasSome()` matches if any of that array's elements equal any of the specified values." + ], + "examples": [ + { + "title": "Add a `hasSome` filter to a query", + "body": [ + "const query = discountRules.queryDiscountRules.hasSome('labelIds', [", + " 'red',", + " 'blue',", + " 'purple',", + "]);", + "" + ] + }, + { + "title": "Create a query, add a `hasSome` filter, and run it", + "body": [ + "import { discountRules } from 'wix-ecom-backend';", + "", + "export async function myQueryFunction() {", + " const results = await discountRules", + " .queryDiscountRules()", + " .hasSome('labelIds', ['red', 'blue', 'purple'])", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "hasSome" + }, { "name": "in", "params": [ diff --git a/wix-ecom-backend/wix-ecom-backend/Events.service.json b/wix-ecom-backend/wix-ecom-backend/Events.service.json index c7e93dc54d..166e2e4a9e 100644 --- a/wix-ecom-backend/wix-ecom-backend/Events.service.json +++ b/wix-ecom-backend/wix-ecom-backend/Events.service.json @@ -221,7 +221,7 @@ "displayName": "BackInStockNotificationRequestCreated" } ], - "doc": "", + "doc": "Information about the back in stock notification request that was created.\n", "required": false } ], @@ -236,7 +236,9 @@ }, "docs": { "summary": "Triggered when a back in stock notification request is created.", - "description": [], + "description": [ + "The `onBackInStockNotificationRequestCreated()` event handler runs when a back in stock notification request is created. The received `BackInStockNotificationRequestCreated` object contains information about the back in stock notification request that was created and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBackInStockNotificationRequestCreated example", @@ -271,7 +273,7 @@ "displayName": "BackInStockNotificationRequestDeleted" } ], - "doc": "", + "doc": "Information about the back in stock notification request that was deleted.\n", "required": false } ], @@ -286,7 +288,9 @@ }, "docs": { "summary": "Triggered when a back in stock notification request is deleted.", - "description": [], + "description": [ + "The `onBackInStockNotificationRequestDeleted()` event handler runs when a back in stock notification request is deleted. The received `BackInStockNotificationRequestDeleted` object contains event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBackInStockNotificationRequestDeleted example", @@ -321,7 +325,7 @@ "displayName": "BackInStockNotificationRequestUpdated" } ], - "doc": "", + "doc": "Information about the back in stock notification request that was updated.\n", "required": false } ], @@ -336,7 +340,9 @@ }, "docs": { "summary": "Triggered when a back in stock notification request is updated.", - "description": [], + "description": [ + "The `onBackInStockNotificationRequestUpdated()` event handler runs when a back in stock notification request is updated. The received `BackInStockNotificationRequestUpdated` object contains information about the back in stock notification request that was updated and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBackInStockNotificationRequestUpdated example", @@ -421,7 +427,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"e62fee23-7878-437a-bf0e-292f17d11cb5\"", " * }", @@ -647,7 +653,7 @@ " * \"quantity\": 2,", " * \"catalogReference\": {", " * \"catalogItemId\": \"df19c1f7-07d8-a265-42f8-e8dfa824cc6e\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"e62fee23-7878-437a-bf0e-292f17d11cb5\"", " * }", @@ -724,7 +730,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"1a2d7e83-4bef-31d5-09e1-3326ee271c09\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", " * \"options\": {", " * \"variantId\": \"132b84e8-aab8-47a1-a1f6-2c47557b64a4\"", " * }", @@ -906,7 +912,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1242,7 +1248,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -1505,7 +1511,7 @@ "displayName": "CheckoutSettingsUpdated" } ], - "doc": "", + "doc": "Information about the checkout settings that were updated and event metadata.\n", "required": false } ], @@ -1520,7 +1526,9 @@ }, "docs": { "summary": "Triggered when checkout settings are updated.", - "description": [], + "description": [ + "The `onCheckoutSettingsUpdated()` event handler runs when checkout settings are updated. The received `CheckoutSettingsUpdated` object contains information about the checkout settings that were updated and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onCheckoutSettingsUpdated example", @@ -1545,17 +1553,17 @@ "syntaxName": "wixEcom_onCheckoutSettingsUpdated" }, { - "name": "onCheckoutTemplateCheckoutCreated", + "name": "onCheckoutTemplateCreated", "params": [ { "name": "event", "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateCheckoutCreated", - "displayName": "CheckoutTemplateCheckoutCreated" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateCreated", + "displayName": "CheckoutTemplateCreated" } ], - "doc": "", + "doc": "Information about the checkout template that was created and event metadata.\n", "required": false } ], @@ -1569,16 +1577,18 @@ "doc": null }, "docs": { - "summary": "Triggered when a checkout is created from a checkout template.", - "description": [], + "summary": "Triggered when a checkout template is created.", + "description": [ + "The `onCheckoutTemplateCreated()` event handler runs when a checkout template is created. The received `CheckoutTemplateCreated` object contains information about the checkout template that was created and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { - "title": "onCheckoutTemplateCheckoutCreated example", + "title": "onCheckoutTemplateCreated example", "body": [ "", - " export function wixEcom_onCheckoutTemplateCheckoutCreated(event) {", + " export function wixEcom_onCheckoutTemplateCreated(event) {", " const eventId = event.metadata.id", - " const entityId = event.data.checkoutTemplate._id;", + " const entityId = event.entity._id;", " }", "", " " @@ -1592,20 +1602,20 @@ "id": "maturity-beta" } ], - "syntaxName": "wixEcom_onCheckoutTemplateCheckoutCreated" + "syntaxName": "wixEcom_onCheckoutTemplateCreated" }, { - "name": "onCheckoutTemplateCreated", + "name": "onCheckoutTemplateDeleted", "params": [ { "name": "event", "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateCreated", - "displayName": "CheckoutTemplateCreated" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateDeleted", + "displayName": "CheckoutTemplateDeleted" } ], - "doc": "", + "doc": "Information about the checkout template that was deleted and event metadata.\n", "required": false } ], @@ -1619,14 +1629,16 @@ "doc": null }, "docs": { - "summary": "Triggered when a checkout template is created.", - "description": [], + "summary": "Triggered when a checkout template is deleted.", + "description": [ + "The `onCheckoutTemplateDeleted()` event handler runs when a checkout template is deleted. The received `CheckoutTemplateDeleted` object contains information about the checkout template that was deleted and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { - "title": "onCheckoutTemplateCreated example", + "title": "onCheckoutTemplateDeleted example", "body": [ "", - " export function wixEcom_onCheckoutTemplateCreated(event) {", + " export function wixEcom_onCheckoutTemplateDeleted(event) {", " const eventId = event.metadata.id", " const entityId = event.entity._id;", " }", @@ -1642,20 +1654,20 @@ "id": "maturity-beta" } ], - "syntaxName": "wixEcom_onCheckoutTemplateCreated" + "syntaxName": "wixEcom_onCheckoutTemplateDeleted" }, { - "name": "onCheckoutTemplateDeleted", + "name": "onCheckoutTemplateUpdated", "params": [ { "name": "event", "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateDeleted", - "displayName": "CheckoutTemplateDeleted" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateUpdated", + "displayName": "CheckoutTemplateUpdated" } ], - "doc": "", + "doc": "Information about the checkout template that was updated and event metadata.\n", "required": false } ], @@ -1669,14 +1681,16 @@ "doc": null }, "docs": { - "summary": "Triggered when a checkout template is deleted.", - "description": [], + "summary": "Triggered when a checkout template is updated.", + "description": [ + "The `onCheckoutTemplateUpdated()` event handler runs when a checkout template is updated. The received `CheckoutTemplateUpdated` object contains information about the checkout template that was updated and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { - "title": "onCheckoutTemplateDeleted example", + "title": "onCheckoutTemplateUpdated example", "body": [ "", - " export function wixEcom_onCheckoutTemplateDeleted(event) {", + " export function wixEcom_onCheckoutTemplateUpdated(event) {", " const eventId = event.metadata.id", " const entityId = event.entity._id;", " }", @@ -1692,20 +1706,20 @@ "id": "maturity-beta" } ], - "syntaxName": "wixEcom_onCheckoutTemplateDeleted" + "syntaxName": "wixEcom_onCheckoutTemplateUpdated" }, { - "name": "onCheckoutTemplateUpdated", + "name": "onCheckoutTemplateUsed", "params": [ { "name": "event", "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateUpdated", - "displayName": "CheckoutTemplateUpdated" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateUsedEvent", + "displayName": "CheckoutTemplateUsedEvent" } ], - "doc": "", + "doc": "Information about the checkout template that was used to create a checkout and event metadata.\n", "required": false } ], @@ -1719,16 +1733,18 @@ "doc": null }, "docs": { - "summary": "Triggered when a checkout template is updated.", - "description": [], + "summary": "Triggered when a checkout template is used to create a checkout.", + "description": [ + "The `onCheckoutTemplateUsed()` event handler runs when a checkout template is created. The received `CheckoutTemplateUsedEvent` object contains information about the checkout template that was used, the checkout that was created, and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { - "title": "onCheckoutTemplateUpdated example", + "title": "onCheckoutTemplateUsed example", "body": [ "", - " export function wixEcom_onCheckoutTemplateUpdated(event) {", + " export function wixEcom_onCheckoutTemplateUsed(event) {", " const eventId = event.metadata.id", - " const entityId = event.entity._id;", + " const entityId = event.data.checkoutTemplate._id;", " }", "", " " @@ -1742,7 +1758,7 @@ "id": "maturity-beta" } ], - "syntaxName": "wixEcom_onCheckoutTemplateUpdated" + "syntaxName": "wixEcom_onCheckoutTemplateUsed" }, { "name": "onCheckoutUpdated", @@ -1805,7 +1821,7 @@ " * \"quantity\": 3,", " * \"catalogReference\": {", " * \"catalogItemId\": \"c8539b66-7a44-fe18-affc-afec4be8562a\",", - " * \"appId\": \"1380b703-ce81-ff05-f115-39571d94dfcd\"", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\"", " * },", " * \"productName\": {", " * \"original\": \"Shirt\",", @@ -2622,7 +2638,6 @@ " * \"checkoutId\": \"62d01935-e0d3-4063-9e78-da099462e90c\",", " * \"customFields\": [],", " * \"cartId\": \"52fec024-4379-4a96-9237-9660030be6fe\",", - " * \"isInternalOrderCreate\": false,", " * \"payNow\": {", " * \"subtotal\": {", " * \"amount\": \"48.75\",", @@ -2669,11 +2684,6 @@ ] }, "isVeloEvent": true, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "wixEcom_onOrderApproved" }, { @@ -2687,7 +2697,7 @@ "displayName": "OrderCanceled" } ], - "doc": "Order canceled", + "doc": "Information about the order that was canceled.\n", "required": false } ], @@ -2702,7 +2712,9 @@ }, "docs": { "summary": "Triggered when an order is canceled.", - "description": [], + "description": [ + "The `onOrderCanceled()` event handler runs when an order is canceled. The received `OrderCanceled` object contains information about the order that was canceled, details related to the cancelation, and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "An event fired when an order is canceled ", @@ -2991,7 +3003,6 @@ " * \"checkoutId\": \"9f24eba1-5b05-4c9e-90c5-1789a8239912\",", " * \"customFields\": [],", " * \"cartId\": \"eb8086a0-9389-4e92-91cb-5ce7bd9b3db8\",", - " * \"isInternalOrderCreate\": false,", " * \"payNow\": {", " * \"subtotal\": {", " * \"amount\": \"30.00\",", @@ -3045,12 +3056,456 @@ ] }, "isVeloEvent": true, + "syntaxName": "wixEcom_onOrderCanceled" + }, + { + "name": "onOrderCreated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderOrderCreated", + "displayName": "OrderCreated" + } + ], + "doc": "Information about the order that was created.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "Triggered when an order is created.", + "description": [ + "The `onOrderCreated()` event handler runs when an order is created. The received `OrderCreated` object contains information about the order that was created and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], + "examples": [ + { + "title": "onOrderCreated example", + "body": [ + "", + " export function wixEcom_onOrderCreated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "syntaxName": "wixEcom_onOrderCreated" + }, + { + "name": "onOrderPaymentStatusUpdated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderOrderPaymentStatusUpdated", + "displayName": "OrderPaymentStatusUpdated" + } + ], + "doc": "Information about the updated order.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "Triggered when an order's payment status is updated to `\"PAID\"`.", + "description": [ + "The `onOrderPaymentStatusUpdated()` event handler runs when an order's payment status is updated to `\"PAID\"`. The received `OrderPaymentStatusUpdated ` object contains information about the order, the previous payment status, and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], + "examples": [ + { + "title": "An event fired when an order's payment status is updated ", + "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", + "", + "export function wixEcom_onOrderPaymentStatusUpdated(event) {", + " const orderId = event.data.order._id;", + " const currentPaymentStatus = event.data.order.paymentStatus;", + " const previousPaymentStatus = event.data.previousPaymentStatus;", + " const orderTotalPrice = event.data.order.priceSummary.totalPrice.amount;", + " const eventId = event.metadata.id;", + " console.log('Order payment status updated', event)", + "}", + "", + "", + "/* Full event object:", + " *", + " * {", + " * \"metadata\": {", + " * \"id\": \"5a521f73-0824-40b8-af4c-86da30219db8\",", + " * \"entityId\": \"7a8b195e-ab73-4138-b9da-cdf5e864a451\",", + " * \"eventTime\": \"2023-01-16T14:40:02.119716Z\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", + " * \"data\": {", + " * \"order\": {", + " * \"_id\": \"7a8b195e-ab73-4138-b9da-cdf5e864a451\",", + " * \"number\": \"10003\",", + " * \"_createdDate\": \"2023-01-16T13:53:10.776Z\",", + " * \"_updatedDate\": \"2023-01-16T14:40:01.997Z\",", + " * \"lineItems\": [", + " * {", + " * \"_id\": \"00000000-0000-0000-0000-000000000001\",", + " * \"productName\": {", + " * \"original\": \"Watch\",", + " * \"translated\": \"Watch\"", + " * },", + " * \"catalogReference\": {", + " * \"catalogItemId\": \"1a2d7e83-4bef-31d5-09e1-3326ee271c09\",", + " * \"appId\": \"215238eb-22a5-4c36-9e7b-e7c08025e04e\",", + " * \"options\": {", + " * \"options\": {", + " * \"Size\": \"Medium\",", + " * \"Color\": \"Black\"", + " * },", + " * \"variantId\": \"e309b2f2-2166-4927-a137-0e5dfb870627\"", + " * }", + " * },", + " * \"quantity\": 1,", + " * \"totalDiscount\": {", + " * \"amount\": \"0\",", + " * \"formattedAmount\": \"$0.00\"", + " * },", + " * \"descriptionLines\": [", + " * {", + " * \"name\": {", + " * \"original\": \"Size\",", + " * \"translated\": \"Size\"", + " * },", + " * \"plainText\": {", + " * \"original\": \"Medium\",", + " * \"translated\": \"Medium\"", + " * },", + " * \"lineType\": \"PLAIN_TEXT\",", + " * \"plainTextValue\": {", + " * \"original\": \"Medium\",", + " * \"translated\": \"Medium\"", + " * }", + " * },", + " * {", + " * \"name\": {", + " * \"original\": \"Color\",", + " * \"translated\": \"Color\"", + " * },", + " * \"colorInfo\": {", + " * \"original\": \"Black\",", + " * \"translated\": \"Black\"", + " * },", + " * \"lineType\": \"COLOR\",", + " * \"color\": \"Black\"", + " * }", + " * ],", + " * \"image\": \"wix:image://v1/3c76e2_8891bbe3372a428aac976ac59aa0ac74~mv2.jpg#originWidth=1000&originHeight=1000\",", + " * \"physicalProperties\": {", + " * \"sku\": \"217537123517253\",", + " * \"shippable\": true", + " * },", + " * \"itemType\": {", + " * \"preset\": \"PHYSICAL\"", + " * },", + " * \"refundQuantity\": 0,", + " * \"price\": {", + " * \"amount\": \"30.00\",", + " * \"formattedAmount\": \"$30.00\"", + " * },", + " * \"priceBeforeDiscounts\": {", + " * \"amount\": \"30.00\",", + " * \"formattedAmount\": \"$30.00\"", + " * },", + " * \"totalPriceBeforeTax\": {", + " * \"amount\": \"30.00\",", + " * \"formattedAmount\": \"$30.00\"", + " * },", + " * \"totalPriceAfterTax\": {", + " * \"amount\": \"30.00\",", + " * \"formattedAmount\": \"$30.00\"", + " * },", + " * \"paymentOption\": \"FULL_PAYMENT_ONLINE\",", + " * \"taxDetails\": {", + " * \"taxableAmount\": {", + " * \"amount\": \"30.00\",", + " * \"formattedAmount\": \"$30.00\"", + " * },", + " * \"taxRate\": \"0.0\",", + " * \"totalTax\": {", + " * \"amount\": \"0.0\",", + " * \"formattedAmount\": \"$0.00\"", + " * }", + " * }", + " * }", + " * ],", + " * \"buyerInfo\": {", + " * \"contactId\": \"24de6f0b-60ce-4faa-9138-2e39f1415615\",", + " * \"email\": \"janedoe8@gmail.com\",", + " * \"visitorId\": \"4c7ce95c-9fb3-417d-9f02-b41e82b841f7\"", + " * },", + " * \"paymentStatus\": \"PAID\",", + " * \"fulfillmentStatus\": \"NOT_FULFILLED\",", + " * \"buyerLanguage\": \"en\",", + " * \"weightUnit\": \"KG\",", + " * \"currency\": \"USD\",", + " * \"taxIncludedInPrices\": false,", + " * \"priceSummary\": {", + " * \"subtotal\": {", + " * \"amount\": \"30.00\",", + " * \"formattedAmount\": \"$30.00\"", + " * },", + " * \"shipping\": {", + " * \"amount\": \"10.0\",", + " * \"formattedAmount\": \"$10.00\"", + " * },", + " * \"tax\": {", + " * \"amount\": \"0.0\",", + " * \"formattedAmount\": \"$0.00\"", + " * },", + " * \"discount\": {", + " * \"amount\": \"0.0\",", + " * \"formattedAmount\": \"$0.00\"", + " * },", + " * \"totalPrice\": {", + " * \"amount\": \"40.00\",", + " * \"formattedAmount\": \"$40.00\"", + " * },", + " * \"total\": {", + " * \"amount\": \"40.00\",", + " * \"formattedAmount\": \"$40.00\"", + " * },", + " * \"totalWithGiftCard\": {", + " * \"amount\": \"40.00\",", + " * \"formattedAmount\": \"$40.00\"", + " * },", + " * \"totalWithoutGiftCard\": {", + " * \"amount\": \"40.00\",", + " * \"formattedAmount\": \"$40.00\"", + " * },", + " * \"totalAdditionalFees\": {", + " * \"amount\": \"0\",", + " * \"formattedAmount\": \"$0.00\"", + " * }", + " * },", + " * \"billingInfo\": {", + " * \"address\": {", + " * \"addressLine1\": \"525 5th Avenue\",", + " * \"city\": \"New York\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10173\"", + " * },", + " * \"contactDetails\": {", + " * \"firstName\": \"Jane\",", + " * \"lastName\": \"Doe\",", + " * \"phone\": \"0555555555\"", + " * }", + " * },", + " * \"shippingInfo\": {", + " * \"carrierId\": \"c8a08776-c095-4dec-8553-8f9698d86adc\",", + " * \"code\": \"ed5bbce2-9533-dff4-7db0-13702fd139c5\",", + " * \"title\": \"Standard US Shipping\",", + " * \"logistics\": {", + " * \"deliveryTime\": \"\",", + " * \"shippingDestination\": {", + " * \"address\": {", + " * \"addressLine1\": \"525 5th Avenue\",", + " * \"city\": \"New York\",", + " * \"subdivision\": \"US-NY\",", + " * \"country\": \"US\",", + " * \"postalCode\": \"10173\"", + " * },", + " * \"contactDetails\": {", + " * \"firstName\": \"Jane\",", + " * \"lastName\": \"Doe\",", + " * \"phone\": \"0555555555\"", + " * }", + " * }", + " * },", + " * \"cost\": {", + " * \"price\": {", + " * \"amount\": \"10\",", + " * \"formattedAmount\": \"$10.00\"", + " * },", + " * \"totalPriceBeforeTax\": {", + " * \"amount\": \"10\",", + " * \"formattedAmount\": \"$10.00\"", + " * },", + " * \"totalPriceAfterTax\": {", + " * \"amount\": \"10.0\",", + " * \"formattedAmount\": \"$10.00\"", + " * },", + " * \"taxDetails\": {", + " * \"taxRate\": \"0.0\",", + " * \"totalTax\": {", + " * \"amount\": \"0.0\",", + " * \"formattedAmount\": \"$0.00\"", + " * }", + " * },", + " * \"discount\": {", + " * \"amount\": \"0\",", + " * \"formattedAmount\": \"$0.00\"", + " * }", + " * },", + " * \"region\": {", + " * \"name\": \"USA shipping\"", + " * }", + " * },", + " * \"status\": \"APPROVED\",", + " * \"archived\": false,", + " * \"taxSummary\": {", + " * \"totalTax\": {", + " * \"amount\": \"0.0\",", + " * \"formattedAmount\": \"$0.00\"", + " * }", + " * },", + " * \"appliedDiscounts\": [],", + " * \"activities\": [", + " * {", + " * \"_createdDate\": \"2023-01-16T13:53:10.776Z\",", + " * \"type\": \"ORDER_PLACED\"", + " * },", + " * {", + " * \"_createdDate\": \"2023-01-16T14:38:48.249Z\",", + " * \"type\": \"EMAIL_EDITED\"", + " * }", + " * ],", + " * \"attributionSource\": \"UNSPECIFIED\",", + " * \"createdBy\": {", + " * \"visitorId\": \"4c7ce95c-9fb3-417d-9f02-b41e82b841f7\"", + " * },", + " * \"channelInfo\": {", + " * \"type\": \"WEB\"", + " * },", + " * \"seenByAHuman\": true,", + " * \"checkoutId\": \"9f24eba1-5b05-4c9e-90c5-1789a8239912\",", + " * \"customFields\": [],", + " * \"cartId\": \"eb8086a0-9389-4e92-91cb-5ce7bd9b3db8\",", + " * \"payNow\": {", + " * \"subtotal\": {", + " * \"amount\": \"30.00\",", + " * \"formattedAmount\": \"$30.00\"", + " * },", + " * \"shipping\": {", + " * \"amount\": \"10.0\",", + " * \"formattedAmount\": \"$10.00\"", + " * },", + " * \"tax\": {", + " * \"amount\": \"0.0\",", + " * \"formattedAmount\": \"$0.00\"", + " * },", + " * \"discount\": {", + " * \"amount\": \"0.0\",", + " * \"formattedAmount\": \"$0.00\"", + " * },", + " * \"totalPrice\": {", + " * \"amount\": \"40.00\",", + " * \"formattedAmount\": \"$40.00\"", + " * },", + " * \"total\": {", + " * \"amount\": \"40.00\",", + " * \"formattedAmount\": \"$40.00\"", + " * },", + " * \"totalWithGiftCard\": {", + " * \"amount\": \"40.00\",", + " * \"formattedAmount\": \"$40.00\"", + " * },", + " * \"totalWithoutGiftCard\": {", + " * \"amount\": \"40.00\",", + " * \"formattedAmount\": \"$40.00\"", + " * }", + " * },", + " * \"balanceSummary\": {", + " * \"balance\": {", + " * \"amount\": \"0.00\",", + " * \"formattedAmount\": \"$0.00\"", + " * }", + " * },", + " * \"additionalFees\": []", + " * },", + " * \"previousPaymentStatus\": \"NOT_PAID\"", + " * }", + " * }", + " *", + " */" + ] + } + ] + }, + "isVeloEvent": true, + "syntaxName": "wixEcom_onOrderPaymentStatusUpdated" + }, + { + "name": "onOrderTransactionsUpdated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsOrderTransactionsUpdated", + "displayName": "OrderTransactionsUpdated" + } + ], + "doc": "Information about the transaction that was updated and event metadata.\n", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "Triggered when a payment or refund is added to an order, or when an existing payment is updated.", + "description": [ + "The `onOrderTransactionsUpdated()` event handler runs when a new a payment or refund is added to an order, or when an existing payment is updated. The received `OrderTransactionsUpdated` object contains information about the updated order transactions, and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], + "examples": [ + { + "title": "onOrderTransactionsUpdated example", + "body": [ + "", + " export function wixEcom_onOrderTransactionsUpdated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, "customLabels": [ { "id": "maturity-beta" } ], - "syntaxName": "wixEcom_onOrderCanceled" + "syntaxName": "wixEcom_onOrderTransactionsUpdated" }, { "name": "onOrderUpdated", @@ -3063,7 +3518,7 @@ "displayName": "OrderUpdated" } ], - "doc": "", + "doc": "Information about the order that was updated.\n", "required": false } ], @@ -3077,8 +3532,10 @@ "doc": null }, "docs": { - "summary": "Triggered when an order is updated.\nLearn more about [eCommerce webhook payload structure](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/order-object-conversion#webhook-conversion-table).", - "description": [], + "summary": "Triggered when an order is updated.", + "description": [ + "The `onOrderUpdated()` event handler runs when an order is updated. The received `OrderUpdated` object contains information about the order that was updated and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "An event fired when an order is updated ", @@ -3339,7 +3796,6 @@ " * \"checkoutId\": \"9f24eba1-5b05-4c9e-90c5-1789a8239912\",", " * \"customFields\": [],", " * \"cartId\": \"eb8086a0-9389-4e92-91cb-5ce7bd9b3db8\",", - " * \"isInternalOrderCreate\": false,", " * \"payNow\": {", " * \"subtotal\": {", " * \"amount\": \"30.00\",", @@ -3390,11 +3846,6 @@ ] }, "isVeloEvent": true, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "wixEcom_onOrderUpdated" }, { @@ -3408,7 +3859,7 @@ "displayName": "OrdersSettingsUpdated" } ], - "doc": "", + "doc": "Information about the orders settings that were updated and event metadata.\n", "required": false } ], @@ -3422,8 +3873,10 @@ "doc": null }, "docs": { - "summary": "Triggered when orders settings are updated.", - "description": [], + "summary": "Triggered when order settings are updated.", + "description": [ + "The `onOrdersSettingsUpdated()` event handler runs when order settings are updated. The received `OrdersSettingsUpdated` object contains information about the order settings that were updated and event metadata.\n\n>**Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onOrdersSettingsUpdated example", @@ -3763,7 +4216,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -3773,7 +4226,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -3783,12 +4236,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -4371,7 +4824,7 @@ "displayName": "DiscountRule" } ], - "doc": "" + "doc": "Created discount rule." }, { "name": "metadata", @@ -4381,7 +4834,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -4401,7 +4854,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -4451,7 +4904,7 @@ "displayName": "DiscountRule" } ], - "doc": "" + "doc": "Updated discount rule." }, { "name": "metadata", @@ -4461,7 +4914,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -4955,7 +5408,18 @@ }, { "name": "ecomDiscountsV1DiscountRuleEntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -5003,7 +5467,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -5032,6 +5496,16 @@ } ], "doc": "Line items for which to check for discount rules." + }, + { + "name": "purchaseFlowId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" } ], "docs": { @@ -6137,446 +6611,6 @@ ] } }, - { - "name": "ecomV1AbandonedCheckoutAggregation", - "members": [ - { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutDateHistogramAggregation", - "displayName": "DateHistogramAggregation" - } - ], - "doc": "" - }, - { - "name": "fieldPath", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "groupBy", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutGroupByAggregation", - "displayName": "GroupByAggregation" - } - ], - "doc": "" - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "nested", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutNestedAggregation", - "displayName": "NestedAggregation" - } - ], - "doc": "" - }, - { - "name": "range", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeAggregation", - "displayName": "RangeAggregation" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutScalarAggregation", - "displayName": "ScalarAggregation" - } - ], - "doc": "" - }, - { - "name": "type", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'NESTED'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueAggregation", - "displayName": "ValueAggregation" - } - ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfAggregationKindOneOf", - "members": [ - "dateHistogram", - "nested", - "range", - "scalar", - "value" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutAggregationData", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutAggregationResults", - "displayName": "AggregationResults" - } - ] - } - } - ], - "doc": "key = aggregation name (as derived from search request)" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutAggregationKindOneOf", - "members": [ - { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutDateHistogramAggregation", - "displayName": "DateHistogramAggregation" - } - ], - "doc": "" - }, - { - "name": "nested", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutNestedAggregation", - "displayName": "NestedAggregation" - } - ], - "doc": "" - }, - { - "name": "range", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeAggregation", - "displayName": "RangeAggregation" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutScalarAggregation", - "displayName": "ScalarAggregation" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueAggregation", - "displayName": "ValueAggregation" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutAggregationResults", - "members": [ - { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutDateHistogramResults", - "displayName": "DateHistogramResults" - } - ], - "doc": "" - }, - { - "name": "fieldPath", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "groupedByValue", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutGroupByValueResults", - "displayName": "GroupByValueResults" - } - ], - "doc": "" - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "nested", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutNestedResults", - "displayName": "NestedResults" - } - ], - "doc": "" - }, - { - "name": "ranges", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeResults", - "displayName": "RangeResults" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutAggregationResultsScalarResult", - "displayName": "AggregationResultsScalarResult" - } - ], - "doc": "" - }, - { - "name": "type", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'NESTED'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" - }, - { - "name": "values", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueResults", - "displayName": "ValueResults" - } - ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfAggregationResultsResultOneOf", - "members": [ - "dateHistogram", - "groupedByValue", - "nested", - "ranges", - "scalar", - "values" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutAggregationResultsResultOneOf", - "members": [ - { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutDateHistogramResults", - "displayName": "DateHistogramResults" - } - ], - "doc": "" - }, - { - "name": "groupedByValue", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutGroupByValueResults", - "displayName": "GroupByValueResults" - } - ], - "doc": "" - }, - { - "name": "nested", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutNestedResults", - "displayName": "NestedResults" - } - ], - "doc": "" - }, - { - "name": "ranges", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeResults", - "displayName": "RangeResults" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutAggregationResultsScalarResult", - "displayName": "AggregationResultsScalarResult" - } - ], - "doc": "" - }, - { - "name": "values", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueResults", - "displayName": "ValueResults" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutAggregationResultsScalarResult", - "members": [ - { - "name": "type", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'AVG'`\n- `'COUNT_DISTINCT'`\n- `'MAX'`\n- `'MIN'`\n- `'SUM'`\n- `'UNKNOWN_SCALAR_TYPE'`" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1AbandonedCheckoutBackendEventMetadata", "members": [ @@ -6850,16 +6884,7 @@ } }, { - "name": "ecomV1AbandonedCheckoutComplete", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutCursorPaging", + "name": "ecomV1AbandonedCheckoutCommonCursorPaging", "members": [ { "name": "cursor", @@ -6889,38 +6914,57 @@ } }, { - "name": "ecomV1AbandonedCheckoutCursorPagingMetadata", + "name": "ecomV1AbandonedCheckoutCommonCursors", "members": [ { - "name": "count", + "name": "next", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items returned in the response." + "doc": "Cursor string pointing to the next page in the list of results." }, { - "name": "cursors", + "name": "prev", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCursors", - "displayName": "Cursors" + "nativeType": "string" } ], - "doc": "Cursor strings that point to the next page, previous page, or both." + "doc": "Cursor pointing to the previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1AbandonedCheckoutCommonPaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." }, { - "name": "hasNext", + "name": "offset", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page.\n" + "doc": "Number of items to skip in the current sort order." } ], "docs": { @@ -6930,106 +6974,58 @@ } }, { - "name": "ecomV1AbandonedCheckoutCursorSearch", + "name": "ecomV1AbandonedCheckoutCommonPagingMetadataV2", "members": [ { - "name": "aggregations", + "name": "count", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutAggregation", - "displayName": "Aggregation" - } - ] - } + "nativeType": "number" } ], - "doc": "Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition." + "doc": "Number of items returned in the response." }, { - "name": "cursorPaging", + "name": "cursors", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCursorPaging", - "displayName": "CursorPaging" + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCommonCursors", + "displayName": "CommonCursors" } ], - "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." }, { - "name": "filter", + "name": "offset", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "number" } ], - "doc": "A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)" + "doc": "Offset that was requested." }, { - "name": "search", + "name": "tooManyToCount", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutSearchDetails", - "displayName": "SearchDetails" + "nativeType": "boolean" } ], - "doc": "free text to match in searchable fields" + "doc": "Flag that indicates the server failed to calculate the `total` field." }, { - "name": "sort", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutSorting", - "displayName": "Sorting" - } - ] - } - } - ], - "doc": "Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCursorSearchPagingMethodOneOf", - "members": [ - "cursorPaging" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutCursorSearchPagingMethodOneOf", - "members": [ - { - "name": "cursorPaging", + "name": "total", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCursorPaging", - "displayName": "CursorPaging" + "nativeType": "number" } ], - "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." } ], "docs": { @@ -7039,27 +7035,27 @@ } }, { - "name": "ecomV1AbandonedCheckoutCursors", + "name": "ecomV1AbandonedCheckoutCommonSorting", "members": [ { - "name": "next", + "name": "fieldName", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor string pointing to the next page in the list of results." + "doc": "Name of the field to sort by." }, { - "name": "prev", + "name": "order", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to the previous page in the list of results." + "doc": "Sort order." } ], "docs": { @@ -7069,19 +7065,8 @@ } }, { - "name": "ecomV1AbandonedCheckoutDateHistogramAggregation", - "members": [ - { - "name": "interval", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'DAY'`\n- `'HOUR'`\n- `'MINUTE'`\n- `'MONTH'`\n- `'SECOND'`\n- `'UNKNOWN_INTERVAL'`\n- `'WEEK'`\n- `'YEAR'`" - } - ], + "name": "ecomV1AbandonedCheckoutComplete", + "members": [], "docs": { "description": [ "" @@ -7089,27 +7074,27 @@ } }, { - "name": "ecomV1AbandonedCheckoutDateHistogramResult", + "name": "ecomV1AbandonedCheckoutCursorPaging", "members": [ { - "name": "count", + "name": "cursor", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { - "name": "value", + "name": "limit", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "" + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -7119,25 +7104,27 @@ } }, { - "name": "ecomV1AbandonedCheckoutDateHistogramResults", + "name": "ecomV1AbandonedCheckoutCursors", "members": [ { - "name": "results", + "name": "next", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutDateHistogramResult", - "displayName": "DateHistogramResult" - } - ] - } + "nativeType": "string" } ], - "doc": "" + "doc": "Cursor string pointing to the next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -7378,7 +7365,18 @@ }, { "name": "ecomV1AbandonedCheckoutEntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -7506,106 +7504,6 @@ ] } }, - { - "name": "ecomV1AbandonedCheckoutGroupByAggregation", - "members": [ - { - "name": "fieldPath", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueAggregation", - "displayName": "ValueAggregation" - } - ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfGroupByAggregationKindOneOf", - "members": [ - "value" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutGroupByAggregationKindOneOf", - "members": [ - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueAggregation", - "displayName": "ValueAggregation" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutGroupByValueResults", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutNestedValueAggregationResult", - "displayName": "NestedValueAggregationResult" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1AbandonedCheckoutHeadersEntry", "members": [ @@ -7636,26 +7534,6 @@ ] } }, - { - "name": "ecomV1AbandonedCheckoutIncludeMissingValuesOptions", - "members": [ - { - "name": "addToBucket", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "can specify custom bucket name. Defaults are [string -> \"N/A\"], [int -> \"0\"], [bool -> \"false\"] ..." - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1AbandonedCheckoutMultiCurrencyPrice", "members": [ @@ -7709,493 +7587,6 @@ ] } }, - { - "name": "ecomV1AbandonedCheckoutNestedAggregation", - "members": [ - { - "name": "nestedAggregations", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutNestedAggregationItem", - "displayName": "NestedAggregationItem" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutNestedAggregationItem", - "members": [ - { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutDateHistogramAggregation", - "displayName": "DateHistogramAggregation" - } - ], - "doc": "" - }, - { - "name": "fieldPath", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "range", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeAggregation", - "displayName": "RangeAggregation" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutScalarAggregation", - "displayName": "ScalarAggregation" - } - ], - "doc": "" - }, - { - "name": "type", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueAggregation", - "displayName": "ValueAggregation" - } - ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfNestedAggregationItemKindOneOf", - "members": [ - "dateHistogram", - "range", - "scalar", - "value" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutNestedAggregationItemKindOneOf", - "members": [ - { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutDateHistogramAggregation", - "displayName": "DateHistogramAggregation" - } - ], - "doc": "" - }, - { - "name": "range", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeAggregation", - "displayName": "RangeAggregation" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutScalarAggregation", - "displayName": "ScalarAggregation" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueAggregation", - "displayName": "ValueAggregation" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutNestedAggregationResults", - "members": [ - { - "name": "fieldPath", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "ranges", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeResults", - "displayName": "RangeResults" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutAggregationResultsScalarResult", - "displayName": "AggregationResultsScalarResult" - } - ], - "doc": "" - }, - { - "name": "type", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'NESTED'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" - }, - { - "name": "values", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueResults", - "displayName": "ValueResults" - } - ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfNestedAggregationResultsResultOneOf", - "members": [ - "ranges", - "scalar", - "values" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutNestedAggregationResultsResultOneOf", - "members": [ - { - "name": "ranges", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeResults", - "displayName": "RangeResults" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutAggregationResultsScalarResult", - "displayName": "AggregationResultsScalarResult" - } - ], - "doc": "" - }, - { - "name": "values", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueResults", - "displayName": "ValueResults" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutNestedResultValue", - "members": [ - { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueResult", - "displayName": "ValueResult" - } - ], - "doc": "" - }, - { - "name": "range", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeResult", - "displayName": "RangeResult" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutScalarResult", - "displayName": "ScalarResult" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueResult", - "displayName": "ValueResult" - } - ], - "doc": "" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfNestedResultValueResultOneOf", - "members": [ - "dateHistogram", - "range", - "scalar", - "value" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutNestedResultValueResultOneOf", - "members": [ - { - "name": "dateHistogram", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueResult", - "displayName": "ValueResult" - } - ], - "doc": "" - }, - { - "name": "range", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeResult", - "displayName": "RangeResult" - } - ], - "doc": "" - }, - { - "name": "scalar", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutScalarResult", - "displayName": "ScalarResult" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueResult", - "displayName": "ValueResult" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutNestedResults", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutResults", - "displayName": "Results" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "results of `NESTED` aggregation type in a flattened form\naggregations in resulting array are keyed by requested aggregation `name`." - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutNestedValueAggregationResult", - "members": [ - { - "name": "nestedResults", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutNestedAggregationResults", - "displayName": "NestedAggregationResults" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1AbandonedCheckoutPaging", "members": [ @@ -8501,172 +7892,6 @@ ] } }, - { - "name": "ecomV1AbandonedCheckoutRangeAggregation", - "members": [ - { - "name": "buckets", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeBucket", - "displayName": "RangeBucket" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutRangeAggregationResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "from", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "to", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutRangeBucket", - "members": [ - { - "name": "from", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Inclusive lower bound of the range. Required if to is not given." - }, - { - "name": "to", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Exclusive upper bound of the range. Required if from is not given." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutRangeResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "from", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "to", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutRangeResults", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutRangeAggregationResult", - "displayName": "RangeAggregationResult" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1AbandonedCheckoutRawHttpResponse", "members": [ @@ -8802,70 +8027,81 @@ } }, { - "name": "ecomV1AbandonedCheckoutResults", + "name": "ecomV1AbandonedCheckoutSearch", "members": [ { - "name": "results", + "name": "cursorPaging", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutNestedResultValue", - "displayName": "NestedResultValue" - } - ] - } + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCommonCursorPaging", + "displayName": "CommonCursorPaging" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutScalarAggregation", - "members": [ + "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + }, { - "name": "type", + "name": "filter", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Object" } ], - "doc": "Supported values:\n- `'AVG'`\n- `'COUNT_DISTINCT'`\n- `'MAX'`\n- `'MIN'`\n- `'SUM'`\n- `'UNKNOWN_SCALAR_TYPE'`" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutScalarResult", - "members": [ + "doc": "A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)" + }, { - "name": "value", + "name": "paging", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCommonPaging", + "displayName": "CommonPaging" } ], - "doc": "" + "doc": "Pointer to page of results using offset. Can not be used together with 'cursor_paging'" + }, + { + "name": "search", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutSearchDetails", + "displayName": "SearchDetails" + } + ], + "doc": "free text to match in searchable fields" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCommonSorting", + "displayName": "CommonSorting" + } + ] + } + } + ], + "doc": "Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSearchPagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, "docs": { "description": [ "" @@ -8880,8 +8116,8 @@ "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCursorSearch", - "displayName": "CursorSearch" + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutSearch", + "displayName": "Search" } ], "doc": "WQL query expression." @@ -8914,24 +8150,13 @@ ], "doc": "List of abandoned checkouts." }, - { - "name": "aggregationData", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutAggregationData", - "displayName": "AggregationData" - } - ], - "doc": "Aggregation data." - }, { "name": "pagingMetadata", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCursorPagingMetadata", - "displayName": "CursorPagingMetadata" + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCommonPagingMetadataV2", + "displayName": "CommonPagingMetadataV2" } ], "doc": "Paging metadata. Contains cursor which can be used in next query." @@ -9000,6 +8225,38 @@ ] } }, + { + "name": "ecomV1AbandonedCheckoutSearchPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCommonCursorPaging", + "displayName": "CommonCursorPaging" + } + ], + "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutCommonPaging", + "displayName": "CommonPaging" + } + ], + "doc": "Pointer to page of results using offset. Can not be used together with 'cursor_paging'" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1AbandonedCheckoutSorting", "members": [ @@ -9362,186 +8619,6 @@ ] } }, - { - "name": "ecomV1AbandonedCheckoutValueAggregation", - "members": [ - { - "name": "includeOptions", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutIncludeMissingValuesOptions", - "displayName": "IncludeMissingValuesOptions" - } - ], - "doc": "options for including missing values" - }, - { - "name": "limit", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "How many aggregations would you like to return? Can be between 1 and 250. 10 is the default." - }, - { - "name": "missingValues", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "should missing values be included or excluded from the aggregation results. Default is EXCLUDE" - }, - { - "name": "sortDirection", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'ASC'`\n- `'DESC'`" - }, - { - "name": "sortType", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'COUNT'`\n- `'VALUE'`" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfValueAggregationOptionsOneOf", - "members": [ - "includeOptions" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutValueAggregationOptionsOneOf", - "members": [ - { - "name": "includeOptions", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutIncludeMissingValuesOptions", - "displayName": "IncludeMissingValuesOptions" - } - ], - "doc": "options for including missing values" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutValueAggregationResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutValueResult", - "members": [ - { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "value", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1AbandonedCheckoutValueResults", - "members": [ - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1AbandonedCheckoutValueAggregationResult", - "displayName": "ValueAggregationResult" - } - ] - } - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1AbandonedCheckoutVatId", "members": [ @@ -9769,7 +8846,7 @@ "displayName": "BackInStockNotificationRequest" } ], - "doc": "" + "doc": "The back in stock notification request that was created." }, { "name": "metadata", @@ -9779,7 +8856,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -9799,7 +8876,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -9819,7 +8896,7 @@ "displayName": "BackInStockNotificationRequest" } ], - "doc": "" + "doc": "The back in stock notification request that was updated." }, { "name": "metadata", @@ -9829,7 +8906,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -9926,7 +9003,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -9936,7 +9013,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -9946,12 +9023,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -10017,7 +9094,7 @@ "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { "name": "limit", @@ -10027,7 +9104,7 @@ "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -10047,7 +9124,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." }, { "name": "prev", @@ -10057,7 +9134,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -10326,7 +9403,18 @@ }, { "name": "ecomV1BackInStockNotificationRequestEntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -11484,7 +10572,7 @@ "doc": "The sum of all the tax from line items that calculated by the tax identifiers." }, { - "name": "jurisdictionName", + "name": "jurisdiction", "optional": true, "type": [ { @@ -11521,7 +10609,7 @@ "nativeType": "string" } ], - "doc": "The rate at which this tax detail was calculated, a number between 0.0 to 1.0." + "doc": "The rate at which this tax detail was calculated." }, { "name": "taxType", @@ -11641,76 +10729,6 @@ ] } }, - { - "name": "ecomV1CartAppliedCoupon", - "members": [ - { - "name": "code", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon code" - }, - { - "name": "convertedDiscountValue", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Converted discount value" - }, - { - "name": "couponId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon internal ID" - }, - { - "name": "couponType", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Type (e.g., moneyOff, percentOff)" - }, - { - "name": "discountValue", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Discount value" - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Coupon name" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1CartAppliedDiscount", "members": [ @@ -11913,56 +10931,6 @@ ] } }, - { - "name": "ecomV1CartBuyerDetails", - "members": [ - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Email address" - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's first name" - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's last name" - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Phone number" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1CartBuyerInfo", "members": [ @@ -12588,155 +11556,6 @@ ] } }, - { - "name": "ecomV1CartCartAddress", - "members": [ - { - "name": "address", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartCommonAddress", - "displayName": "CommonAddress" - } - ], - "doc": "Address" - }, - { - "name": "contactDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartFullAddressContactDetails", - "displayName": "FullAddressContactDetails" - } - ], - "doc": "Contact details" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CartCartCompletedEvent", - "members": [ - { - "name": "appliedCoupon", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartAppliedCoupon", - "displayName": "AppliedCoupon" - } - ], - "doc": "Coupon applied to this cart" - }, - { - "name": "billingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartCartAddress", - "displayName": "CartAddress" - } - ], - "doc": "Customer's billing address" - }, - { - "name": "buyerInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartV1BuyerInfo", - "displayName": "V1BuyerInfo" - } - ], - "doc": "Customer's Wix ID" - }, - { - "name": "buyerNote", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Message from the customer" - }, - { - "name": "cartId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "completedTime", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Time the cart was created" - }, - { - "name": "currency", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartCurrency", - "displayName": "Currency" - } - ], - "doc": "Currency used for pricing in this store" - }, - { - "name": "shippingInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartShippingInfo", - "displayName": "ShippingInfo" - } - ], - "doc": "Cart shipping information" - }, - { - "name": "totals", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartTotals", - "displayName": "Totals" - } - ], - "doc": "Totals for order's line items" - }, - { - "name": "weightUnit", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Weight unit used in this store" - } - ], - "docs": { - "description": [ - "This webhook is triggered when a customer has completed their checkout. In most cases, an order will be created immediately and an Order Event webhook will also be triggered. In some cases, the payment provider may list the order as \"pending\" - and the order will not be created until the payment is listed as \"approved.\"" - ] - } - }, { "name": "ecomV1CartCartCreated", "members": [ @@ -12748,7 +11567,7 @@ "displayName": "Cart" } ], - "doc": "" + "doc": "Created cart." }, { "name": "metadata", @@ -12758,7 +11577,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -12778,7 +11597,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -12873,7 +11692,7 @@ "displayName": "Cart" } ], - "doc": "" + "doc": "Updated cart." }, { "name": "metadata", @@ -12883,7 +11702,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -12903,7 +11722,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -12913,7 +11732,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -12923,12 +11742,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -12953,7 +11772,7 @@ "nativeType": "string" } ], - "doc": "Description line color name in site's default language." + "doc": "Description line color name in the site's default language." }, { "name": "translated", @@ -12963,140 +11782,7 @@ "nativeType": "string" } ], - "doc": "Translated description line color name according to buyer language. Defaults to `original` when not provided." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CartCommonAddress", - "members": [ - { - "name": "addressLine", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Main address line, usually street and number as free text." - }, - { - "name": "addressLine1", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Main address line, usually street and number as free text." - }, - { - "name": "addressLine2", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." - }, - { - "name": "city", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "City name." - }, - { - "name": "country", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Country code." - }, - { - "name": "postalCode", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Zip/postal code." - }, - { - "name": "streetAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartStreetAddress", - "displayName": "StreetAddress" - } - ], - "doc": "Street name and number." - }, - { - "name": "subdivision", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCommonAddressStreetOneOf", - "members": [ - "addressLine", - "streetAddress" - ] - } - ] - }, - "docs": { - "description": [ - "Physical address" - ] - } - }, - { - "name": "ecomV1CartCommonAddressStreetOneOf", - "members": [ - { - "name": "addressLine", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Main address line, usually street and number as free text." - }, - { - "name": "streetAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartStreetAddress", - "displayName": "StreetAddress" - } - ], - "doc": "Street name and number." + "doc": "Description line color name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -13379,47 +12065,38 @@ } }, { - "name": "ecomV1CartCurrency", + "name": "ecomV1CartCustomLineItem", "members": [ { - "name": "code", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Currency code" + "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." }, { - "name": "symbol", + "name": "catalogReference", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.Events.ecomV1CartCatalogReference", + "displayName": "CatalogReference" } ], - "doc": "Currency symbol" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CartCustomLineItem", - "members": [ + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." + }, { - "name": "_id", + "name": "depositAmount", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." + "doc": "Optional - partial payment for the given item to be paid upfront during the checkout.\nEligible for catalog items with type `DEPOSIT_ONLINE`.\nIf omitted - item's price will not be split and is expected to be paid in single installment" }, { "name": "descriptionLines", @@ -13439,6 +12116,27 @@ ], "doc": "Custom line item description lines. Used for display purposes for the cart, checkout and order." }, + { + "name": "fullPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Item price **before** catalog-defined discount. Defaults to `price` when not provided." + }, + { + "name": "itemType", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CartItemType", + "displayName": "ItemType" + } + ], + "doc": "Required** - Item type. Either a preset type or custom." + }, { "name": "media", "optional": true, @@ -13459,6 +12157,16 @@ ], "doc": "Custom line item name." }, + { + "name": "paymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.\n+ `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n+ `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." + }, { "name": "physicalProperties", "optional": true, @@ -13468,7 +12176,7 @@ "displayName": "PhysicalProperties" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - Physical properties of the item. When relevant, contains information such as SKU and item weight." }, { "name": "price", @@ -13491,6 +12199,17 @@ ], "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." }, + { + "name": "productName", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CartProductName", + "displayName": "ProductName" + } + ], + "doc": "*Required** - Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" + }, { "name": "quantity", "optional": true, @@ -13501,6 +12220,37 @@ ], "doc": "Custom line item quantity.\n\nMin: `1`\nMax: `100000`\n" }, + { + "name": "quantityAvailable", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Optional - Item quantity available for purchase. Only return this if inventory is managed.\nNot returning this field means that the buyer can \"infinitely\" tick up the number of items in the cart." + }, + { + "name": "rootCatalogItemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n+ For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n+ in most cases, this field is the name as `catalogReference.catalogItemId`.\n+ Used in membership validation." + }, + { + "name": "serviceProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CartServiceProperties", + "displayName": "ServiceProperties" + } + ], + "doc": "Optional - Service properties. When relevant, this contains information such as date and number of participants.\nUsed, among other things, when checking for valid memberships." + }, { "name": "taxGroupId", "optional": true, @@ -13510,38 +12260,16 @@ } ], "doc": "Tax group ID for this custom line item." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCustomLineItemItemPropertiesOneOf", - "members": [ - "digitalFile", - "physicalProperties" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CartCustomLineItemItemPropertiesOneOf", - "members": [ + }, { - "name": "physicalProperties", + "name": "url", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CartPhysicalProperties", - "displayName": "PhysicalProperties" + "nativeType": "string" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.\nThe URL is optional and if not provided, the site URL will be used." } ], "docs": { @@ -13769,7 +12497,7 @@ "nativeType": "string" } ], - "doc": "Description line name in site's default language." + "doc": "Description line name in the site's default language." }, { "name": "translated", @@ -13779,7 +12507,7 @@ "nativeType": "string" } ], - "doc": "Translated description line item according to buyer language. Defaults to `original` when not provided." + "doc": "Description line name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -13834,6 +12562,17 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CartSystemError", + "displayName": "SystemError" + } + ], + "doc": "" + }, { "name": "tracing", "optional": true, @@ -13872,6 +12611,7 @@ "name": "oneOfDetailsKindOneOf", "members": [ "applicationError", + "systemError", "validationError" ] } @@ -13897,6 +12637,17 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CartSystemError", + "displayName": "SystemError" + } + ], + "doc": "" + }, { "name": "validationError", "optional": true, @@ -14219,7 +12970,18 @@ }, { "name": "ecomV1CartEntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -14588,7 +13350,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -14657,77 +13419,6 @@ ] } }, - { - "name": "ecomV1CartFullAddressContactDetails", - "members": [ - { - "name": "company", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's company name." - }, - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Email associated with the address." - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's first name." - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's last name." - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's phone number." - }, - { - "name": "vatId", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartVatId", - "displayName": "VatId" - } - ], - "doc": "Tax info. Currently usable only in Brazil." - } - ], - "docs": { - "description": [ - "Full contact details for an address" - ] - } - }, { "name": "ecomV1CartGetCartByCheckoutIdRequest", "members": [ @@ -15000,7 +13691,7 @@ } } ], - "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`." + "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead." }, { "name": "taxRate", @@ -15052,7 +13743,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -15093,7 +13784,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -15924,7 +14615,7 @@ "nativeType": "number" } ], - "doc": "Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`." + "doc": "Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request." } ], "docs": { @@ -15985,7 +14676,7 @@ "nativeType": "string" } ], - "doc": "Description line plain text value in site's default language." + "doc": "Description line plain text value in the site's default language." }, { "name": "translated", @@ -15995,7 +14686,7 @@ "nativeType": "string" } ], - "doc": "Translated description line plain text value according to buyer language. Defaults to `original` when not provided." + "doc": "Description line plain text value translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -16015,7 +14706,7 @@ "nativeType": "string" } ], - "doc": "Required.** Original price description in site's default language." + "doc": "__Required.__ Price description in the site's default language." }, { "name": "translated", @@ -16025,7 +14716,7 @@ "nativeType": "string" } ], - "doc": "Translated price description according to buyer language. Defaults to `original` when not provided." + "doc": "Price description translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -16121,7 +14812,7 @@ "nativeType": "string" } ], - "doc": "__Required.__ Original item name in site's default language.\nMin: 1 character\nMax: 200 characters" + "doc": "__Required.__ Item name in the site's default language.\n\nMin: 1 character.\nMax: 200 characters.\n" }, { "name": "translated", @@ -16131,7 +14822,7 @@ "nativeType": "string" } ], - "doc": "Optional. Translated item name according to buyer language. Defaults to `original` when not provided.\nMin: 1 character\nMax: 400 characters" + "doc": "Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`.\n" } ], "docs": { @@ -16313,7 +15004,7 @@ "nativeType": "string" } ], - "doc": "Media ID in media manager." + "doc": "Media ID in Wix Media Manager." }, { "name": "fileName", @@ -16323,7 +15014,7 @@ "nativeType": "string" } ], - "doc": "Original file name." + "doc": "Original filename." }, { "name": "fileType", @@ -16658,7 +15349,7 @@ "nativeType": "number" } ], - "doc": "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." + "doc": "The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room." }, { "name": "scheduledDate", @@ -16668,93 +15359,7 @@ "nativeType": "Date" } ], - "doc": "Date and time the service is supposed to be provided in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the time of the class." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CartShippingInfo", - "members": [ - { - "name": "pickupDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartV1PickupDetails", - "displayName": "V1PickupDetails" - } - ], - "doc": "Pickup details when this object describes pickup" - }, - { - "name": "shippingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartCartAddress", - "displayName": "CartAddress" - } - ], - "doc": "Shipment details when this object describes shipment" - }, - { - "name": "shippingRuleDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartShippingRuleDetails", - "displayName": "ShippingRuleDetails" - } - ], - "doc": "Selected shipping rule details" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfShippingInfoDetailsOneOf", - "members": [ - "pickupDetails", - "shippingAddress" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CartShippingInfoDetailsOneOf", - "members": [ - { - "name": "pickupDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartV1PickupDetails", - "displayName": "V1PickupDetails" - } - ], - "doc": "Pickup details when this object describes pickup" - }, - { - "name": "shippingAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartCartAddress", - "displayName": "CartAddress" - } - ], - "doc": "Shipment details when this object describes shipment" + "doc": "Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\nFor example, the start time of a class." } ], "docs": { @@ -16935,56 +15540,6 @@ ] } }, - { - "name": "ecomV1CartShippingRuleDetails", - "members": [ - { - "name": "deliveryOption", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Rule title (as provided by the store owner)" - }, - { - "name": "estimatedDeliveryTime", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Shipping option delivery time" - }, - { - "name": "optionId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Selected option ID" - }, - { - "name": "ruleId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Selected shipping rule ID" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1CartStreetAddress", "members": [ @@ -17015,36 +15570,6 @@ ] } }, - { - "name": "ecomV1CartSubdivision", - "members": [ - { - "name": "code", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Short subdivision code." - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Subdivision full name." - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1CartSubscriptionOptionInfo", "members": [ @@ -17109,7 +15634,7 @@ "nativeType": "number" } ], - "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`." + "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`." }, { "name": "frequency", @@ -17128,6 +15653,26 @@ ] } }, + { + "name": "ecomV1CartSystemError", + "members": [ + { + "name": "errorCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1CartTarget", "members": [ @@ -17233,6 +15778,99 @@ ] } }, + { + "name": "ecomV1CartTaxBreakdown", + "members": [ + { + "name": "jurisdiction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\"." + }, + { + "name": "jurisdictionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the jurisdiction in which this tax detail applies." + }, + { + "name": "nonTaxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CartMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The amount of this line item price that was considered nontaxable. (Decimal value)" + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)" + }, + { + "name": "taxAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CartMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The amount of tax estimated for this line item. (Decimal value)" + }, + { + "name": "taxName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\nThis name should be explicit enough to allow the merchant to understand what tax was calculated." + }, + { + "name": "taxType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc." + }, + { + "name": "taxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CartMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The taxable amount of this line item." + } + ], + "docs": { + "description": [ + "TaxBreakdown represents tax information for a line item.\nIt holds the tax amount and the tax rate for each tax authority that apply on the line item." + ] + } + }, { "name": "ecomV1CartTaxCalculationDetails", "members": [ @@ -17413,7 +16051,7 @@ "nativeType": "string" } ], - "doc": "Subscription option name." + "doc": "Subscription option name in the site's default language." }, { "name": "translated", @@ -17423,87 +16061,7 @@ "nativeType": "string" } ], - "doc": "Translated subscription option name." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CartTotals", - "members": [ - { - "name": "discount", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total calculated discount value, according to order.discount" - }, - { - "name": "quantity", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total line items quantity" - }, - { - "name": "shipping", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total shipping price, including tax" - }, - { - "name": "subtotal", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Subtotal of all line items, before tax" - }, - { - "name": "tax", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total tax" - }, - { - "name": "total", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total price" - }, - { - "name": "weight", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Total items weight" + "doc": "Subscription option name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -17684,76 +16242,6 @@ ] } }, - { - "name": "ecomV1CartV1BuyerInfo", - "members": [ - { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer details" - }, - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's email address" - }, - { - "name": "firstName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's first name" - }, - { - "name": "identity_Type", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's relationship to the website" - }, - { - "name": "lastName", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's last name" - }, - { - "name": "phone", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Customer's phone number" - } - ], - "docs": { - "description": [ - "This might expand and add additional data" - ] - } - }, { "name": "ecomV1CartV1Coupon", "members": [ @@ -17826,48 +16314,6 @@ ] } }, - { - "name": "ecomV1CartV1PickupDetails", - "members": [ - { - "name": "buyerDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartBuyerDetails", - "displayName": "BuyerDetails" - } - ], - "doc": "Customer details" - }, - { - "name": "pickupAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CartCommonAddress", - "displayName": "CommonAddress" - } - ], - "doc": "Pickup address" - }, - { - "name": "pickupInstructions", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Store owner's pickup instructions" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "ecomV1CartV1SelectedMembership", "members": [ @@ -18417,7 +16863,7 @@ "doc": "The sum of all the tax from line items that calculated by the tax identifiers." }, { - "name": "jurisdictionName", + "name": "jurisdiction", "optional": true, "type": [ { @@ -18454,7 +16900,7 @@ "nativeType": "string" } ], - "doc": "The rate at which this tax detail was calculated, a number between 0.0 to 1.0." + "doc": "The rate at which this tax detail was calculated." }, { "name": "taxType", @@ -19149,7 +17595,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -19159,7 +17605,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -19169,12 +17615,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -19491,6 +17937,17 @@ ], "doc": "Additional settings for customization of the checkout process.\n\nCustom settings can only be set when [creating a checkout](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/checkout/create-checkout).\n" }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Custom field data for the checkout object.\n\n[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.\n" + }, { "name": "giftCard", "readOnly": true, @@ -19673,7 +18130,7 @@ "displayName": "CheckoutMarkedAsCompleted" } ], - "doc": "" + "doc": "Event data." }, { "name": "metadata", @@ -19683,7 +18140,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -19703,7 +18160,7 @@ "displayName": "Checkout" } ], - "doc": "" + "doc": "Created checkout." }, { "name": "metadata", @@ -19713,7 +18170,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -19734,7 +18191,7 @@ "displayName": "Checkout" } ], - "doc": "" + "doc": "Completed checkout." } ], "docs": { @@ -19754,7 +18211,7 @@ "displayName": "Checkout" } ], - "doc": "" + "doc": "Updated entity." }, { "name": "metadata", @@ -19764,7 +18221,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -19794,7 +18251,7 @@ "nativeType": "string" } ], - "doc": "Description line color name in site's default language." + "doc": "Description line color name in the site's default language." }, { "name": "translated", @@ -19804,7 +18261,7 @@ "nativeType": "string" } ], - "doc": "Translated description line color name according to buyer language. Defaults to `original` when not provided." + "doc": "Description line color name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -20289,19 +18746,69 @@ "doc": "Visitor ID - when the order was created by a site visitor that was **not** logged in." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCreatedByIdOneOf", - "members": [ - "appId", - "memberId", - "userId", - "visitorId" - ] - } - ] - }, + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCreatedByIdOneOf", + "members": [ + "appId", + "memberId", + "userId", + "visitorId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutCreatedByIdOneOf", + "members": [ + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "App ID - when the order was created by an external application or Wix service." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID - when the order was created by a **logged in** site visitor." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID - when the order was created by a Wix user on behalf of a buyer.\nFor example, via POS (point of service)." + }, + { + "name": "visitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Visitor ID - when the order was created by a site visitor that was **not** logged in." + } + ], "docs": { "description": [ "" @@ -20309,47 +18816,37 @@ } }, { - "name": "ecomV1CheckoutCreatedByIdOneOf", + "name": "ecomV1CheckoutCustomField", "members": [ { - "name": "appId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "App ID - when the order was created by an external application or Wix service." - }, - { - "name": "memberId", + "name": "title", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Member ID - when the order was created by a **logged in** site visitor." + "doc": "Custom field title." }, { - "name": "userId", + "name": "translatedTitle", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "User ID - when the order was created by a Wix user on behalf of a buyer.\nFor example, via POS (point of service)." + "doc": "Translated custom field title." }, { - "name": "visitorId", + "name": "value", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "any" } ], - "doc": "Visitor ID - when the order was created by a site visitor that was **not** logged in." + "doc": "Custom field value." } ], "docs": { @@ -20359,57 +18856,38 @@ } }, { - "name": "ecomV1CheckoutCustomField", + "name": "ecomV1CheckoutCustomLineItem", "members": [ { - "name": "title", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Custom field title." + "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." }, { - "name": "translatedTitle", + "name": "catalogReference", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutCatalogReference", + "displayName": "CatalogReference" } ], - "doc": "Translated custom field title." + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." }, { - "name": "value", - "optional": true, - "type": [ - { - "nativeType": "any" - } - ], - "doc": "Custom field value." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CheckoutCustomLineItem", - "members": [ - { - "name": "_id", + "name": "depositAmount", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." + "doc": "Optional - partial payment for the given item to be paid upfront during the checkout.\nEligible for catalog items with type `DEPOSIT_ONLINE`.\nIf omitted - item's price will not be split and is expected to be paid in single installment" }, { "name": "descriptionLines", @@ -20429,6 +18907,27 @@ ], "doc": "Custom line item description lines. Used for display purposes for the cart, checkout and order." }, + { + "name": "fullPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Item price **before** catalog-defined discount. Defaults to `price` when not provided." + }, + { + "name": "itemType", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutItemType", + "displayName": "ItemType" + } + ], + "doc": "Required** - Item type. Either a preset type or custom." + }, { "name": "media", "optional": true, @@ -20449,6 +18948,16 @@ ], "doc": "Custom line item name." }, + { + "name": "paymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.\n+ `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n+ `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." + }, { "name": "physicalProperties", "optional": true, @@ -20458,7 +18967,7 @@ "displayName": "PhysicalProperties" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - Physical properties of the item. When relevant, contains information such as SKU and item weight." }, { "name": "price", @@ -20481,6 +18990,17 @@ ], "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." }, + { + "name": "productName", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutProductName", + "displayName": "ProductName" + } + ], + "doc": "*Required** - Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" + }, { "name": "quantity", "optional": true, @@ -20491,6 +19011,37 @@ ], "doc": "Custom line item quantity.\n\nMin: `1`\nMax: `100000`\n" }, + { + "name": "quantityAvailable", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Optional - Item quantity available for purchase. Only return this if inventory is managed.\nNot returning this field means that the buyer can \"infinitely\" tick up the number of items in the cart." + }, + { + "name": "rootCatalogItemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n+ For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n+ in most cases, this field is the name as `catalogReference.catalogItemId`.\n+ Used in membership validation." + }, + { + "name": "serviceProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutServiceProperties", + "displayName": "ServiceProperties" + } + ], + "doc": "Optional - Service properties. When relevant, this contains information such as date and number of participants.\nUsed, among other things, when checking for valid memberships." + }, { "name": "taxGroupId", "optional": true, @@ -20500,38 +19051,16 @@ } ], "doc": "Tax group ID for this custom line item." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCustomLineItemItemPropertiesOneOf", - "members": [ - "digitalFile", - "physicalProperties" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CheckoutCustomLineItemItemPropertiesOneOf", - "members": [ + }, { - "name": "physicalProperties", + "name": "url", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutPhysicalProperties", - "displayName": "PhysicalProperties" + "nativeType": "string" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.\nThe URL is optional and if not provided, the site URL will be used." } ], "docs": { @@ -20782,7 +19311,7 @@ "nativeType": "string" } ], - "doc": "Description line name in site's default language." + "doc": "Description line name in the site's default language." }, { "name": "translated", @@ -20792,7 +19321,7 @@ "nativeType": "string" } ], - "doc": "Translated description line item according to buyer language. Defaults to `original` when not provided." + "doc": "Description line name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -20847,6 +19376,17 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSystemError", + "displayName": "SystemError" + } + ], + "doc": "" + }, { "name": "tracing", "optional": true, @@ -20885,6 +19425,7 @@ "name": "oneOfDetailsKindOneOf", "members": [ "applicationError", + "systemError", "validationError" ] } @@ -20910,6 +19451,17 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSystemError", + "displayName": "SystemError" + } + ], + "doc": "" + }, { "name": "validationError", "optional": true, @@ -21333,7 +19885,18 @@ }, { "name": "ecomV1CheckoutEntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -21381,7 +19944,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -21861,7 +20424,7 @@ } } ], - "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`." + "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead." }, { "name": "taxRate", @@ -21913,7 +20476,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -21954,7 +20517,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -22238,7 +20801,7 @@ "displayName": "MultiCurrencyPrice" } ], - "doc": "__Deprecated.__ Use `totalPriceAfterTax` minus `taxDetails.totalTax` instead." + "doc": "Total price after discounts, and before tax." }, { "name": "url", @@ -22258,6 +20821,37 @@ ] } }, + { + "name": "ecomV1CheckoutLineItemDiscount", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of line item the discount applies to." + }, + { + "name": "totalDiscountAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "Discount value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1CheckoutLineItemQuantityUpdate", "members": [ @@ -22871,7 +21465,7 @@ "nativeType": "number" } ], - "doc": "Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`." + "doc": "Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request." } ], "docs": { @@ -22992,7 +21586,7 @@ "nativeType": "string" } ], - "doc": "Description line plain text value in site's default language." + "doc": "Description line plain text value in the site's default language." }, { "name": "translated", @@ -23002,7 +21596,7 @@ "nativeType": "string" } ], - "doc": "Translated description line plain text value according to buyer language. Defaults to `original` when not provided." + "doc": "Description line plain text value translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -23022,7 +21616,7 @@ "nativeType": "string" } ], - "doc": "Required.** Original price description in site's default language." + "doc": "__Required.__ Price description in the site's default language." }, { "name": "translated", @@ -23032,7 +21626,7 @@ "nativeType": "string" } ], - "doc": "Translated price description according to buyer language. Defaults to `original` when not provided." + "doc": "Price description translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -23249,7 +21843,7 @@ "nativeType": "string" } ], - "doc": "__Required.__ Original item name in site's default language.\nMin: 1 character\nMax: 200 characters" + "doc": "__Required.__ Item name in the site's default language.\n\nMin: 1 character.\nMax: 200 characters.\n" }, { "name": "translated", @@ -23259,7 +21853,7 @@ "nativeType": "string" } ], - "doc": "Optional. Translated item name according to buyer language. Defaults to `original` when not provided.\nMin: 1 character\nMax: 400 characters" + "doc": "Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`.\n" } ], "docs": { @@ -23506,7 +22100,7 @@ "nativeType": "string" } ], - "doc": "Media ID in media manager." + "doc": "Media ID in Wix Media Manager." }, { "name": "fileName", @@ -23516,7 +22110,7 @@ "nativeType": "string" } ], - "doc": "Original file name." + "doc": "Original filename." }, { "name": "fileType", @@ -23726,7 +22320,7 @@ "displayName": "MultiCurrencyPrice" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price of shipping after discounts (when relevant), and before tax." } ], "docs": { @@ -23821,7 +22415,7 @@ "nativeType": "number" } ], - "doc": "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." + "doc": "The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room." }, { "name": "scheduledDate", @@ -23831,7 +22425,27 @@ "nativeType": "Date" } ], - "doc": "Date and time the service is supposed to be provided in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the time of the class." + "doc": "Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\nFor example, the start time of a class." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutSettingsActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" } ], "docs": { @@ -24117,7 +22731,7 @@ "displayName": "CheckoutSettings" } ], - "doc": "" + "doc": "Updated checkout settings." }, { "name": "metadata", @@ -24127,7 +22741,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -24195,72 +22809,195 @@ } }, { - "name": "ecomV1CheckoutSettingsDiffmatokyPayload", + "name": "ecomV1CheckoutSettingsDomainEvent", "members": [ { - "name": "compareChannel", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsActionEvent", + "displayName": "ActionEvent" + } + ], "doc": "" }, { - "name": "entityId", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" } ], "doc": "" }, { - "name": "errorInformation", + "name": "deletedEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsErrorInformation", - "displayName": "ErrorInformation" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" } ], "doc": "" }, { - "name": "left", + "name": "entityEventSequence", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." }, { - "name": "right", + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", "optional": true, "type": [ { "nativeType": "string" } ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutSettingsDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsActionEvent", + "displayName": "ActionEvent" + } + ], "doc": "" }, { - "name": "tags", + "name": "createdEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutSettingsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" } ], "doc": "" @@ -24282,10 +23019,10 @@ } }, { - "name": "ecomV1CheckoutSettingsErrorInformation", + "name": "ecomV1CheckoutSettingsEntityCreatedEvent", "members": [ { - "name": "stackTrace", + "name": "entityAsJson", "optional": true, "type": [ { @@ -24301,6 +23038,46 @@ ] } }, + { + "name": "ecomV1CheckoutSettingsEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutSettingsEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1CheckoutSettingsGetCheckoutSettingsRequest", "members": [], @@ -24445,6 +23222,16 @@ } ], "doc": "Whether tax is included in the price" + }, + { + "name": "taxRate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Tax rate % for shipping, as a decimal point >= 0" } ], "docs": { @@ -25110,7 +23897,7 @@ "nativeType": "number" } ], - "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`." + "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`." }, { "name": "frequency", @@ -25129,6 +23916,26 @@ ] } }, + { + "name": "ecomV1CheckoutSystemError", + "members": [ + { + "name": "errorCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1CheckoutTarget", "members": [ @@ -25234,6 +24041,99 @@ ] } }, + { + "name": "ecomV1CheckoutTaxBreakdown", + "members": [ + { + "name": "jurisdiction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\"." + }, + { + "name": "jurisdictionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the jurisdiction in which this tax detail applies." + }, + { + "name": "nonTaxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The amount of this line item price that was considered nontaxable. (Decimal value)" + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)" + }, + { + "name": "taxAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The amount of tax estimated for this line item. (Decimal value)" + }, + { + "name": "taxName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\nThis name should be explicit enough to allow the merchant to understand what tax was calculated." + }, + { + "name": "taxType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc." + }, + { + "name": "taxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The taxable amount of this line item." + } + ], + "docs": { + "description": [ + "TaxBreakdown represents tax information for a line item.\nIt holds the tax amount and the tax rate for each tax authority that apply on the line item." + ] + } + }, { "name": "ecomV1CheckoutTaxCalculationDetails", "members": [ @@ -25403,6 +24303,26 @@ ] } }, + { + "name": "ecomV1CheckoutTemplateActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1CheckoutTemplateAdditionalFee", "members": [ @@ -25651,7 +24571,7 @@ "doc": "The sum of all the tax from line items that calculated by the tax identifiers." }, { - "name": "jurisdictionName", + "name": "jurisdiction", "optional": true, "type": [ { @@ -25688,7 +24608,7 @@ "nativeType": "string" } ], - "doc": "The rate at which this tax detail was calculated, a number between 0.0 to 1.0." + "doc": "The rate at which this tax detail was calculated." }, { "name": "taxType", @@ -26302,7 +25222,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -26312,7 +25232,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -26322,12 +25242,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -26554,6 +25474,17 @@ ], "doc": "Additional settings for customization of the checkout process.\n\nCustom settings can only be set when [creating a checkout](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/checkout/create-checkout).\n" }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Custom field data for the checkout object.\n\n[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.\n" + }, { "name": "giftCard", "readOnly": true, @@ -26725,38 +25656,6 @@ ] } }, - { - "name": "ecomV1CheckoutTemplateCheckoutCreatedFromCheckoutTemplate", - "members": [ - { - "name": "checkoutTemplate", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplate", - "displayName": "CheckoutTemplate" - } - ], - "doc": "checkout template" - }, - { - "name": "createdCheckout", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckout", - "displayName": "Checkout" - } - ], - "doc": "newly created checkout" - } - ], - "docs": { - "description": [ - "Triggered when newly checkout created successfully from checkout template" - ] - } - }, { "name": "ecomV1CheckoutTemplateCheckoutCustomization", "members": [ @@ -26869,17 +25768,17 @@ } }, { - "name": "ecomV1CheckoutTemplateCheckoutTemplateCheckoutCreated", + "name": "ecomV1CheckoutTemplateCheckoutTemplateCreated", "members": [ { - "name": "data", + "name": "entity", "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutCreatedFromCheckoutTemplate", - "displayName": "CheckoutCreatedFromCheckoutTemplate" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplate", + "displayName": "CheckoutTemplate" } ], - "doc": "" + "doc": "Checkout template that was created." }, { "name": "metadata", @@ -26889,7 +25788,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -26899,7 +25798,27 @@ } }, { - "name": "ecomV1CheckoutTemplateCheckoutTemplateCreated", + "name": "ecomV1CheckoutTemplateCheckoutTemplateDeleted", + "members": [ + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutTemplateCheckoutTemplateUpdated", "members": [ { "name": "entity", @@ -26909,7 +25828,7 @@ "displayName": "CheckoutTemplate" } ], - "doc": "" + "doc": "Checkout template that was updated." }, { "name": "metadata", @@ -26919,7 +25838,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -26929,37 +25848,49 @@ } }, { - "name": "ecomV1CheckoutTemplateCheckoutTemplateDeleted", + "name": "ecomV1CheckoutTemplateCheckoutTemplateUsed", "members": [ { - "name": "metadata", + "name": "checkout", + "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateBackendEventMetadata", - "displayName": "BackendEventMetadata" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckout", + "displayName": "Checkout" } ], - "doc": "" + "doc": "newly created checkout" + }, + { + "name": "checkoutTemplate", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplate", + "displayName": "CheckoutTemplate" + } + ], + "doc": "checkout template" } ], "docs": { "description": [ - "" + "Triggered when newly checkout created successfully from checkout template" ] } }, { - "name": "ecomV1CheckoutTemplateCheckoutTemplateUpdated", + "name": "ecomV1CheckoutTemplateCheckoutTemplateUsedEvent", "members": [ { - "name": "entity", + "name": "data", "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplate", - "displayName": "CheckoutTemplate" + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCheckoutTemplateUsed", + "displayName": "CheckoutTemplateUsed" } ], - "doc": "" + "doc": "Event data." }, { "name": "metadata", @@ -26969,7 +25900,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -26999,7 +25930,7 @@ "nativeType": "string" } ], - "doc": "Description line color name in site's default language." + "doc": "Description line color name in the site's default language." }, { "name": "translated", @@ -27009,7 +25940,7 @@ "nativeType": "string" } ], - "doc": "Translated description line color name according to buyer language. Defaults to `original` when not provided." + "doc": "Description line color name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -27575,6 +26506,27 @@ ], "doc": "Custom line item ID. If passed, `id` must be unique.\nDefault: auto-generated ID." }, + { + "name": "catalogReference", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateCatalogReference", + "displayName": "CatalogReference" + } + ], + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." + }, + { + "name": "depositAmount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - partial payment for the given item to be paid upfront during the checkout.\nEligible for catalog items with type `DEPOSIT_ONLINE`.\nIf omitted - item's price will not be split and is expected to be paid in single installment" + }, { "name": "descriptionLines", "optional": true, @@ -27593,6 +26545,27 @@ ], "doc": "Custom line item description lines. Used for display purposes for the cart, checkout and order." }, + { + "name": "fullPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Item price **before** catalog-defined discount. Defaults to `price` when not provided." + }, + { + "name": "itemType", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateItemType", + "displayName": "ItemType" + } + ], + "doc": "Required** - Item type. Either a preset type or custom." + }, { "name": "media", "optional": true, @@ -27613,6 +26586,16 @@ ], "doc": "Custom line item name." }, + { + "name": "paymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.\n+ `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.\n+ `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." + }, { "name": "physicalProperties", "optional": true, @@ -27622,7 +26605,7 @@ "displayName": "PhysicalProperties" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - Physical properties of the item. When relevant, contains information such as SKU and item weight." }, { "name": "price", @@ -27645,6 +26628,17 @@ ], "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." }, + { + "name": "productName", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateProductName", + "displayName": "ProductName" + } + ], + "doc": "*Required** - Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" + }, { "name": "quantity", "optional": true, @@ -27655,6 +26649,37 @@ ], "doc": "Custom line item quantity.\n\nMin: `1`\nMax: `100000`\n" }, + { + "name": "quantityAvailable", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Optional - Item quantity available for purchase. Only return this if inventory is managed.\nNot returning this field means that the buyer can \"infinitely\" tick up the number of items in the cart." + }, + { + "name": "rootCatalogItemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional - In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.\n+ For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.\n+ in most cases, this field is the name as `catalogReference.catalogItemId`.\n+ Used in membership validation." + }, + { + "name": "serviceProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateServiceProperties", + "displayName": "ServiceProperties" + } + ], + "doc": "Optional - Service properties. When relevant, this contains information such as date and number of participants.\nUsed, among other things, when checking for valid memberships." + }, { "name": "taxGroupId", "optional": true, @@ -27664,38 +26689,16 @@ } ], "doc": "Tax group ID for this custom line item." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCustomLineItemItemPropertiesOneOf", - "members": [ - "digitalFile", - "physicalProperties" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1CheckoutTemplateCustomLineItemItemPropertiesOneOf", - "members": [ + }, { - "name": "physicalProperties", + "name": "url", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplatePhysicalProperties", - "displayName": "PhysicalProperties" + "nativeType": "string" } ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability." + "doc": "Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.\nThe URL is optional and if not provided, the site URL will be used." } ], "docs": { @@ -27944,7 +26947,7 @@ "nativeType": "string" } ], - "doc": "Description line name in site's default language." + "doc": "Description line name in the site's default language." }, { "name": "translated", @@ -27954,7 +26957,7 @@ "nativeType": "string" } ], - "doc": "Translated description line item according to buyer language. Defaults to `original` when not provided." + "doc": "Description line name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -28009,6 +27012,17 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateSystemError", + "displayName": "SystemError" + } + ], + "doc": "" + }, { "name": "tracing", "optional": true, @@ -28047,6 +27061,7 @@ "name": "oneOfDetailsKindOneOf", "members": [ "applicationError", + "systemError", "validationError" ] } @@ -28072,6 +27087,17 @@ ], "doc": "" }, + { + "name": "systemError", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateSystemError", + "displayName": "SystemError" + } + ], + "doc": "" + }, { "name": "validationError", "optional": true, @@ -28162,6 +27188,267 @@ ] } }, + { + "name": "ecomV1CheckoutTemplateDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutTemplateDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutTemplateEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutTemplateEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1CheckoutTemplateEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1CheckoutTemplateExtendedFields", "members": [ @@ -28183,7 +27470,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -28545,7 +27832,7 @@ } } ], - "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`." + "doc": "If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead." }, { "name": "taxRate", @@ -28597,7 +27884,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -28638,7 +27925,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -28669,7 +27956,7 @@ "displayName": "CatalogReference" } ], - "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info." + "doc": "Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info.\n\n> **Note:** For more information on what to pass to `lineItems.catalogReference`, see [eCommerce Integration in the Wix Stores Catalog API](https://dev.wix.com/api/rest/wix-stores/catalog/ecommerce-integration).\n" }, { "name": "quantity", @@ -29083,7 +28370,7 @@ "nativeType": "number" } ], - "doc": "Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`." + "doc": "Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request." } ], "docs": { @@ -29144,7 +28431,7 @@ "nativeType": "string" } ], - "doc": "Description line plain text value in site's default language." + "doc": "Description line plain text value in the site's default language." }, { "name": "translated", @@ -29154,7 +28441,7 @@ "nativeType": "string" } ], - "doc": "Translated description line plain text value according to buyer language. Defaults to `original` when not provided." + "doc": "Description line plain text value translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -29174,7 +28461,7 @@ "nativeType": "string" } ], - "doc": "Required.** Original price description in site's default language." + "doc": "__Required.__ Price description in the site's default language." }, { "name": "translated", @@ -29184,7 +28471,7 @@ "nativeType": "string" } ], - "doc": "Translated price description according to buyer language. Defaults to `original` when not provided." + "doc": "Price description translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -29280,7 +28567,7 @@ "nativeType": "string" } ], - "doc": "__Required.__ Original item name in site's default language.\nMin: 1 character\nMax: 200 characters" + "doc": "__Required.__ Item name in the site's default language.\n\nMin: 1 character.\nMax: 200 characters.\n" }, { "name": "translated", @@ -29290,7 +28577,7 @@ "nativeType": "string" } ], - "doc": "Optional. Translated item name according to buyer language. Defaults to `original` when not provided.\nMin: 1 character\nMax: 400 characters" + "doc": "Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`.\n" } ], "docs": { @@ -29449,7 +28736,7 @@ "nativeType": "string" } ], - "doc": "Media ID in media manager." + "doc": "Media ID in Wix Media Manager." }, { "name": "fileName", @@ -29459,7 +28746,7 @@ "nativeType": "string" } ], - "doc": "Original file name." + "doc": "Original filename." }, { "name": "fileType", @@ -29764,7 +29051,7 @@ "nativeType": "number" } ], - "doc": "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." + "doc": "The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room." }, { "name": "scheduledDate", @@ -29774,7 +29061,7 @@ "nativeType": "Date" } ], - "doc": "Date and time the service is supposed to be provided in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the time of the class." + "doc": "Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\nFor example, the start time of a class." } ], "docs": { @@ -30092,7 +29379,7 @@ "nativeType": "number" } ], - "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`." + "doc": "Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`." }, { "name": "frequency", @@ -30111,6 +29398,26 @@ ] } }, + { + "name": "ecomV1CheckoutTemplateSystemError", + "members": [ + { + "name": "errorCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1CheckoutTemplateTarget", "members": [ @@ -30216,6 +29523,99 @@ ] } }, + { + "name": "ecomV1CheckoutTemplateTaxBreakdown", + "members": [ + { + "name": "jurisdiction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the jurisdiction to which this tax detail applies. For example, \"New York\" or \"Quebec\"." + }, + { + "name": "jurisdictionType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of the jurisdiction in which this tax detail applies." + }, + { + "name": "nonTaxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The amount of this line item price that was considered nontaxable. (Decimal value)" + }, + { + "name": "rate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)" + }, + { + "name": "taxAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The amount of tax estimated for this line item. (Decimal value)" + }, + { + "name": "taxName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the tax against which this tax amount was calculated. For example, \"NY State Sales Tax\", \"Quebec GST\", etc.\nThis name should be explicit enough to allow the merchant to understand what tax was calculated." + }, + { + "name": "taxType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, \"Sales Tax\", \"Income Tax\", \"Value Added Tax\", etc." + }, + { + "name": "taxableAmount", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1CheckoutTemplateMultiCurrencyPrice", + "displayName": "MultiCurrencyPrice" + } + ], + "doc": "The taxable amount of this line item." + } + ], + "docs": { + "description": [ + "TaxBreakdown represents tax information for a line item.\nIt holds the tax amount and the tax rate for each tax authority that apply on the line item." + ] + } + }, { "name": "ecomV1CheckoutTemplateTaxCalculationDetails", "members": [ @@ -30396,7 +29796,7 @@ "nativeType": "string" } ], - "doc": "Subscription option name." + "doc": "Subscription option name in the site's default language." }, { "name": "translated", @@ -30406,7 +29806,7 @@ "nativeType": "string" } ], - "doc": "Translated subscription option name." + "doc": "Subscription option name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -30721,7 +30121,7 @@ "displayName": "MultiCurrencyPrice" } ], - "doc": "__Deprecated.__ Use `totalPriceAfterTax` minus `taxDetails.totalTax` instead." + "doc": "Total price after discounts, and before tax." }, { "name": "url", @@ -30871,7 +30271,7 @@ "nativeType": "string" } ], - "doc": "Subscription option name." + "doc": "Subscription option name in the site's default language." }, { "name": "translated", @@ -30881,7 +30281,7 @@ "nativeType": "string" } ], - "doc": "Translated subscription option name." + "doc": "Subscription option name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -38752,6 +38152,26 @@ ] } }, + { + "name": "ecomV1FulfillmentsActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1FulfillmentsApplicationError", "members": [ @@ -39238,6 +38658,267 @@ ] } }, + { + "name": "ecomV1FulfillmentsDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1FulfillmentsActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1FulfillmentsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1FulfillmentsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1FulfillmentsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1FulfillmentsDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1FulfillmentsActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1FulfillmentsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1FulfillmentsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1FulfillmentsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1FulfillmentsEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1FulfillmentsEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1FulfillmentsEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1FulfillmentsFulfillment", "members": [ @@ -40638,6 +40319,16 @@ } ], "doc": "Filter applied to original data" + }, + { + "name": "hierarchySeparatorOverride", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional custom separator string that can be used to override default separator value '|'\nfor hierarchical responses of multifaceted aggregation requests like:\n'{\"aggregation\": {\"example_request_key\": {\"$count\" : [\"deliveryMethod\", \"shippingRegion\"]}}}'\nwith example response for default '|' separator like:\n'{\"aggregates\" :{\"example_request_key\": {\"(Mail|Region 1)\": 5, \"(Pickup|Region 2)\": 10}}}'" } ], "docs": { @@ -41367,7 +41058,215 @@ } }, { - "name": "ecomV1OrderBulkMarkAsFulfilledRequest", + "name": "ecomV1OrderBulkMarkAsFulfilledRequest", + "members": [ + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of orders to be marked as fulfilled." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the full updated order entities in the response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderBulkMarkAsFulfilledResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkOrderResult", + "displayName": "BulkOrderResult" + } + ] + } + } + ], + "doc": "Items updated by bulk action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderBulkMarkAsUnfulfilledByFilterRequest", + "members": [ + { + "name": "filter", + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderBulkMarkAsUnfulfilledByFilterResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkOrderResult", + "displayName": "BulkOrderResult" + } + ] + } + } + ], + "doc": "Items updated by bulk action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderBulkMarkAsUnfulfilledRequest", + "members": [ + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of orders to be marked as not fulfilled." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the full updated order entities in the response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderBulkMarkAsUnfulfilledResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkOrderResult", + "displayName": "BulkOrderResult" + } + ] + } + } + ], + "doc": "Items updated by bulk action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderBulkMarkOrdersAsPaidRequest", "members": [ { "name": "ids", @@ -41383,17 +41282,7 @@ } } ], - "doc": "IDs of orders to be marked as fulfilled." - }, - { - "name": "returnFullEntity", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether to return the full updated order entities in the response." + "doc": "IDs of orders to mark as paid." } ], "docs": { @@ -41403,7 +41292,7 @@ } }, { - "name": "ecomV1OrderBulkMarkAsFulfilledResponse", + "name": "ecomV1OrderBulkMarkOrdersAsPaidResponse", "members": [ { "name": "bulkActionMetadata", @@ -41432,26 +41321,7 @@ } } ], - "doc": "Items updated by bulk action." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1OrderBulkMarkAsUnfulfilledByFilterRequest", - "members": [ - { - "name": "filter", - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort)." + "doc": "Items updated by the bulk action.\nThe Order entity within the results optimistically changes its payment status to paid, however this process is async." } ], "docs": { @@ -41461,72 +41331,29 @@ } }, { - "name": "ecomV1OrderBulkMarkAsUnfulfilledByFilterResponse", + "name": "ecomV1OrderBulkOrderResult", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkActionMetadata", - "displayName": "BulkActionMetadata" - } - ], - "doc": "Bulk action metadata." - }, - { - "name": "results", + "name": "item", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkOrderResult", - "displayName": "BulkOrderResult" - } - ] - } - } - ], - "doc": "Items updated by bulk action." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1OrderBulkMarkAsUnfulfilledRequest", - "members": [ - { - "name": "ids", - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-ecom-backend.Events.ecomV1OrderOrder", + "displayName": "Order" } ], - "doc": "IDs of orders to be marked as not fulfilled." + "doc": "Updated item. Optional - returned only if requested with `return_full_entity` set to `true`." }, { - "name": "returnFullEntity", + "name": "itemMetadata", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-ecom-backend.Events.ecomV1OrderItemMetadata", + "displayName": "ItemMetadata" } ], - "doc": "Whether to return the full updated order entities in the response." + "doc": "Item metadata." } ], "docs": { @@ -41536,21 +41363,10 @@ } }, { - "name": "ecomV1OrderBulkMarkAsUnfulfilledResponse", + "name": "ecomV1OrderBulkSendBuyerPickupConfirmationEmailsRequest", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkActionMetadata", - "displayName": "BulkActionMetadata" - } - ], - "doc": "Bulk action metadata." - }, - { - "name": "results", + "name": "orderIds", "optional": true, "type": [ { @@ -41558,14 +41374,13 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkOrderResult", - "displayName": "BulkOrderResult" + "nativeType": "string" } ] } } ], - "doc": "Items updated by bulk action." + "doc": "IDs of orders to send pickup emails for." } ], "docs": { @@ -41575,25 +41390,8 @@ } }, { - "name": "ecomV1OrderBulkMarkOrdersAsPaidRequest", - "members": [ - { - "name": "ids", - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "IDs of orders to mark as paid." - } - ], + "name": "ecomV1OrderBulkSendBuyerPickupConfirmationEmailsResponse", + "members": [], "docs": { "description": [ "" @@ -41601,21 +41399,10 @@ } }, { - "name": "ecomV1OrderBulkMarkOrdersAsPaidResponse", + "name": "ecomV1OrderBulkSendBuyerShippingConfirmationEmailsRequest", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkActionMetadata", - "displayName": "BulkActionMetadata" - } - ], - "doc": "Bulk action metadata." - }, - { - "name": "results", + "name": "orderIds", "optional": true, "type": [ { @@ -41623,14 +41410,13 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderBulkOrderResult", - "displayName": "BulkOrderResult" + "nativeType": "string" } ] } } ], - "doc": "Items updated by the bulk action.\nThe Order entity within the results optimistically changes its payment status to paid, however this process is async." + "doc": "IDs of orders to send pickup emails for." } ], "docs": { @@ -41640,31 +41426,8 @@ } }, { - "name": "ecomV1OrderBulkOrderResult", - "members": [ - { - "name": "item", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderOrder", - "displayName": "Order" - } - ], - "doc": "Updated item. Optional - returned only if requested with `return_full_entity` set to `true`." - }, - { - "name": "itemMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderItemMetadata", - "displayName": "ItemMetadata" - } - ], - "doc": "Item metadata." - } - ], + "name": "ecomV1OrderBulkSendBuyerShippingConfirmationEmailsResponse", + "members": [], "docs": { "description": [ "" @@ -42308,7 +42071,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -42318,7 +42081,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -42328,12 +42091,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -42483,7 +42246,7 @@ "nativeType": "string" } ], - "doc": "Description line color name in site's default language." + "doc": "Description line color name in the site's default language." }, { "name": "translated", @@ -42493,7 +42256,7 @@ "nativeType": "string" } ], - "doc": "Translated description line color name according to buyer language. Defaults to `original` when not provided." + "doc": "Description line color name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -43356,7 +43119,7 @@ "displayName": "CursorPaging" } ], - "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + "doc": "Cursor pointing to page of results. `cursorPaging.cursor` cannot be used with 'filter' or 'sort'." }, { "name": "filter", @@ -43366,7 +43129,7 @@ "nativeType": "Object" } ], - "doc": "A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)" + "doc": "Filter object.\n\nFor example, the following `filter` object will only return orders with payment statuses of paid and/or partially paid:\n`\"filter\": {\"paymentStatus\": {\"$in\": [\"PAID\", \"PARTIALLY_PAID\"]}}`\n\nLearn more about the filter format [here](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n" }, { "name": "sort", @@ -43384,7 +43147,7 @@ } } ], - "doc": "Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]" + "doc": "Array of sort objects that specify the order in which results should be sorted.\n\nFor example, the following `sort` array will sort by `createdDate` in descending order:\n`\"sort\": [{\"fieldName\": \"createdDate\", \"order\":\"DESC\"}]`.\n\nLearn more about the sort format [here](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n" } ], "extra": { @@ -43415,7 +43178,7 @@ "displayName": "CursorPaging" } ], - "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + "doc": "Cursor pointing to page of results. `cursorPaging.cursor` cannot be used with 'filter' or 'sort'." } ], "docs": { @@ -44193,7 +43956,7 @@ "nativeType": "string" } ], - "doc": "Description line name in site's default language." + "doc": "Description line name in the site's default language." }, { "name": "translated", @@ -44203,7 +43966,7 @@ "nativeType": "string" } ], - "doc": "Translated description line item according to buyer language. Defaults to `original` when not provided." + "doc": "Description line name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -45023,7 +44786,18 @@ }, { "name": "ecomV1OrderEntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -45091,7 +44865,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -46874,6 +46648,50 @@ ] } }, + { + "name": "ecomV1OrderInvoicePaidEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderIdAndVersion", + "displayName": "IdAndVersion" + } + ], + "doc": "" + }, + { + "name": "data", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderInvoiceFields", + "displayName": "InvoiceFields" + } + ], + "doc": "" + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'Deleted'`\n- `'Draft'`\n- `'Overdue'`\n- `'Paid'`\n- `'PartialAndOverdue'`\n- `'PartiallyPaid'`\n- `'Processing'`\n- `'Sent'`\n- `'Void'`" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrderInvoiceSent", "members": [], @@ -47073,7 +46891,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -47114,7 +46932,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -48332,6 +48150,27 @@ ] } }, + { + "name": "ecomV1OrderMaskedOrderLineItem", + "members": [ + { + "name": "lineItem", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderOrderLineItem", + "displayName": "OrderLineItem" + } + ], + "doc": "Order line item to update" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrderMembershipChargeItem", "members": [ @@ -48771,6 +48610,17 @@ ], "doc": "Indicates meta site blocked from publishing and added additional filtering in listing API (MSS). READ_ONLY." }, + { + "name": "criticalAsset", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates the site is used as critical asset and as such is protected. You would be only able to provision applications to this meta site. READ_ONLY." + }, { "name": "dateCreated", "readOnly": true, @@ -49028,6 +48878,7 @@ "members": [ { "name": "_createdDate", + "readOnly": true, "optional": true, "type": [ { @@ -49115,7 +48966,6 @@ }, { "name": "archived", - "readOnly": true, "optional": true, "type": [ { @@ -49237,6 +49087,17 @@ ], "doc": "Custom fields." }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Custom field data for the order object.\n\n[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.\n" + }, { "name": "fulfillmentStatus", "readOnly": true, @@ -49250,6 +49111,7 @@ }, { "name": "lineItems", + "readOnly": true, "optional": true, "type": [ { @@ -49309,9 +49171,19 @@ ], "doc": "Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order." }, + { + "name": "recipientInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderAddressWithContact", + "displayName": "AddressWithContact" + } + ], + "doc": "Order recipient address and contact details.\n\nThis field may differ from the address in `shippingInfo.logistics` when:\n+ The chosen shipping option is pickup point or store pickup.\n+ No shipping option is selected.\n" + }, { "name": "seenByAHuman", - "readOnly": true, "optional": true, "type": [ { @@ -49422,7 +49294,7 @@ "displayName": "OrderApproved" } ], - "doc": "" + "doc": "Information about the approved order." }, { "name": "metadata", @@ -49432,7 +49304,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -49452,7 +49324,7 @@ "displayName": "OrderCanceledEventOrderCanceled" } ], - "doc": "" + "doc": "Event data." }, { "name": "metadata", @@ -49462,7 +49334,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -49746,7 +49618,7 @@ "displayName": "OrderDeltasCommitted" } ], - "doc": "" + "doc": "Event data." }, { "name": "metadata", @@ -49756,7 +49628,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -49776,7 +49648,7 @@ "displayName": "Order" } ], - "doc": "" + "doc": "Created order." }, { "name": "metadata", @@ -49786,7 +49658,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -50088,28 +49960,220 @@ ], "doc": "Line item quantity." }, - { - "name": "restockQuantity", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "quantity of inventory requested to be returned. Whether to restock or ignore the request is up the vertical." - }, - { - "name": "subscriptionInfo", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderSubscriptionInfo", - "displayName": "SubscriptionInfo" - } - ], - "doc": "Subscription info." - }, + { + "name": "restockQuantity", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "quantity of inventory requested to be returned. Whether to restock or ignore the request is up the vertical." + }, + { + "name": "subscriptionInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderSubscriptionInfo", + "displayName": "SubscriptionInfo" + } + ], + "doc": "Subscription info." + }, + { + "name": "taxDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderItemTaxFullDetails", + "displayName": "ItemTaxFullDetails" + } + ], + "doc": "Tax details for this line item." + }, + { + "name": "totalDiscount", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", + "displayName": "Price" + } + ], + "doc": "Total discount for this line item's entire quantity." + }, + { + "name": "totalPriceAfterTax", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", + "displayName": "Price" + } + ], + "doc": "Total price after all discounts and tax." + }, + { + "name": "totalPriceBeforeTax", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", + "displayName": "Price" + } + ], + "doc": "Total price after discounts, and before tax." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderOrderLineItemChangedDetails", + "members": [ + { + "name": "catalogReference", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderCatalogReference", + "displayName": "CatalogReference" + } + ], + "doc": "References to the line item's origin catalog.\nThis field is empty in the case of a custom line item." + }, + { + "name": "descriptionLines", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderDescriptionLine", + "displayName": "DescriptionLine" + } + ] + } + } + ], + "doc": "Line item description lines. Used for display purposes for the cart, checkout and order." + }, + { + "name": "fulfillerId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fulfiller ID. Field is empty when the line item is self-fulfilled.\nTo 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)." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Line item image." + }, + { + "name": "itemType", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderItemType", + "displayName": "ItemType" + } + ], + "doc": "Item type. Either a preset type or custom." + }, + { + "name": "paymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0." + }, + { + "name": "physicalProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderPhysicalProperties", + "displayName": "PhysicalProperties" + } + ], + "doc": "Physical properties of the item. When relevant, contains information such as SKU and item weight." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", + "displayName": "Price" + } + ], + "doc": "Line item price after line item discounts for display purposes." + }, + { + "name": "priceBeforeDiscounts", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", + "displayName": "Price" + } + ], + "doc": "Line item price before line item discounts for display purposes. Defaults to `price` when not provided." + }, + { + "name": "priceDescription", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderPriceDescription", + "displayName": "PriceDescription" + } + ], + "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." + }, + { + "name": "productName", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderProductName", + "displayName": "ProductName" + } + ], + "doc": "Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" + }, + { + "name": "quantity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Line item quantity." + }, { "name": "taxDetails", "optional": true, @@ -50123,7 +50187,6 @@ }, { "name": "totalDiscount", - "readOnly": true, "optional": true, "type": [ { @@ -50135,7 +50198,6 @@ }, { "name": "totalPriceAfterTax", - "readOnly": true, "optional": true, "type": [ { @@ -50147,7 +50209,6 @@ }, { "name": "totalPriceBeforeTax", - "readOnly": true, "optional": true, "type": [ { @@ -50155,185 +50216,7 @@ "displayName": "Price" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ecomV1OrderOrderLineItemChangedDetails", - "members": [ - { - "name": "catalogReference", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderCatalogReference", - "displayName": "CatalogReference" - } - ], - "doc": "References to the line item's origin catalog.\nThis field is empty in the case of a custom line item." - }, - { - "name": "descriptionLines", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderDescriptionLine", - "displayName": "DescriptionLine" - } - ] - } - } - ], - "doc": "Line item description lines. Used for display purposes for the cart, checkout and order." - }, - { - "name": "fulfillerId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Fulfiller ID. Field is empty when the line item is self-fulfilled.\nTo 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)." - }, - { - "name": "image", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Line item image." - }, - { - "name": "itemType", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderItemType", - "displayName": "ItemType" - } - ], - "doc": "Item type. Either a preset type or custom." - }, - { - "name": "paymentOption", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.\n+ `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.\n+ `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0." - }, - { - "name": "physicalProperties", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderPhysicalProperties", - "displayName": "PhysicalProperties" - } - ], - "doc": "Physical properties of the item. When relevant, contains information such as SKU and item weight." - }, - { - "name": "price", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", - "displayName": "Price" - } - ], - "doc": "Line item price after line item discounts for display purposes." - }, - { - "name": "priceBeforeDiscounts", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", - "displayName": "Price" - } - ], - "doc": "Line item price before line item discounts for display purposes. Defaults to `price` when not provided." - }, - { - "name": "priceDescription", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderPriceDescription", - "displayName": "PriceDescription" - } - ], - "doc": "Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - \"Starts at $67\"." - }, - { - "name": "productName", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderProductName", - "displayName": "ProductName" - } - ], - "doc": "Item name.\n+ Stores - `product.name`\n+ Bookings - `service.info.name`\n+ Events - `ticket.name`" - }, - { - "name": "quantity", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Line item quantity." - }, - { - "name": "taxDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderItemTaxFullDetails", - "displayName": "ItemTaxFullDetails" - } - ], - "doc": "Tax details for this line item." - }, - { - "name": "totalDiscount", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", - "displayName": "Price" - } - ], - "doc": "Total discount for this line item's entire quantity." - }, - { - "name": "totalPriceAfterTax", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", - "displayName": "Price" - } - ], - "doc": "Total price after all discounts and tax." + "doc": "Total price after all discounts excluding tax." } ], "docs": { @@ -50369,6 +50252,36 @@ ] } }, + { + "name": "ecomV1OrderOrderPaymentStatusUpdated", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderPaymentStatusUpdated", + "displayName": "PaymentStatusUpdated" + } + ], + "doc": "Information about the updated order and the previous payment status." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrderOrderPlaced", "members": [], @@ -50516,7 +50429,7 @@ "displayName": "Order" } ], - "doc": "" + "doc": "Updated order." }, { "name": "metadata", @@ -50526,7 +50439,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -50817,7 +50730,7 @@ "nativeType": "number" } ], - "doc": "Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`." + "doc": "Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request." } ], "docs": { @@ -50958,7 +50871,7 @@ "nativeType": "string" } ], - "doc": "Description line plain text value in site's default language." + "doc": "Description line plain text value in the site's default language." }, { "name": "translated", @@ -50968,7 +50881,7 @@ "nativeType": "string" } ], - "doc": "Translated description line plain text value according to buyer language. Defaults to `original` when not provided." + "doc": "Description line plain text value translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -51655,7 +51568,7 @@ "nativeType": "string" } ], - "doc": "Required.** Original price description in site's default language." + "doc": "__Required.__ Price description in the site's default language." }, { "name": "translated", @@ -51665,7 +51578,7 @@ "nativeType": "string" } ], - "doc": "Translated price description according to buyer language. Defaults to `original` when not provided." + "doc": "Price description translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -51742,17 +51655,6 @@ } ], "doc": "Total price of additional fees before tax." - }, - { - "name": "totalPrice", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Events.ecomV1OrderPrice", - "displayName": "Price" - } - ], - "doc": "Deprecated - use `total` instead." } ], "docs": { @@ -51772,7 +51674,7 @@ "nativeType": "string" } ], - "doc": "__Required.__ Original item name in site's default language.\nMin: 1 character\nMax: 200 characters" + "doc": "__Required.__ Item name in the site's default language.\n\nMin: 1 character.\nMax: 200 characters.\n" }, { "name": "translated", @@ -51782,7 +51684,7 @@ "nativeType": "string" } ], - "doc": "Optional. Translated item name according to buyer language. Defaults to `original` when not provided.\nMin: 1 character\nMax: 400 characters" + "doc": "Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`.\n" } ], "docs": { @@ -53069,7 +52971,7 @@ "nativeType": "number" } ], - "doc": "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." + "doc": "The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room." }, { "name": "scheduledDate", @@ -53079,7 +52981,7 @@ "nativeType": "Date" } ], - "doc": "Date and time the service is supposed to be provided in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the time of the class." + "doc": "Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\nFor example, the start time of a class." } ], "docs": { @@ -53238,7 +53140,7 @@ "displayName": "Price" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price of shipping after discounts (when relevant), and before tax." } ], "docs": { @@ -53852,6 +53754,26 @@ ] } }, + { + "name": "ecomV1OrderTransactionsActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrderTransactionsActivity", "members": [ @@ -55308,6 +55230,207 @@ ] } }, + { + "name": "ecomV1OrderTransactionsDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderTransactionsDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderTransactionsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrderTransactionsEnteredBy", "members": [ @@ -55338,6 +55461,66 @@ ] } }, + { + "name": "ecomV1OrderTransactionsEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderTransactionsEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderTransactionsEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrderTransactionsErrorInformation", "members": [ @@ -57080,7 +57263,7 @@ "displayName": "PaymentsUpdated" } ], - "doc": "" + "doc": "Updated order transactions, payment IDs, and refund IDs." }, { "name": "metadata", @@ -57090,7 +57273,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { @@ -57329,6 +57512,23 @@ } ], "doc": "List of IDs of the updated payments." + }, + { + "name": "refundIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of IDs of the updated refunds." } ], "docs": { @@ -59765,6 +59965,63 @@ ] } }, + { + "name": "ecomV1OrderUpdateOrderLineItemsRequest", + "members": [ + { + "name": "lineItems", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderMaskedOrderLineItem", + "displayName": "MaskedOrderLineItem" + } + ] + } + } + ], + "doc": "Order line items to update" + }, + { + "name": "orderId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrderUpdateOrderLineItemsResponse", + "members": [ + { + "name": "order", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrderOrder", + "displayName": "Order" + } + ], + "doc": "Updated order data" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrderUpdateOrderRequest", "members": [ @@ -60386,6 +60643,26 @@ ] } }, + { + "name": "ecomV1OrdersSettingsActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrdersSettingsBackendEventMetadata", "members": [ @@ -60451,72 +60728,195 @@ } }, { - "name": "ecomV1OrdersSettingsDiffmatokyPayload", + "name": "ecomV1OrdersSettingsDomainEvent", "members": [ { - "name": "compareChannel", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsActionEvent", + "displayName": "ActionEvent" + } + ], "doc": "" }, { - "name": "entityId", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" } ], "doc": "" }, { - "name": "errorInformation", + "name": "deletedEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsErrorInformation", - "displayName": "ErrorInformation" + "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" } ], "doc": "" }, { - "name": "left", + "name": "entityEventSequence", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." }, { - "name": "right", + "name": "entityFqdn", "optional": true, "type": [ { "nativeType": "string" } ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrdersSettingsDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsActionEvent", + "displayName": "ActionEvent" + } + ], "doc": "" }, { - "name": "tags", + "name": "createdEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Events.ecomV1OrdersSettingsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" } ], "doc": "" @@ -60529,10 +60929,10 @@ } }, { - "name": "ecomV1OrdersSettingsErrorInformation", + "name": "ecomV1OrdersSettingsEntityCreatedEvent", "members": [ { - "name": "stackTrace", + "name": "entityAsJson", "optional": true, "type": [ { @@ -60548,6 +60948,46 @@ ] } }, + { + "name": "ecomV1OrdersSettingsEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1OrdersSettingsEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ecomV1OrdersSettingsGetOrdersSettingsRequest", "members": [], @@ -60619,7 +61059,7 @@ "displayName": "OrdersSettings" } ], - "doc": "" + "doc": "Updated orders settings." }, { "name": "metadata", @@ -60629,7 +61069,7 @@ "displayName": "BackendEventMetadata" } ], - "doc": "" + "doc": "Event metadata." } ], "docs": { diff --git a/wix-ecom-backend/wix-ecom-backend/Events/guides/1-events-intro.md b/wix-ecom-backend/wix-ecom-backend/Events/guides/1-events-intro.md index 3262d3cc9d..f8390e96b3 100644 --- a/wix-ecom-backend/wix-ecom-backend/Events/guides/1-events-intro.md +++ b/wix-ecom-backend/wix-ecom-backend/Events/guides/1-events-intro.md @@ -3,13 +3,11 @@ title: Introduction --- # Introduction -Wix eCommerce (ecom) events are fired on your site's backend when certain events occur related to eCommerce carts, current carts, and orders. -You can write event handlers that react to these events. Event handler functions -receive data that corresponds to the event that fired. Use event handlers -to create custom responses to eCommerce events. +Wix eCommerce events are fired on your site's backend when certain events occur related to eCommerce carts, current carts, checkouts, orders, and more. You can write event handlers that react to these events. Event handler functions receive data that corresponds to the event that fired. Use event handlers to create custom responses to eCommerce events. -To add an eCommerce (ecom) event handler, add an **events.js** file to the **Backend** section of your site if one does not already exist. All event handler functions for your -site are defined in this file. +> **Note:** Backend events don't work when previewing your site. + +To add an eCommerce (ecom) event handler, add an **events.js** file to the **Backend** section of your site if one does not already exist. All event handler functions for your site are defined in this file. Event handler functions are defined using the following pattern: ```javascript @@ -22,4 +20,3 @@ like this: export function wixEcom_onCartCreated(event) { } ``` -> **Note:** Backend events don't work when previewing your site. diff --git a/wix-ecom-backend/wix-ecom-backend/OrderFulfillments.service.json b/wix-ecom-backend/wix-ecom-backend/OrderFulfillments.service.json index e93f98e80d..35c4fbe7b4 100644 --- a/wix-ecom-backend/wix-ecom-backend/OrderFulfillments.service.json +++ b/wix-ecom-backend/wix-ecom-backend/OrderFulfillments.service.json @@ -812,6 +812,26 @@ } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ApplicationError", "members": [ @@ -1271,6 +1291,259 @@ ] } }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderFulfillments.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderFulfillments.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderFulfillments.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderFulfillments.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderFulfillments.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderFulfillments.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderFulfillments.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderFulfillments.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Fulfillment", "members": [ diff --git a/wix-ecom-backend/wix-ecom-backend/OrderInvoices.service.json b/wix-ecom-backend/wix-ecom-backend/OrderInvoices.service.json new file mode 100644 index 0000000000..271f1bec02 --- /dev/null +++ b/wix-ecom-backend/wix-ecom-backend/OrderInvoices.service.json @@ -0,0 +1,883 @@ +{ + "name": "OrderInvoices", + "memberOf": "wix-ecom-backend", + "mixes": [], + "callbacks": [], + "extra": {}, + "clientId": "wix-ecom-backend-invoice", + "docs": {}, + "relatedGuides": [], + "properties": [], + "operations": [ + { + "name": "listInvoicesForMultipleOrders", + "params": [ + { + "name": "orderIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Order IDs for which to retrieve invoices.", + "required": true + } + ], + "requiredFields": [ + "orderIds" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.ListInvoicesForMultipleOrdersResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves the IDs of invoices associated with all specified orders.", + "description": [ + "The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved." + ], + "examples": [ + { + "title": "listInvoicesForMultipleOrders example", + "body": [ + "import { orderInvoices } from 'wix-ecom-backend';", + " ", + " async function listInvoicesForMultipleOrders(orderIds) {", + " try {", + " const result = await orderInvoices.listInvoicesForMultipleOrders(orderIds);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "listInvoicesForMultipleOrders" + } + ], + "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddInvoiceToOrderRequest", + "members": [ + { + "name": "invoiceInfo", + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.Invoice" + } + ], + "doc": "Invoice info." + }, + { + "name": "orderId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddInvoiceToOrderResponse", + "members": [ + { + "name": "orderInvoices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.Invoice" + } + ] + } + } + ], + "doc": "List of order invoices." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ApplicationError", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + }, + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data related to the error." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the error." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkActionMetadata", + "members": [ + { + "name": "totalFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that couldn't be processed." + }, + { + "name": "totalSuccesses", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that were successfully processed." + }, + { + "name": "undetailedFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGenerateInvoicesRequest", + "members": [ + { + "name": "orderIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Order IDs." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGenerateInvoicesResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.BulkActionMetadata" + } + ], + "doc": "" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.BulkInvoiceResult" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkInvoiceResult", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.InvoiceForOrder" + } + ], + "doc": "" + }, + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.ItemMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Empty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GenerateInvoiceRequest", + "members": [ + { + "name": "orderId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GenerateInvoiceResponse", + "members": [ + { + "name": "invoiceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Invoice ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Invoice", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Invoice ID." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the app that set the invoice." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InvoiceForOrder", + "members": [ + { + "name": "invoiceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Invoice ID." + }, + { + "name": "orderId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InvoicesForOrder", + "members": [ + { + "name": "invoicesInfo", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.Invoice" + } + ] + } + } + ], + "doc": "Invoices info." + }, + { + "name": "orderId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ItemMetadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + }, + { + "name": "error", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.ApplicationError" + } + ], + "doc": "Details about the error in case of failure." + }, + { + "name": "originalIndex", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListInvoicesForMultipleOrdersRequest", + "members": [ + { + "name": "orderIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Order IDs for which to retrieve invoices." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListInvoicesForMultipleOrdersResponse", + "members": [ + { + "name": "invoicesForOrder", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.InvoicesForOrder" + } + ] + } + } + ], + "doc": "List of order IDs and their associated invoices." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListInvoicesForSingleOrderRequest", + "members": [ + { + "name": "orderId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListInvoicesForSingleOrderResponse", + "members": [ + { + "name": "invoices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderInvoices.Invoice" + } + ] + } + } + ], + "doc": "List of invoices." + } + ], + "docs": { + "description": [ + "" + ] + } + } + ] +} diff --git a/wix-ecom-backend/wix-ecom-backend/OrderInvoices/guides/order-invoices-intro.md b/wix-ecom-backend/wix-ecom-backend/OrderInvoices/guides/order-invoices-intro.md new file mode 100644 index 0000000000..cedeca1f36 --- /dev/null +++ b/wix-ecom-backend/wix-ecom-backend/OrderInvoices/guides/order-invoices-intro.md @@ -0,0 +1,36 @@ +--- +title: Introduction +--- +# Introduction + +  + +
+ Developer Preview +
+ APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.
+
+ +  + +The Order Invoices API allows you to retrieve the IDs of invoices, and IDs of the external invoice apps that created them. + + +## Terminology + ++ __Invoice ID__: Used to retrieve the invoice itself from the service that created it. ++ __Invoice App ID__: ID of the external invoice app that created the invoice. + +To use the Order Invoices API, import `{ orderInvoices }` from the `wix-ecom-backend` module: + +```javascript +import { orderInvoices } from 'wix-ecom-backend'; +``` + +## Permissions information + +Functions in the Order Invoices API are restricted and only run if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. + +
+

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

+
\ No newline at end of file diff --git a/wix-ecom-backend/wix-ecom-backend/OrderTransactions.service.json b/wix-ecom-backend/wix-ecom-backend/OrderTransactions.service.json index 864c97299c..e7fc67b2ed 100644 --- a/wix-ecom-backend/wix-ecom-backend/OrderTransactions.service.json +++ b/wix-ecom-backend/wix-ecom-backend/OrderTransactions.service.json @@ -9,6 +9,177 @@ "relatedGuides": [], "properties": [], "operations": [ + { + "name": "addPayments", + "params": [ + { + "name": "orderId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID.", + "required": true + }, + { + "name": "payments", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.Payment" + } + ] + } + } + ], + "doc": "Payments to be added to order.", + "required": true + } + ], + "requiredFields": [ + "orderId", + "payments", + "payments.amount", + "payments.giftcardPaymentDetails.giftCardPaymentId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.AddPaymentsResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Adds up to 50 payment records to an order.", + "description": [ + "The `addPayments()` function returns a Promise that resolves when the payment records are added to an order.\n\n> **Note:** This does **NOT** perform the actual charging - the order is only updated with records of the payments." + ], + "examples": [ + { + "title": "addPayments example", + "body": [ + "import { orderTransactions } from 'wix-ecom-backend';", + " ", + " async function addPayments(orderId, payments) {", + " try {", + " const result = await orderTransactions.addPayments(orderId, payments);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "addPayments", + "isAdminMethod": true + }, + { + "name": "bulkUpdatePaymentStatuses", + "params": [ + { + "name": "paymentAndOrderIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.PaymentAndOrderId" + } + ] + } + } + ], + "doc": "Order and payment IDs for which to update payment status.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.BulkUpdatePaymentStatusesOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [ + "paymentAndOrderIds" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.BulkUpdatePaymentStatusesResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates multiple order payments with a specified status.", + "description": [ + "The `BulkUpdatePaymentStatus()` function returns a Promise that resolves when the payment statuses are updated." + ], + "examples": [ + { + "title": "bulkUpdatePaymentStatuses example", + "body": [ + "import { orderTransactions } from 'wix-ecom-backend';", + " ", + " async function bulkUpdatePaymentStatuses(paymentAndOrderIds, options) {", + " try {", + " const result = await orderTransactions.bulkUpdatePaymentStatuses(paymentAndOrderIds, options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "bulkUpdatePaymentStatuses", + "isAdminMethod": true + }, { "name": "listTransactionsForMultipleOrders", "params": [ @@ -49,8 +220,10 @@ "doc": null }, "docs": { - "summary": "Retrieves transactions associated with all specified orders.", - "description": [], + "summary": "Retrieves information about payments and refunds associated with all specified orders.", + "description": [ + "The `ListTransactionsForMultipleOrders()` function returns a Promise that resolves when the specified orders' transaction records are retrieved." + ], "examples": [ { "title": "listTransactionsForMultipleOrders example", @@ -114,8 +287,10 @@ "doc": null }, "docs": { - "summary": "Retrieves transactions associated with a specified order.", - "description": [], + "summary": "Retrieves information about payments and refunds associated with a specified order.", + "description": [ + "The `ListTransactionsForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved." + ], "examples": [ { "title": "listTransactionsForSingleOrder example", @@ -145,9 +320,108 @@ ], "syntaxName": "listTransactionsForSingleOrder", "isAdminMethod": true + }, + { + "name": "updatePaymentStatus", + "params": [ + { + "name": "identifiers", + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.UpdatePaymentStatusIdentifiers" + } + ], + "doc": "", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.UpdatePaymentStatusOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [ + "identifiers", + "identifiers.orderId", + "identifiers.paymentId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.UpdatePaymentStatusResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates the status of an order's payment.", + "description": [ + "The `UpdatePaymentStatus()` function returns a Promise that resolves when the payment status is updated." + ], + "examples": [ + { + "title": "updatePaymentStatus example", + "body": [ + "import { orderTransactions } from 'wix-ecom-backend';", + " ", + " async function updatePaymentStatus(identifiers, options) {", + " try {", + " const result = await orderTransactions.updatePaymentStatus(identifiers, options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updatePaymentStatus", + "isAdminMethod": true } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Activity", "members": [ @@ -1619,6 +1893,199 @@ ] } }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrderTransactions.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "EnteredBy", "members": [ @@ -1649,6 +2116,66 @@ ] } }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ErrorInformation", "members": [ @@ -3572,6 +4099,23 @@ } ], "doc": "List of IDs of the updated payments." + }, + { + "name": "refundIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of IDs of the updated refunds." } ], "docs": { diff --git a/wix-ecom-backend/wix-ecom-backend/OrderTransactions/guides/order-transactions-intro.md b/wix-ecom-backend/wix-ecom-backend/OrderTransactions/guides/order-transactions-intro.md new file mode 100644 index 0000000000..ba0bbc73e3 --- /dev/null +++ b/wix-ecom-backend/wix-ecom-backend/OrderTransactions/guides/order-transactions-intro.md @@ -0,0 +1,42 @@ +--- +title: Introduction +--- +# Introduction + +  + +
+ Developer Preview +
+ APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.
+
+ +  + +The Order Transactions API allows you to manage records and details of payments and refunds associated with your orders. + +With the Order Transactions API you can: + +* Retrieve transactions related to one or more orders. +* Add payment records to an order. +* Listen to events when an [order's transactions are updated](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordertransactionsupdated). + +## Terminology + +* **Transaction**: Global term for a transfer of funds. Can be either a: + * **Payment**: A transfer of funds from customer to merchant/seller when making a purchase. + * **Refund** A reimbursing transfer of funds back to the buyer. + +To use the Order Transactions API, import `{ orderTransactions }` from the `wix-ecom-backend` module: + +```javascript +import { orderTransactions } from 'wix-ecom-backend'; +``` + +## Permissions information + +Functions in the Order Transactions API are restricted and only run if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. + +
+

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

+
\ No newline at end of file diff --git a/wix-ecom-backend/wix-ecom-backend/Orders.service.json b/wix-ecom-backend/wix-ecom-backend/Orders.service.json index c2f32f20ed..33f265c468 100644 --- a/wix-ecom-backend/wix-ecom-backend/Orders.service.json +++ b/wix-ecom-backend/wix-ecom-backend/Orders.service.json @@ -52,8 +52,10 @@ "doc": null }, "docs": { - "summary": "Cancels an order. The `order.status` field changes to `CANCELED`.", - "description": [], + "summary": "Cancels an order.", + "description": [ + "The `cancelOrder()` function returns a Promise that resolves when the specified order is canceled and the `order.status` field changes to `CANCELED`." + ], "examples": [ { "title": "cancelOrder example", @@ -76,12 +78,82 @@ ] }, "isVeloEvent": false, - "customLabels": [ + "syntaxName": "cancelOrder", + "isAdminMethod": true + }, + { + "name": "createOrder", + "params": [ { - "id": "maturity-beta" + "name": "order", + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.Order" + } + ], + "doc": "Order info.", + "required": true } ], - "syntaxName": "cancelOrder", + "requiredFields": [ + "order", + "order.billingInfo.contactDetails", + "order.billingInfo.contactDetails.firstName", + "order.channelInfo", + "order.lineItems", + "order.lineItems.catalogReference.appId", + "order.lineItems.catalogReference.catalogItemId", + "order.lineItems.descriptionLines.name", + "order.lineItems.itemType", + "order.lineItems.price", + "order.lineItems.productName", + "order.lineItems.productName.original", + "order.lineItems.taxDetails", + "order.priceSummary" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Orders.Order" + } + ] + } + } + ], + "doc": "Newly created order.\n" + }, + "docs": { + "summary": "Creates an order.", + "description": [ + "The `createOrder()` function returns a Promise that resolves when the order is created.\n\n> **Notes:**\n> + If an item is digital - `lineItems[i].itemType.preset: DIGITAL` - then `lineItems[i].digitalFile` must be provided.\n> + If `lineItems[i].id` is passed, it must be either a valid GUID, or empty." + ], + "examples": [ + { + "title": "createOrder example", + "body": [ + "import { orders } from 'wix-ecom-backend';", + " ", + " async function createOrder(order) {", + " try {", + " const result = await orders.createOrder(order);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "createOrder", "isAdminMethod": true }, { @@ -418,7 +490,6 @@ " * \"checkoutId\": \"62d01935-e0d3-4063-9e78-da099462e90c\",", " * \"customFields\": [],", " * \"cartId\": \"52fec024-4379-4a96-9237-9660030be6fe\",", - " * \"isInternalOrderCreate\": false,", " * \"payNow\": {", " * \"subtotal\": {", " * \"amount\": \"48.75\",", @@ -470,6 +541,144 @@ "isVeloEvent": false, "syntaxName": "getOrder", "isAdminMethod": true + }, + { + "name": "searchOrders", + "params": [ + { + "name": "options", + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.SearchOrdersOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Orders.SearchOrdersResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves a list of orders, given the provided paging, filtering, and sorting.", + "description": [ + "Search Orders runs with these defaults, which you can override:\n\n- `createdDate` is sorted in `DESC` order\n- `cursorPaging.limit` is `100`\n- `filter: {\"status\": {\"$ne\": \"INITIALIZED\"}}` - other order statuses can be queried, but orders with `status: \"INITIALIZED\"` are never returned\n\nFor field support for filters and sorting, see [Orders: Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/supported-filters-and-sorting).\n\nTo learn about working with _Search_ endpoints, see\n[API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and\n[Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging)." + ], + "examples": [ + { + "title": "searchOrders example", + "body": [ + "import { orders } from 'wix-ecom-backend';", + " ", + " async function searchOrders(options) {", + " try {", + " const result = await orders.searchOrders(options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "searchOrders", + "isAdminMethod": true + }, + { + "name": "updateOrder", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID.", + "required": true + }, + { + "name": "order", + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.UpdateOrder" + } + ], + "doc": "", + "required": true + } + ], + "requiredFields": [ + "_id", + "order" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Orders.Order" + } + ] + } + } + ], + "doc": "Newly created order.\n" + }, + "docs": { + "summary": "Updates an order.", + "description": [ + "The `updateOrder()` function returns a Promise that resolves when the specified order's information is updated.\n\nCurrently, the following fields can be updated:\n+ `order.buyerInfo.email`\n+ `order.recipientInfo.address`\n+ `order.recipientInfo.contactDetails`\n+ `order.shippingInfo.logistics.shippingDestination.address`\n+ `order.shippingInfo.logistics.shippingDestination.contactDetails`\n\nTo update a field's value, include the new value in the `order` object in the body params.\nTo remove a field's value, pass `null`.\n\n> **Note:** Removing `buyerInfo` or `contactDetails` fields results in an error." + ], + "examples": [ + { + "title": "updateOrder example", + "body": [ + "import { orders } from 'wix-ecom-backend';", + " ", + " async function updateOrder(id, order, options) {", + " try {", + " const result = await orders.updateOrder(id, order, options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "syntaxName": "updateOrder", + "isAdminMethod": true } ], "messages": [ @@ -1116,6 +1325,16 @@ } ], "doc": "Filter applied to original data" + }, + { + "name": "hierarchySeparatorOverride", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional custom separator string that can be used to override default separator value '|'\nfor hierarchical responses of multifaceted aggregation requests like:\n'{\"aggregation\": {\"example_request_key\": {\"$count\" : [\"deliveryMethod\", \"shippingRegion\"]}}}'\nwith example response for default '|' separator like:\n'{\"aggregates\" :{\"example_request_key\": {\"(Mail|Region 1)\": 5, \"(Pickup|Region 2)\": 10}}}'" } ], "docs": { @@ -1145,6 +1364,16 @@ } ], "doc": "Filter applied to original data" + }, + { + "name": "hierarchySeparatorOverride", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional custom separator string that can be used to override default separator value '|'\nfor hierarchical responses of multifaceted aggregation requests like:\n'{\"aggregation\": {\"example_request_key\": {\"$count\" : [\"deliveryMethod\", \"shippingRegion\"]}}}'\nwith example response for default '|' separator like:\n'{\"aggregates\" :{\"example_request_key\": {\"(Mail|Region 1)\": 5, \"(Pickup|Region 2)\": 10}}}'" } ], "docs": { @@ -2166,6 +2395,132 @@ ] } }, + { + "name": "BulkSendBuyerPickupConfirmationEmailsOptions", + "members": [ + { + "name": "orderIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of orders to send pickup emails for." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSendBuyerPickupConfirmationEmailsRequest", + "members": [ + { + "name": "orderIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of orders to send pickup emails for." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSendBuyerPickupConfirmationEmailsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSendBuyerShippingConfirmationEmailsOptions", + "members": [ + { + "name": "orderIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of orders to send pickup emails for." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSendBuyerShippingConfirmationEmailsRequest", + "members": [ + { + "name": "orderIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of orders to send pickup emails for." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSendBuyerShippingConfirmationEmailsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, { "name": "BulkUnArchiveOrdersByFilterRequest", "members": [ @@ -2326,7 +2681,7 @@ "nativeType": "string" } ], - "doc": "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)." + "doc": "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)." }, { "name": "email", @@ -2882,7 +3237,7 @@ "nativeType": "string" } ], - "doc": "ID of the catalog app. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -2892,7 +3247,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `serviceId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -2902,12 +3257,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value form. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, @@ -3083,7 +3438,7 @@ "nativeType": "string" } ], - "doc": "Description line color name in site's default language." + "doc": "Description line color name in the site's default language." }, { "name": "translated", @@ -3093,7 +3448,7 @@ "nativeType": "string" } ], - "doc": "Translated description line color name according to buyer language. Defaults to `original` when not provided." + "doc": "Description line color name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -3893,7 +4248,7 @@ "referenceType": "wix-ecom-backend.Orders.CursorPaging" } ], - "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + "doc": "Cursor pointing to page of results. `cursorPaging.cursor` cannot be used with 'filter' or 'sort'." }, { "name": "filter", @@ -3903,7 +4258,7 @@ "nativeType": "Object" } ], - "doc": "A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)" + "doc": "Filter object.\n\nFor example, the following `filter` object will only return orders with payment statuses of paid and/or partially paid:\n`\"filter\": {\"paymentStatus\": {\"$in\": [\"PAID\", \"PARTIALLY_PAID\"]}}`\n\nLearn more about the filter format [here](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n" }, { "name": "sort", @@ -3920,7 +4275,7 @@ } } ], - "doc": "Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]" + "doc": "Array of sort objects that specify the order in which results should be sorted.\n\nFor example, the following `sort` array will sort by `createdDate` in descending order:\n`\"sort\": [{\"fieldName\": \"createdDate\", \"order\":\"DESC\"}]`.\n\nLearn more about the sort format [here](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n" } ], "extra": { @@ -3950,7 +4305,7 @@ "referenceType": "wix-ecom-backend.Orders.CursorPaging" } ], - "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" + "doc": "Cursor pointing to page of results. `cursorPaging.cursor` cannot be used with 'filter' or 'sort'." } ], "docs": { @@ -4738,7 +5093,7 @@ "nativeType": "string" } ], - "doc": "Description line name in site's default language." + "doc": "Description line name in the site's default language." }, { "name": "translated", @@ -4748,7 +5103,7 @@ "nativeType": "string" } ], - "doc": "Translated description line item according to buyer language. Defaults to `original` when not provided." + "doc": "Description line name translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -5544,7 +5899,18 @@ }, { "name": "EntityDeletedEvent", - "members": [], + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -5612,7 +5978,7 @@ } } ], - "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -7372,6 +7738,48 @@ ] } }, + { + "name": "InvoicePaidEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.IdAndVersion" + } + ], + "doc": "" + }, + { + "name": "data", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.InvoiceFields" + } + ], + "doc": "" + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'Deleted'`\n- `'Draft'`\n- `'Overdue'`\n- `'Paid'`\n- `'PartialAndOverdue'`\n- `'PartiallyPaid'`\n- `'Processing'`\n- `'Sent'`\n- `'Void'`" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "InvoiceSent", "members": [], @@ -7634,7 +8042,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -7675,7 +8083,7 @@ "nativeType": "string" } ], - "doc": "Custom item type." + "doc": "Custom item type. When none of the preset types are suitable, specifies the custom type." }, { "name": "preset", @@ -8930,6 +9338,26 @@ ] } }, + { + "name": "MaskedOrderLineItem", + "members": [ + { + "name": "lineItem", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.OrderLineItem" + } + ], + "doc": "Order line item to update" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "MembershipChargeItem", "members": [ @@ -9363,6 +9791,17 @@ ], "doc": "Indicates meta site blocked from publishing and added additional filtering in listing API (MSS). READ_ONLY." }, + { + "name": "criticalAsset", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates the site is used as critical asset and as such is protected. You would be only able to provision applications to this meta site. READ_ONLY." + }, { "name": "dateCreated", "readOnly": true, @@ -9616,6 +10055,7 @@ "members": [ { "name": "_createdDate", + "readOnly": true, "optional": true, "type": [ { @@ -9700,7 +10140,6 @@ }, { "name": "archived", - "readOnly": true, "optional": true, "type": [ { @@ -9817,6 +10256,16 @@ ], "doc": "Custom fields." }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.ExtendedFields" + } + ], + "doc": "Custom field data for the order object.\n\n[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.\n" + }, { "name": "fulfillmentStatus", "readOnly": true, @@ -9830,6 +10279,7 @@ }, { "name": "lineItems", + "readOnly": true, "optional": true, "type": [ { @@ -9887,9 +10337,18 @@ ], "doc": "Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order." }, + { + "name": "recipientInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.AddressWithContact" + } + ], + "doc": "Order recipient address and contact details.\n\nThis field may differ from the address in `shippingInfo.logistics` when:\n+ The chosen shipping option is pickup point or store pickup.\n+ No shipping option is selected.\n" + }, { "name": "seenByAHuman", - "readOnly": true, "optional": true, "type": [ { @@ -10583,7 +11042,7 @@ "referenceType": "wix-ecom-backend.Orders.Price" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price after discounts, and before tax." } ], "docs": { @@ -10751,6 +11210,16 @@ } ], "doc": "Total price after all discounts and tax." + }, + { + "name": "totalPriceBeforeTax", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.Price" + } + ], + "doc": "Total price after all discounts excluding tax." } ], "docs": { @@ -11271,7 +11740,7 @@ "nativeType": "number" } ], - "doc": "Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`." + "doc": "Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request." } ], "docs": { @@ -11410,7 +11879,7 @@ "nativeType": "string" } ], - "doc": "Description line plain text value in site's default language." + "doc": "Description line plain text value in the site's default language." }, { "name": "translated", @@ -11420,7 +11889,7 @@ "nativeType": "string" } ], - "doc": "Translated description line plain text value according to buyer language. Defaults to `original` when not provided." + "doc": "Description line plain text value translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -12206,7 +12675,7 @@ "nativeType": "string" } ], - "doc": "Required.** Original price description in site's default language." + "doc": "__Required.__ Price description in the site's default language." }, { "name": "translated", @@ -12216,7 +12685,7 @@ "nativeType": "string" } ], - "doc": "Translated price description according to buyer language. Defaults to `original` when not provided." + "doc": "Price description translated into the buyer's language.\n\nDefault: Same as `original`.\n" } ], "docs": { @@ -12287,16 +12756,6 @@ } ], "doc": "Total price of additional fees before tax." - }, - { - "name": "totalPrice", - "optional": true, - "type": [ - { - "referenceType": "wix-ecom-backend.Orders.Price" - } - ], - "doc": "Deprecated - use `total` instead." } ], "docs": { @@ -12316,7 +12775,7 @@ "nativeType": "string" } ], - "doc": "__Required.__ Original item name in site's default language.\nMin: 1 character\nMax: 200 characters" + "doc": "__Required.__ Item name in the site's default language.\n\nMin: 1 character.\nMax: 200 characters.\n" }, { "name": "translated", @@ -12326,7 +12785,7 @@ "nativeType": "string" } ], - "doc": "Optional. Translated item name according to buyer language. Defaults to `original` when not provided.\nMin: 1 character\nMax: 400 characters" + "doc": "Item name translated into the buyer's language.\n\nMin: 1 character.\nMax: 400 characters.\nDefault: Same as `original`.\n" } ], "docs": { @@ -13656,7 +14115,7 @@ "nativeType": "number" } ], - "doc": "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." + "doc": "The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room." }, { "name": "scheduledDate", @@ -13666,7 +14125,7 @@ "nativeType": "Date" } ], - "doc": "Date and time the service is supposed to be provided in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the time of the class." + "doc": "Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\nFor example, the start time of a class." } ], "docs": { @@ -13817,7 +14276,7 @@ "referenceType": "wix-ecom-backend.Orders.Price" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price of shipping after discounts (when relevant), and before tax." } ], "docs": { @@ -15363,6 +15822,7 @@ "members": [ { "name": "_createdDate", + "readOnly": true, "optional": true, "type": [ { @@ -15447,7 +15907,6 @@ }, { "name": "archived", - "readOnly": true, "optional": true, "type": [ { @@ -15564,6 +16023,16 @@ ], "doc": "Custom fields." }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.ExtendedFields" + } + ], + "doc": "Custom field data for the order object.\n\n[Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.\n" + }, { "name": "fulfillmentStatus", "readOnly": true, @@ -15577,6 +16046,7 @@ }, { "name": "lineItems", + "readOnly": true, "optional": true, "type": [ { @@ -15634,9 +16104,18 @@ ], "doc": "Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order." }, + { + "name": "recipientInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.AddressWithContact" + } + ], + "doc": "Order recipient address and contact details.\n\nThis field may differ from the address in `shippingInfo.logistics` when:\n+ The chosen shipping option is pickup point or store pickup.\n+ No shipping option is selected.\n" + }, { "name": "seenByAHuman", - "readOnly": true, "optional": true, "type": [ { @@ -15927,7 +16406,7 @@ "referenceType": "wix-ecom-backend.Orders.Price" } ], - "doc": "Deprecated - use `total_price_after_tax` minus `tax_details.total_tax` instead." + "doc": "Total price after discounts, and before tax." } ], "docs": { @@ -16022,6 +16501,61 @@ ] } }, + { + "name": "UpdateOrderLineItemsRequest", + "members": [ + { + "name": "lineItems", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-ecom-backend.Orders.MaskedOrderLineItem" + } + ] + } + } + ], + "doc": "Order line items to update" + }, + { + "name": "orderId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order ID" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateOrderLineItemsResponse", + "members": [ + { + "name": "order", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.Orders.Order" + } + ], + "doc": "Updated order data" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "UpdateOrderOptions", "members": [], diff --git a/wix-ecom-backend/wix-ecom-backend/Orders/guides/orders-intro.md b/wix-ecom-backend/wix-ecom-backend/Orders/guides/orders-intro.md index 11153003db..a95386ca62 100644 --- a/wix-ecom-backend/wix-ecom-backend/Orders/guides/orders-intro.md +++ b/wix-ecom-backend/wix-ecom-backend/Orders/guides/orders-intro.md @@ -3,12 +3,28 @@ title: Introduction --- # Introduction -The eCommerce Orders API provides functionality for [retrieving](https://www.wix.com/velo/reference/wix-ecom-backend/orders/getorder) orders. +The Orders API allows apps or site owners to customize management of the order lifecycle, including viewing, updating, and canceling. In the dashboard, business staff can create new orders, view and edit existing orders, track fulfillment, and manage the payments cycle. -The order is the last phase of an eCommerce purchase flow, coming after cart and checkout. An order holds information about purchased items, price and tax summaries, shipping and billing info, any applied discounts, payment and fulfillment statuses, and more. +An order holds information about purchased items, price and tax summaries, shipping and billing information, any applied discounts, and the status of payment and fulfillment. -To use the Wix eCommerce Orders API, import `{ orders }` from the `wix-ecom-backend` module: +With the Orders API you can: + +* Get and search for orders. +* Update and cancel an order. +* Create an order for your records. +* Listen to events when an order is [approved](https://www.wix.com/velo/reference/wix-ecom-backend/events/onorderapproved), [updated](https://www.wix.com/velo/reference/wix-ecom-backend/events/onorderupdated), or [canceled](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordercanceled). +* Listen to events when an order's transactions are [updated](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordertransactionsupdated). This event is part of the [Order Transactions API](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions). + +To use the Orders API, import `{ orders }` from the `wix-ecom-backend` module: ```javascript import { orders } from 'wix-ecom-backend'; ``` + +## Permissions information + +Functions in the Orders API are restricted and only run if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. + +
+

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

+
\ No newline at end of file diff --git a/wix-ecom-backend/wix-ecom-backend/OrdersSettings.service.json b/wix-ecom-backend/wix-ecom-backend/OrdersSettings.service.json index 54b964b2e6..b0d59f1d1a 100644 --- a/wix-ecom-backend/wix-ecom-backend/OrdersSettings.service.json +++ b/wix-ecom-backend/wix-ecom-backend/OrdersSettings.service.json @@ -187,10 +187,10 @@ ], "messages": [ { - "name": "DiffmatokyPayload", + "name": "ActionEvent", "members": [ { - "name": "compareChannel", + "name": "bodyAsJson", "optional": true, "type": [ { @@ -198,60 +198,214 @@ } ], "doc": "" - }, + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteOrdersSettingsRequest", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteOrdersSettingsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEvent", + "members": [ { - "name": "entityId", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrdersSettings.ActionEvent" + } + ], "doc": "" }, { - "name": "errorInformation", + "name": "createdEvent", "optional": true, "type": [ { - "referenceType": "wix-ecom-backend.OrdersSettings.ErrorInformation" + "referenceType": "wix-ecom-backend.OrdersSettings.EntityCreatedEvent" } ], "doc": "" }, { - "name": "left", + "name": "deletedEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-ecom-backend.OrdersSettings.EntityDeletedEvent" } ], "doc": "" }, { - "name": "right", + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", "optional": true, "type": [ { "nativeType": "string" } ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrdersSettings.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrdersSettings.ActionEvent" + } + ], "doc": "" }, { - "name": "tags", + "name": "createdEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-ecom-backend.OrdersSettings.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrdersSettings.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-ecom-backend.OrdersSettings.EntityUpdatedEvent" } ], "doc": "" @@ -264,10 +418,10 @@ } }, { - "name": "ErrorInformation", + "name": "EntityCreatedEvent", "members": [ { - "name": "stackTrace", + "name": "entityAsJson", "optional": true, "type": [ { @@ -283,6 +437,46 @@ ] } }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "GetOrdersSettingsRequest", "members": [], diff --git a/wix-ecom-backend/wix-ecom-backend/Recommendations.service.json b/wix-ecom-backend/wix-ecom-backend/Recommendations.service.json index 11ac0e13ae..e37f8db09a 100644 --- a/wix-ecom-backend/wix-ecom-backend/Recommendations.service.json +++ b/wix-ecom-backend/wix-ecom-backend/Recommendations.service.json @@ -327,7 +327,7 @@ "nativeType": "string" } ], - "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + "doc": "ID of the app providing the catalog.\n\nYou can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n" }, { "name": "catalogItemId", @@ -337,7 +337,7 @@ "nativeType": "string" } ], - "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + "doc": "ID of the item within the catalog it belongs to." }, { "name": "options", @@ -347,12 +347,12 @@ "nativeType": "Object" } ], - "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + "doc": "Additional item details in key:value pairs.\n\nUse this optional field to specify a variant of the item or add custom details. There are several ways to use `options`:\n+ Pass specific information about the item variant in this field. For example, size and color of an item of clothing: `\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}`.\n+ Create a separate API for creating item variants that stores the details and generates a unique ID for each item variant. Then pass only the variant ID in this field. For example: `\"options\": {\"variantId\": \"\"}`.\n" } ], "docs": { "description": [ - "Used for grouping line items and is sent on add to cart" + "Used for grouping line items. Sent when an item is added to a cart, checkout, or order." ] } }, diff --git a/wix-ecom-backend/wix-ecom-backend/guides/1-wix-ecom-backend-intro.md b/wix-ecom-backend/wix-ecom-backend/guides/1-wix-ecom-backend-intro.md index 55de748e53..8216979327 100644 --- a/wix-ecom-backend/wix-ecom-backend/guides/1-wix-ecom-backend-intro.md +++ b/wix-ecom-backend/wix-ecom-backend/guides/1-wix-ecom-backend-intro.md @@ -3,27 +3,71 @@ title: Introduction --- # Introduction -The wix-ecom-backend Velo API allows you to create, manage, and/or retrieve 3 elements of the eCommerce purchase flow: **cart**; **checkout**; **order**. +The Wix eCommerce API is a comprehensive suite of services that address standard and specialized needs in online selling. -## Wix eCommerce API and Wix Stores API +The APIs serve as a foundational layer for Wix's own business solutions, such as [Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores), [Bookings](https://support.wix.com/en/article/wix-bookings-about-wix-bookings), and [Restaurants Orders](https://www.wix.com/app-market/restaurants-orders-app). -The main difference between the two APIs is that while **Wix eCommerce manages the cart, checkout, and order** phases of the online store experience, **Wix Stores continues to manage product catalogs, inventories and collections**. The following table outlines the differences between the two APIs. +The Wix eCommerce API provides developers with a comprehensive set of services for customizing eCommerce functionality on Wix sites. The API empowers developers to extend functionality, create features, and build robust eCommerce solutions that meet the specific needs of their users. -| Element | Previous Location | Current Location | -| -----------------------------------------|--------------------------------------------------|-----------------------------| -| Cart | [Wix Stores](https://www.wix.com/velo/reference/wix-stores) | [Wix eCommerce Cart](https://www.wix.com/velo/reference/wix-ecom-backend/cart) -| Checkout | No Stores functionality | [Wix eCommerce Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout) -| Order | [Wix Stores Backend](https://www.wix.com/velo/reference/wix-stores-backend) | [Wix eCommerce Orders](https://www.wix.com/velo/reference/wix-ecom-backend/orders) -| Catalog | [Wix Stores Backend](https://www.wix.com/velo/reference/wix-stores-backend) | Wix Stores - no change -| Inventory | [Wix Stores Backend](https://www.wix.com/velo/reference/wix-stores-backend) | Wix Stores - no change -| Collections | [Wix Stores Backend](https://www.wix.com/velo/reference/wix-stores-backend) | Wix Stores - no change +With the Wix eCommerce API, you can do the following and more: -> **Note:** Further functionality will be coming soon. ++ Access, manage, and create any customer's [cart](https://www.wix.com/velo/reference/wix-ecom-backend/cart/introduction), including a site visitor's [current cart](https://www.wix.com/velo/reference/wix-ecom-backend/currentcart/introduction). ++ Access, manage, and create a site visitor's [checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/introduction), and handle events when a checkout is [abandoned](https://www.wix.com/velo/reference/wix-ecom-backend/events/onabandonedcheckoutcreated), or an abandoned checkout is [recovered](https://www.wix.com/velo/reference/wix-ecom-backend/events/onabandonedcheckoutrecovered). ++ Create and manage [discount rules](https://www.wix.com/velo/reference/wix-ecom-backend/discountrules/introduction). ++ [Promote and recommend](https://www.wix.com/velo/reference/wix-ecom-backend/recommendations/introduction) items to customers. ++ Create, access, and manage [orders](https://www.wix.com/velo/reference/wix-ecom-backend/orders), and retrieve information about order-related [transactions](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/introduction). ++ Manage [fulfillment](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/introduction) (preparation and delivery) of orders. -## Import Statement +The Wix eCommerce platform also incorporates SPIs for greater customization. Use the SPIs to: + ++ Integrate your own [custom catalog](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-catalog/introduction) of sellable items. ++ Incorporate custom [additional fees](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-additional-fees/introduction). ++ Integrate [shipping rates](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-shipping-rates/introduction). ++ [Validate](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction) a site visitor's cart and checkout. + +The Wix eCommerce API is constantly being expanded with new capabilities. Check the API reference regularly to stay up to date with new functionality. To use the wix-ecom-backend API, import `wixEcomBackend` from the `wix-ecom-backend` module: ```javascript import wixEcomBackend from 'wix-ecom-backend'; ``` + +## Before you begin + +Wix eCommerce and Wix Stores handle different parts of the eCommerce flow for an online store: + ++ **Wix eCommerce:** Carts, checkouts, and order. ++ **Wix Stores:** Product catalogs, inventories, and collections. + +If your code still uses the legacy Wix Stores Cart and Orders APIs, we recommend you migrate them to the new Wix eCommerce APIs as soon as possible. The following tables outline the differences and required migrations: + +### API Migration + +| Service | Previous Location | Current Location | +| ------------|-----------------------------------------------------------------------------|-----------------------------| +| Cart | [Wix Stores](https://www.wix.com/velo/reference/wix-stores) (Deprecated) | [Wix eCommerce Cart](https://www.wix.com/velo/reference/wix-ecom-backend/cart/introduction) and [Current Cart](https://www.wix.com/velo/reference/wix-ecom-backend/currentcart/introduction) +| Checkout | - | [Wix eCommerce Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout) +| Orders | [Wix Stores Backend](https://www.wix.com/velo/reference/wix-stores-backend) (Deprecated) | [Wix eCommerce Orders](https://www.wix.com/velo/reference/wix-ecom-backend/orders) +| Catalog | [Wix Stores Backend](https://www.wix.com/velo/reference/wix-stores-backend) | Wix Stores - no change +| Inventory | [Wix Stores Backend](https://www.wix.com/velo/reference/wix-stores-backend) | Wix Stores - no change +| Collections | [Wix Stores Backend](https://www.wix.com/velo/reference/wix-stores-backend) | Wix Stores - no change + +### API Event Migration + +The table below shows [Wix Stores events](https://www.wix.com/velo/reference/wix-stores-backend/events/introduction) and their equivalent [Wix eCommerce events](https://www.wix.com/velo/reference/wix-ecom-backend/events/introduction) that are triggered at the same time. + +| `wix-stores-backend` Order Events | `wix-ecom-backend` Order Events | +|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------| +| [`onNewOrder()`](https://www.wix.com/velo/reference/wix-stores-backend/events/onneworder) | [`onOrderApproved()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onorderapproved) | +| [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-stores-backend/events/onordercanceled) | [`onOrderCanceled()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordercanceled) | +| [`onOrderPaid()`](https://www.wix.com/velo/reference/wix-stores-backend/events/onorderpaid) | [`onOrderTransactionsUpdated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordertransactionsupdated) | +| [`onOrderRefunded()`](https://www.wix.com/velo/reference/wix-stores-backend/events/onorderrefunded) | [`onOrderTransactionsUpdated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordertransactionsupdatedd) | + +## Terminology + ++ **Catalog:** A repository containing items for sale. A catalog can contain anything sellable, including physical products, services, gift cards, pricing plans, and custom items created for individual transactions like specialized project work. Wix business solutions, such as Wix Bookings and Wix Stores, provide built-in catalogs. External business solutions can provide the Wix eCommerce platform with access to their catalogs via the [Catalog SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-catalog/introduction). This enables robust integration of the platform’s cart and checkout functionalities with diverse business types. ++ **Cart:** Once customers have found catalog items they want to purchase, they can add these items to their cart. A cart holds information about a potential transaction, including details about selected items, prices, and discounts, as well as the potential buyer. Site visitors can see their cart on the cart page. Developers can access and manage a customer's cart with the [Cart API](https://www.wix.com/velo/reference/wix-ecom-backend/cart/introduction). Some purchasing flows bypass the cart entirely and proceed directly to checkout. ++ **Current Cart:** The [Current Cart API](https://www.wix.com/velo/reference/wix-ecom-backend/currentcart/introduction) automatically interacts with the site visitor's cart that is currently being used. This means you can use the same functionality as the Cart API, but without the need for a cart ID. ++ **Checkout:** Checkout is the page where a buyer finalizes a purchase. Each checkout holds information about the items to be purchased, price and tax summaries, shipping and billing information, any applied discounts, and more. Developers can access and manage checkout details and trigger checkout-related events with the [Checkout API](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/introduction). ++ **Order:** Once a customer has committed to a purchase, an order is created. An order holds information about purchased items, price and tax summaries, shipping and billing information, any applied discounts, and the status of payment and fulfillment. In the dashboard, business staff can create new orders, view and edit existing orders, track fulfillment, and manage the payments cycle. The [Orders API](https://www.wix.com/velo/reference/wix-ecom-backend/orders/introduction) enables apps or site owners to customize management of the order lifecycle, including viewing, editing, approving, canceling, and charging. \ No newline at end of file diff --git a/wix-events-frontend/wix-events-frontend/Tickets.service.json b/wix-events-frontend/wix-events-frontend/Tickets.service.json index 9e28f83f97..b9637839fd 100644 --- a/wix-events-frontend/wix-events-frontend/Tickets.service.json +++ b/wix-events-frontend/wix-events-frontend/Tickets.service.json @@ -44,7 +44,8 @@ "properties": [], "operations": [ { "name": "checkout", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "eventId", @@ -86,8 +87,9 @@ " methods you want to offer and [set your payment currency](https://support.wix.com/en/article/setting-your-currency-for-accepting-payments).", "", "", - "> **Note:**", - " To work with the Wix Events API, you need to publish your site." ], + "> **Notes:**", + "> * To work with the Wix Events API, you need to publish your site.", + "> * With this function it's not possible to have separate ticket reservation forms for each ticket. You can only have 1 reservation form per ticket order." ], "links": [ "[reserve( )](#reserve)", "[updateOrder( )](#updateOrder)" ], @@ -533,8 +535,7 @@ "extra": { } }, { "name": "reserve", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "eventId", @@ -980,7 +981,7 @@ [ "wix-events-frontend.Tickets.UpdateOrderResponse" ] }, "doc": "Fulfilled - Information about the order that was updated." }, "locations": - [ { "lineno": 95, + [ { "lineno": 98, "filename": "tickets.js" } ], "docs": { "summary": "Updates a ticket order.", @@ -1412,7 +1413,7 @@ [ "wix-events-frontend.Tickets.VerifyCouponResponse" ] }, "doc": "Fulfilled - Information about coupon verification." }, "locations": - [ { "lineno": 118, + [ { "lineno": 121, "filename": "tickets.js" } ], "docs": { "summary": "Verifies a ticket coupon.", @@ -1845,7 +1846,7 @@ "messages": [ { "name": "CheckoutInfo", "locations": - [ { "lineno": 255, + [ { "lineno": 258, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about a checkout.", @@ -2132,7 +2133,7 @@ "labels": [] }, { "name": "CheckoutResponse", "locations": - [ { "lineno": 171, + [ { "lineno": 174, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about a checkout performed using the [`checkout()`](#reserve) function.", @@ -2421,7 +2422,7 @@ "labels": [] }, { "name": "Discount", "locations": - [ { "lineno": 352, + [ { "lineno": 355, "filename": "tickets.js" } ], "docs": { "summary": "An object representing a discount.", @@ -2907,7 +2908,7 @@ "labels": [] }, { "name": "DiscountError", "locations": - [ { "lineno": 206, + [ { "lineno": 209, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about a discount error.", @@ -3118,7 +3119,7 @@ "labels": [] }, { "name": "DiscountErrors", "locations": - [ { "lineno": 198, + [ { "lineno": 201, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about discount errors.", @@ -3332,7 +3333,7 @@ "labels": [] }, { "name": "Fee", "locations": - [ { "lineno": 384, + [ { "lineno": 387, "filename": "tickets.js" } ], "docs": { "summary": "An object representing a fee.", @@ -3815,7 +3816,7 @@ "labels": [] }, { "name": "Invoice", "locations": - [ { "lineno": 312, + [ { "lineno": 315, "filename": "tickets.js" } ], "docs": { "summary": "An object representing a ticket order invoice.", @@ -4318,7 +4319,7 @@ "labels": [] }, { "name": "InvoiceItem", "locations": - [ { "lineno": 335, + [ { "lineno": 338, "filename": "tickets.js" } ], "docs": { "summary": "An object representing a ticket order invoice item.", @@ -4818,7 +4819,7 @@ "labels": [] }, { "name": "Money", "locations": - [ { "lineno": 248, + [ { "lineno": 251, "filename": "tickets.js" } ], "docs": { "summary": "An object representing a monetary amount.", @@ -4838,7 +4839,7 @@ "labels": [] }, { "name": "Order", "locations": - [ { "lineno": 272, + [ { "lineno": 275, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about a ticket order.", @@ -5406,7 +5407,7 @@ "labels": [] }, { "name": "Reservation", "locations": - [ { "lineno": 222, + [ { "lineno": 225, "filename": "tickets.js" } ], "docs": { "summary": "An object representing ticket reservations.", @@ -5639,7 +5640,7 @@ "labels": [] }, { "name": "ReservationResponse", "locations": - [ { "lineno": 160, + [ { "lineno": 163, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about a reservation created using the [`reserve()`](#reserve) function.", @@ -5881,7 +5882,7 @@ "labels": [] }, { "name": "Tax", "locations": - [ { "lineno": 366, + [ { "lineno": 369, "filename": "tickets.js" } ], "docs": { "summary": "An object representing a tax.", @@ -6367,7 +6368,7 @@ "labels": [] }, { "name": "Ticket", "locations": - [ { "lineno": 231, + [ { "lineno": 234, "filename": "tickets.js" } ], "docs": { "summary": "An object representing a ticket.", @@ -6621,7 +6622,7 @@ "labels": [] }, { "name": "TicketSelection", "locations": - [ { "lineno": 151, + [ { "lineno": 154, "filename": "tickets.js" } ], "docs": { "summary": "An object representing an event ticket.", @@ -6854,7 +6855,7 @@ "labels": [] }, { "name": "UpdateInfo", "locations": - [ { "lineno": 264, + [ { "lineno": 267, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about an order update.", @@ -7093,7 +7094,7 @@ "labels": [] }, { "name": "UpdateOrderResponse", "locations": - [ { "lineno": 181, + [ { "lineno": 184, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about an order updated using the [`updateOrder()`](#updateOrder) function.", @@ -7329,7 +7330,7 @@ "labels": [] }, { "name": "VerifyCouponResponse", "locations": - [ { "lineno": 189, + [ { "lineno": 192, "filename": "tickets.js" } ], "docs": { "summary": "An object containing information about a coupon being verified using the [`verifyCoupon()`](#verifyCoupon) function.", diff --git a/wix-forms-v2/wix-forms-v2.service.json b/wix-forms-v2/wix-forms-v2.service.json index 776f9b505c..bfea6b057c 100644 --- a/wix-forms-v2/wix-forms-v2.service.json +++ b/wix-forms-v2/wix-forms-v2.service.json @@ -8,6 +8,36 @@ "docs": {}, "relatedGuides": [], "properties": [ + { + "name": "formSpamSubmissionReports", + "type": [ + { + "referenceType": "wix-forms-v2.FormSpamSubmissionReports" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true + }, + { + "name": "spamSubmissions", + "type": [ + { + "referenceType": "wix-forms-v2.SpamSubmissions" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true + }, { "name": "submissions", "type": [ @@ -22,6 +52,21 @@ "extra": {} }, "hidden": true + }, + { + "name": "submissionsExtensionSpi", + "type": [ + { + "referenceType": "wix-forms-v2.SubmissionsExtensionSpi" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true } ], "operations": [], diff --git a/wix-forms-v2/wix-forms-v2/Events.service.json b/wix-forms-v2/wix-forms-v2/Events.service.json index 04b07a9b8a..eccb0102f1 100644 --- a/wix-forms-v2/wix-forms-v2/Events.service.json +++ b/wix-forms-v2/wix-forms-v2/Events.service.json @@ -16,7 +16,7 @@ "name": "event", "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsSubmissionCreated", + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmissionCreated", "displayName": "SubmissionCreated" } ], @@ -38,15 +38,47 @@ "description": [], "examples": [ { - "title": "onSubmissionCreated example", + "title": "An event that triggers when submission is created ", "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", "", - " export function wixForms_onSubmissionCreated(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "export function wixForms_onSubmissionCreated(event) {", + " const entityId = event.entity._id;", + " console.log(`Created submission with the id: ${entityId}. Event details: `, event)", + "}", "", - " " + "/* Full event object:", + "{", + " \"entity\": {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"PENDING\",", + " \"submissions\": {", + " \"first_name\": \"Patsy\",", + " \"last_name\": \"McBride\"", + " },", + " \"revision\": \"1\",", + " \"owner\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"_createdDate\": \"2023-12-28T12:55:55.630Z\",", + " \"_updatedDate\": \"2023-12-28T12:55:55.746Z\"", + " },", + " \"metadata\": {", + " \"entityId\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"eventTime\": \"2023-12-28T12:55:55.630Z\",", + " \"id\": \"a92d9e8b-abd7-4903-a954-5a6848f6f4eb\",", + " \"triggeredByAnonymizeRequest\": false", + " }", + "}", + "" ] } ] @@ -61,7 +93,7 @@ "name": "event", "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsSubmissionDeleted", + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmissionDeleted", "displayName": "SubmissionDeleted" } ], @@ -83,15 +115,25 @@ "description": [], "examples": [ { - "title": "onSubmissionDeleted example", + "title": "An event that triggers when a submission is deleted ", "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", "", - " export function wixForms_onSubmissionDeleted(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "export function wixForms_onSubmissionDeleted(event) {", + " console.log(`Deleted submission. Event details: `, event)", + "}", "", - " " + "/* Full event object:", + "{", + " \"metadata\": {", + " \"entityId\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"eventTime\": \"2023-12-28T12:55:55.630Z\",", + " \"id\": \"a92d9e8b-abd7-4903-a954-5a6848f6f4eb\",", + " \"triggeredByAnonymizeRequest\": false", + " }", + "}" ] } ] @@ -106,7 +148,7 @@ "name": "event", "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsSubmissionUpdated", + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmissionUpdated", "displayName": "SubmissionUpdated" } ], @@ -124,19 +166,51 @@ "doc": null }, "docs": { - "summary": "Triggered when a submission is confirmed or updated.", + "summary": "Triggered when:\n- Submission is updated.\n- Submission order status is updated.\n- Submission is confirmed.", "description": [], "examples": [ { - "title": "onSubmissionUpdated example", + "title": "An event that triggers when submission is updated ", "body": [ + "// Place this code in the events.js file", + "// of your site's Backend section.", + "// Add the file if it doesn't exist.", "", - " export function wixForms_onSubmissionUpdated(event) {", - " const eventId = event.metadata.id", - " const entityId = event.entity._id;", - " }", + "export function wixForms_onSubmissionUpdated(event) {", + " const entityId = event.entity._id;", + " console.log(`Updated submission with the id: ${entityId}. Event details: `, event)", + "}", "", - " " + "/* Full event object:", + "{", + " \"entity\": {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"PENDING\",", + " \"submissions\": {", + " \"first_name\": \"Patsy\",", + " \"last_name\": \"McBride\"", + " },", + " \"revision\": \"1\",", + " \"owner\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"_createdDate\": \"2023-12-28T12:55:55.630Z\",", + " \"_updatedDate\": \"2023-12-29T11:53:55.746Z\"", + " },", + " \"metadata\": {", + " \"entityId\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"eventTime\": \"2023-12-29T11:53:55.746Z\",", + " \"id\": \"a92d9e8b-abd7-4903-a954-5a6848f6f4eb\",", + " \"triggeredByAnonymizeRequest\": false", + " }", + "}", + "" ] } ] @@ -147,7 +221,7 @@ ], "messages": [ { - "name": "wixVeloEventsActionEvent", + "name": "formsV4FormSpamSubmissionReportActionEvent", "members": [ { "name": "bodyAsJson", @@ -167,7 +241,47 @@ } }, { - "name": "wixVeloEventsBackendEventMetadata", + "name": "formsV4FormSpamSubmissionReportApplicationError", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + }, + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data related to the error." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the error." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportBackendEventMetadata", "members": [ { "name": "entityId", @@ -213,32 +327,37 @@ } }, { - "name": "wixVeloEventsBulkMarkSubmissionsAsSeenRequest", + "name": "formsV4FormSpamSubmissionReportBulkActionMetadata", "members": [ { - "name": "formId", + "name": "totalFailures", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of the form which the submissions belongs to." + "doc": "Number of items that couldn't be processed." }, { - "name": "ids", + "name": "totalSuccesses", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "number" } ], - "doc": "Submission IDs to mark as seen." + "doc": "Number of items that were successfully processed." + }, + { + "name": "undetailedFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of failures without details because detailed failure threshold was exceeded." } ], "docs": { @@ -248,43 +367,16 @@ } }, { - "name": "wixVeloEventsBulkMarkSubmissionsAsSeenResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "wixVeloEventsCancel", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "wixVeloEventsComplete", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "wixVeloEventsConfirmSubmissionRequest", + "name": "formsV4FormSpamSubmissionReportBulkDeleteFormSpamSubmissionReportByFilterRequest", "members": [ { - "name": "submissionId", + "name": "filter", "type": [ { - "nativeType": "string" + "nativeType": "Object" } ], - "doc": "Submission ID to confirm." + "doc": "Filter object.\n\nSee [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n" } ], "docs": { @@ -294,18 +386,17 @@ } }, { - "name": "wixVeloEventsConfirmSubmissionResponse", + "name": "formsV4FormSpamSubmissionReportBulkDeleteFormSpamSubmissionReportByFilterResponse", "members": [ { - "name": "submission", + "name": "jobId", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "nativeType": "string" } ], - "doc": "The confirmed submission." + "doc": "Job id of bulk delete form submission report by filter job" } ], "docs": { @@ -315,10 +406,20 @@ } }, { - "name": "wixVeloEventsCountSubmissionsRequest", + "name": "formsV4FormSpamSubmissionReportBulkDeleteFormSpamSubmissionReportRequest", "members": [ { - "name": "formIds", + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "formSpamSubmissionReportIds", + "optional": true, "type": [ { "complexType": { @@ -331,16 +432,7 @@ } } ], - "doc": "Form IDs." - }, - { - "name": "namespace", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + "doc": "Ids of the form spam submission reports to delete." } ], "docs": { @@ -350,10 +442,21 @@ } }, { - "name": "wixVeloEventsCountSubmissionsResponse", + "name": "formsV4FormSpamSubmissionReportBulkDeleteFormSpamSubmissionReportResponse", "members": [ { - "name": "formsSubmissionsCount", + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Metadata of request" + }, + { + "name": "results", "optional": true, "type": [ { @@ -361,14 +464,14 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmissionsCount", - "displayName": "FormSubmissionsCount" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportBulkDeleteFormSpamSubmissionReportResult", + "displayName": "BulkDeleteFormSpamSubmissionReportResult" } ] } } ], - "doc": "Forms submission count." + "doc": "Results of bulk report delete" } ], "docs": { @@ -378,17 +481,18 @@ } }, { - "name": "wixVeloEventsCreateSubmissionByOwnerRequest", + "name": "formsV4FormSpamSubmissionReportBulkDeleteFormSpamSubmissionReportResult", "members": [ { - "name": "submission", + "name": "itemMetadata", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportItemMetadata", + "displayName": "ItemMetadata" } ], - "doc": "Submission to create." + "doc": "Deleted item metadata" } ], "docs": { @@ -398,18 +502,33 @@ } }, { - "name": "wixVeloEventsCreateSubmissionByOwnerResponse", + "name": "formsV4FormSpamSubmissionReportBulkReportNotSpamSubmissionRequest", "members": [ { - "name": "submission", + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the form to which belong reports" + }, + { + "name": "formSpamSubmissionReportIds", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "The created submission." + "doc": "Ids of the form spam submission reports to report as not spam." } ], "docs": { @@ -419,38 +538,36 @@ } }, { - "name": "wixVeloEventsCreateSubmissionBySubmitterRequest", + "name": "formsV4FormSpamSubmissionReportBulkReportNotSpamSubmissionResponse", "members": [ { - "name": "submission", + "name": "bulkActionMetadata", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "Submission to create." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "wixVeloEventsCreateSubmissionBySubmitterResponse", - "members": [ + "doc": "Metadata of request" + }, { - "name": "submission", + "name": "results", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportBulkReportNotSpamSubmissionResult", + "displayName": "BulkReportNotSpamSubmissionResult" + } + ] + } } ], - "doc": "The created submission." + "doc": "Info whatever report of specific items was successful" } ], "docs": { @@ -460,27 +577,28 @@ } }, { - "name": "wixVeloEventsCreateSubmissionRequest", + "name": "formsV4FormSpamSubmissionReportBulkReportNotSpamSubmissionResult", "members": [ { - "name": "captchaToken", + "name": "formSpamSubmissionReportId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Captcha token." + "doc": "Id of related report, which was reported as not spam" }, { - "name": "submission", + "name": "itemMetadata", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportItemMetadata", + "displayName": "ItemMetadata" } ], - "doc": "Submission to create." + "doc": "Metadata of submission, marked as not spam" } ], "docs": { @@ -490,18 +608,51 @@ } }, { - "name": "wixVeloEventsCreateSubmissionResponse", + "name": "formsV4FormSpamSubmissionReportBulkReportSpamSubmissionRequest", "members": [ { - "name": "submission", + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the form to which belong submissions to report as spam." + }, + { + "name": "reportReason", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the reason why the submission was reported as spam." + }, + { + "name": "returnEntity", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "nativeType": "boolean" } ], - "doc": "The created submission." + "doc": "When set, items will be returned on successful report" + }, + { + "name": "submissionIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Ids of the submissions to report as spam." } ], "docs": { @@ -511,27 +662,36 @@ } }, { - "name": "wixVeloEventsCursorPaging", + "name": "formsV4FormSpamSubmissionReportBulkReportSpamSubmissionResponse", "members": [ { - "name": "cursor", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportBulkActionMetadata", + "displayName": "BulkActionMetadata" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Metadata of request" }, { - "name": "limit", + "name": "results", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportBulkReportSpamSubmissionResult", + "displayName": "BulkReportSpamSubmissionResult" + } + ] + } } ], - "doc": "Number of items to load." + "doc": "Created reports with metadata" } ], "docs": { @@ -541,38 +701,49 @@ } }, { - "name": "wixVeloEventsCursorPagingMetadata", + "name": "formsV4FormSpamSubmissionReportBulkReportSpamSubmissionResult", "members": [ { - "name": "count", + "name": "item", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReport", + "displayName": "FormSpamSubmissionReport" } ], - "doc": "Number of items returned in the response." + "doc": "Created report, exists if `returnEntity` was set to `true` in the request" }, { - "name": "cursors", + "name": "itemMetadata", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCursors", - "displayName": "Cursors" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportItemMetadata", + "displayName": "ItemMetadata" } ], - "doc": "Offset that was requested." - }, + "doc": "Created report metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportCheckForSpamRequest", + "members": [ { - "name": "hasNext", - "optional": true, + "name": "submission", "type": [ { - "nativeType": "boolean" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSubmission", + "displayName": "FormSubmission" } ], - "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + "doc": "Form submission." } ], "docs": { @@ -582,30 +753,236 @@ } }, { - "name": "wixVeloEventsCursorQuery", + "name": "formsV4FormSpamSubmissionReportCheckForSpamResponse", "members": [ { - "name": "cursorPaging", + "name": "spam", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCursorPaging", - "displayName": "CursorPaging" + "nativeType": "boolean" } ], - "doc": "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`." + "doc": "Is the submission a spam." }, { - "name": "filter", + "name": "spamReport", "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportSpamReport", + "displayName": "SpamReport" } ], - "doc": "Filter object.\n\nSee [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n" - }, - { + "doc": "Spam report details. Filled when spam == true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportCountFormSpamSubmissionReportsRequest", + "members": [ + { + "name": "formIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Form IDs." + }, + { + "name": "namespace", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportCountFormSpamSubmissionReportsResponse", + "members": [ + { + "name": "formsSpamSubmissionReportsCount", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReportsCount", + "displayName": "FormSpamSubmissionReportsCount" + } + ] + } + } + ], + "doc": "Forms submission count." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportCreateFormSpamSubmissionReportRequest", + "members": [ + { + "name": "formSpamSubmissionReport", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReport", + "displayName": "FormSpamSubmissionReport" + } + ], + "doc": "Form spam submission report to be created." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportCreateFormSpamSubmissionReportResponse", + "members": [ + { + "name": "formSpamSubmissionReport", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReport", + "displayName": "FormSpamSubmissionReport" + } + ], + "doc": "The created form spam submission report." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportCursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportCursors", + "displayName": "Cursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportCursorQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object.\n\nSee [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n" + }, + { "name": "sort", "optional": true, "type": [ @@ -614,7 +991,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsSorting", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportSorting", "displayName": "Sorting" } ] @@ -641,14 +1018,14 @@ } }, { - "name": "wixVeloEventsCursorQueryPagingMethodOneOf", + "name": "formsV4FormSpamSubmissionReportCursorQueryPagingMethodOneOf", "members": [ { "name": "cursorPaging", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCursorPaging", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportCursorPaging", "displayName": "CursorPaging" } ], @@ -662,7 +1039,7 @@ } }, { - "name": "wixVeloEventsCursors", + "name": "formsV4FormSpamSubmissionReportCursors", "members": [ { "name": "next", @@ -692,16 +1069,16 @@ } }, { - "name": "wixVeloEventsDeleteSubmissionRequest", + "name": "formsV4FormSpamSubmissionReportDeleteFormSpamSubmissionReportRequest", "members": [ { - "name": "submissionId", + "name": "formSpamSubmissionReportId", "type": [ { "nativeType": "string" } ], - "doc": "ID of the submission to delete." + "doc": "Id of the form spam submission report to delete." } ], "docs": { @@ -711,7 +1088,7 @@ } }, { - "name": "wixVeloEventsDeleteSubmissionResponse", + "name": "formsV4FormSpamSubmissionReportDeleteFormSpamSubmissionReportResponse", "members": [], "docs": { "description": [ @@ -720,7 +1097,7 @@ } }, { - "name": "wixVeloEventsDomainEvent", + "name": "formsV4FormSpamSubmissionReportDomainEvent", "members": [ { "name": "_id", @@ -730,14 +1107,14 @@ "nativeType": "string" } ], - "doc": "random GUID so clients can tell if event was already handled" + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsActionEvent", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportActionEvent", "displayName": "ActionEvent" } ], @@ -748,7 +1125,7 @@ "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsEntityCreatedEvent", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportEntityCreatedEvent", "displayName": "EntityCreatedEvent" } ], @@ -759,7 +1136,7 @@ "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsEntityDeletedEvent", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportEntityDeletedEvent", "displayName": "EntityDeletedEvent" } ], @@ -793,7 +1170,7 @@ "nativeType": "string" } ], - "doc": "Assuming that all messages including Actions have id\nExample: The id of the specific order, the id of a specific campaign" + "doc": "ID of the entity associated with the event." }, { "name": "eventTime", @@ -803,7 +1180,7 @@ "nativeType": "Date" } ], - "doc": "The time of the event. Useful if there was a delay in dispatching" + "doc": "Event timestamp." }, { "name": "originatedFrom", @@ -833,14 +1210,14 @@ "nativeType": "boolean" } ], - "doc": "A field that should be set if this event was triggered by an anonymize request.\nFor example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.\nNOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers." + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { "name": "updatedEvent", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsEntityUpdatedEvent", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportEntityUpdatedEvent", "displayName": "EntityUpdatedEvent" } ], @@ -867,14 +1244,14 @@ } }, { - "name": "wixVeloEventsDomainEventBodyOneOf", + "name": "formsV4FormSpamSubmissionReportDomainEventBodyOneOf", "members": [ { "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsActionEvent", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportActionEvent", "displayName": "ActionEvent" } ], @@ -885,7 +1262,7 @@ "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsEntityCreatedEvent", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportEntityCreatedEvent", "displayName": "EntityCreatedEvent" } ], @@ -896,7 +1273,7 @@ "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsEntityDeletedEvent", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportEntityDeletedEvent", "displayName": "EntityDeletedEvent" } ], @@ -907,7 +1284,7 @@ "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsEntityUpdatedEvent", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportEntityUpdatedEvent", "displayName": "EntityUpdatedEvent" } ], @@ -921,7 +1298,7 @@ } }, { - "name": "wixVeloEventsEmpty", + "name": "formsV4FormSpamSubmissionReportEmpty", "members": [], "docs": { "description": [ @@ -930,7 +1307,7 @@ } }, { - "name": "wixVeloEventsEntityCreatedEvent", + "name": "formsV4FormSpamSubmissionReportEntityCreatedEvent", "members": [ { "name": "entityAsJson", @@ -950,8 +1327,19 @@ } }, { - "name": "wixVeloEventsEntityDeletedEvent", - "members": [], + "name": "formsV4FormSpamSubmissionReportEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], "docs": { "description": [ "" @@ -959,7 +1347,7 @@ } }, { - "name": "wixVeloEventsEntityUpdatedEvent", + "name": "formsV4FormSpamSubmissionReportEntityUpdatedEvent", "members": [ { "name": "currentEntityAsJson", @@ -979,18 +1367,47 @@ } }, { - "name": "wixVeloEventsFormSubmission", + "name": "formsV4FormSpamSubmissionReportExtendedFields", + "members": [ + { + "name": "namespaces", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "Object" + } + ] + } + } + ], + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportFormSpamSubmissionReport", "members": [ { "name": "_createdDate", - "readOnly": true, "optional": true, "type": [ { "nativeType": "Date" } ], - "doc": "Date and time the form submission was created." + "doc": "Date of submission creation. If a submission was created in the past, pass the original submission creation date." }, { "name": "_id", @@ -1001,7 +1418,7 @@ "nativeType": "string" } ], - "doc": "Submission ID." + "doc": "Form spam submission report id." }, { "name": "_updatedDate", @@ -1012,31 +1429,31 @@ "nativeType": "Date" } ], - "doc": "Date and time the form submission was updated." + "doc": "Date of last update." }, { - "name": "formId", + "name": "extendedFields", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportExtendedFields", + "displayName": "ExtendedFields" } ], - "doc": "ID of the form which submission belongs to." + "doc": "Data extensions ExtendedFields." }, { - "name": "namespace", - "readOnly": true, + "name": "formId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + "doc": "Id of a form to which the form spam submission report belongs." }, { - "name": "revision", + "name": "namespace", "readOnly": true, "optional": true, "type": [ @@ -1044,126 +1461,111 @@ "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission." + "doc": "Form namespace to which the form spam submission report belongs." }, { - "name": "seen", + "name": "orderDetails", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReportOrderDetails", + "displayName": "FormSpamSubmissionReportOrderDetails" } ], - "doc": "Whether the submission was read by a site collaborator with permissions to manage submissions." + "doc": "Order details." }, { - "name": "status", + "name": "reportReason", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Status of the submission.\n- `PENDING`: When a submission has been created, but has not yet been recorded in the submission table of the forms dashboard.\n- `CONFIRMED`: When a submission is recorded in the submissions table of the forms dashboard." + "doc": "Identifies the reason why the submission was reported as spam." }, { - "name": "submissions", + "name": "reportedDate", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "Date" } ], - "doc": "Submission values where key is the form field and value is the data submitted for the given field." + "doc": "Date of form spam submission report creation." }, { - "name": "submitter", + "name": "revision", "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsSubmitter", - "displayName": "Submitter" + "nativeType": "string" } ], - "doc": "ID of the creator of the form submission." - } - ], - "docs": { - "description": [ - "Form submission that was created or retrieved." - ] - } - }, - { - "name": "wixVeloEventsFormSubmissionsCount", - "members": [ + "doc": "Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision." + }, { - "name": "formId", + "name": "submissionStatusAtReport", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Form ID." + "doc": "Last status of the submission at the time of the report" }, { - "name": "totalCount", + "name": "submissions", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Object" } ], - "doc": "Total number of submissions." + "doc": "Submission values where key is a target of a form field and value is a submissions for the given field." }, { - "name": "unseenCount", + "name": "submitter", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportSubmitter", + "displayName": "Submitter" } ], - "doc": "Number of submissions that haven't yet been seen by site collaborators with manage submission permissions." + "doc": "Form submission submitter id." } ], "docs": { "description": [ - "" + "FormSpamSubmissionReportReport stores a form submission spam report.\nIt contains submission details as well as report reason." ] } }, { - "name": "wixVeloEventsGetMediaUploadUrlRequest", + "name": "formsV4FormSpamSubmissionReportFormSpamSubmissionReportCreated", "members": [ { - "name": "filename", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Name of file to upload." - }, - { - "name": "formId", + "name": "entity", "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReport", + "displayName": "FormSpamSubmissionReport" } ], - "doc": "Form ID." + "doc": "Created form spam submission report." }, { - "name": "mimeType", + "name": "metadata", "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportBackendEventMetadata", + "displayName": "BackendEventMetadata" } ], - "doc": "[Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#) of file to upload.\n\nFor example, `'image/png'`\n" + "doc": "Event metadata." } ], "docs": { @@ -1173,17 +1575,17 @@ } }, { - "name": "wixVeloEventsGetMediaUploadUrlResponse", + "name": "formsV4FormSpamSubmissionReportFormSpamSubmissionReportDeleted", "members": [ { - "name": "uploadUrl", - "optional": true, + "name": "metadata", "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportBackendEventMetadata", + "displayName": "BackendEventMetadata" } ], - "doc": "Url to upload file." + "doc": "Event metadata." } ], "docs": { @@ -1193,16 +1595,18 @@ } }, { - "name": "wixVeloEventsGetSubmissionRequest", + "name": "formsV4FormSpamSubmissionReportFormSpamSubmissionReportOrderDetails", "members": [ { - "name": "submissionId", + "name": "checkoutId", + "readOnly": true, + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the submission to retrieve." + "doc": "ID of the checkout related to submission (applicable if form has payments added)." } ], "docs": { @@ -1212,18 +1616,27 @@ } }, { - "name": "wixVeloEventsGetSubmissionResponse", + "name": "formsV4FormSpamSubmissionReportFormSpamSubmissionReportsCount", "members": [ { - "name": "submission", + "name": "formId", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "nativeType": "string" } ], - "doc": "The retrieved submission." + "doc": "Form ID." + }, + { + "name": "totalCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of submissions." } ], "docs": { @@ -1233,200 +1646,155 @@ } }, { - "name": "wixVeloEventsOwner", + "name": "formsV4FormSpamSubmissionReportFormSubmission", "members": [ { - "name": "externalAppId", + "name": "_createdDate", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "External app id" + "doc": "Date and time the form submission was created." }, { - "name": "memberId", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Member ID." + "doc": "Submission ID." }, { - "name": "serviceId", + "name": "_updatedDate", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Service ID." + "doc": "Date and time the form submission was updated." }, { - "name": "userId", + "name": "extendedFields", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportExtendedFields", + "displayName": "ExtendedFields" } ], - "doc": "User ID." + "doc": "Data extension object that holds users' and apps' fields." }, { - "name": "visitorId", + "name": "formId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Visitor ID." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfOwnerOwnerOneOf", - "members": [ - "externalAppId", - "memberId", - "serviceId", - "userId", - "visitorId" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "wixVeloEventsOwnerOwnerOneOf", - "members": [ + "doc": "ID of the form which the submission belongs to." + }, { - "name": "externalAppId", + "name": "namespace", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "External app id" + "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace." }, { - "name": "memberId", + "name": "orderDetails", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportOrderDetails", + "displayName": "OrderDetails" } ], - "doc": "Member ID." + "doc": "Order details.
\nNote: This object is only applicable when submittng a form in the Wix Payments app." }, { - "name": "serviceId", + "name": "revision", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Service ID." + "doc": "Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission." }, { - "name": "userId", + "name": "seen", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "User ID." + "doc": "Whether a site owner marked a submission as \"seen\"." }, { - "name": "visitorId", + "name": "status", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Visitor ID." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "wixVeloEventsQuerySubmissionRequest", - "members": [ + "doc": "Status of the submission.\n- `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.\n- `PAYMENT_WAITING`: A form submission requiring payment is created.\n- `PAYMENT_CANCELED`: An order of a form submission is canceled.\n- `CONFIRMED`: A submission is recorded in the Wix Forms collection." + }, { - "name": "onlyYourOwn", + "name": "submissions", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "Object" } ], - "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + "doc": "Submission values where `key` is the form field and `value` is the data submitted for the given field." }, { - "name": "query", + "name": "submitter", + "readOnly": true, + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCursorQuery", - "displayName": "CursorQuery" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportSubmitter", + "displayName": "Submitter" } ], - "doc": "Query options." + "doc": "ID of the visitor that submitted the form." } ], "docs": { "description": [ - "" + "Form submission that was created or retrieved." ] } }, { - "name": "wixVeloEventsQuerySubmissionResponse", + "name": "formsV4FormSpamSubmissionReportGetFormSpamSubmissionReportRequest", "members": [ { - "name": "metadata", - "optional": true, - "type": [ - { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCursorPagingMetadata", - "displayName": "CursorPagingMetadata" - } - ], - "doc": "Paging metadata." - }, - { - "name": "submissions", - "optional": true, + "name": "formSpamSubmissionReportId", "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" - } - ] - } + "nativeType": "string" } ], - "doc": "The retrieved submissions." + "doc": "Id of the form spam submission report to retrieve." } ], "docs": { @@ -1436,27 +1804,18 @@ } }, { - "name": "wixVeloEventsQuerySubmissionsByNamespaceRequest", + "name": "formsV4FormSpamSubmissionReportGetFormSpamSubmissionReportResponse", "members": [ { - "name": "onlyYourOwn", + "name": "formSpamSubmissionReport", "optional": true, "type": [ { - "nativeType": "boolean" - } - ], - "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." - }, - { - "name": "query", - "type": [ - { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCursorQuery", - "displayName": "CursorQuery" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReport", + "displayName": "FormSpamSubmissionReport" } ], - "doc": "Query options." + "doc": "The retrieved form spam submission report." } ], "docs": { @@ -1466,66 +1825,48 @@ } }, { - "name": "wixVeloEventsQuerySubmissionsByNamespaceResponse", + "name": "formsV4FormSpamSubmissionReportItemMetadata", "members": [ { - "name": "metadata", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCursorPagingMetadata", - "displayName": "CursorPagingMetadata" + "nativeType": "string" } ], - "doc": "Paging metadata." + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." }, { - "name": "submissions", + "name": "error", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" - } - ] - } + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportApplicationError", + "displayName": "ApplicationError" } ], - "doc": "The retrieved Submissions." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "wixVeloEventsReschedule", - "members": [ + "doc": "Details about the error in case of failure." + }, { - "name": "executeAt", + "name": "originalIndex", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "number" } ], - "doc": "" + "doc": "Index of the item within the request array. Allows for correlation between request and response items." }, { - "name": "payload", + "name": "success", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." } ], "docs": { @@ -1535,40 +1876,32 @@ } }, { - "name": "wixVeloEventsSorting", + "name": "formsV4FormSpamSubmissionReportOrderDetails", "members": [ { - "name": "fieldName", + "name": "checkoutId", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Name of the field to sort by." + "doc": "ID of the checkout related to submission (only applicable if a form has payments)." }, { - "name": "order", + "name": "currency", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Sort order." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "wixVeloEventsSubmissionContactMapped", - "members": [ + "doc": "Currency." + }, { - "name": "contactId", + "name": "itemSubtotal", "readOnly": true, "optional": true, "type": [ @@ -1576,35 +1909,29 @@ "nativeType": "string" } ], - "doc": "Mapped upserted contact ID." + "doc": "Item subtotal." }, { - "name": "emails", + "name": "number", "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Mapped contact emails." + "doc": "Order number." }, { - "name": "namespace", + "name": "orderId", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Identifies the namespace that the submission's form belongs to." + "doc": "ID of the order related to submission (only applicable if a form has payments)." } ], "docs": { @@ -1614,27 +1941,17 @@ } }, { - "name": "wixVeloEventsSubmissionContactMappedEvent", + "name": "formsV4FormSpamSubmissionReportQueryFormSpamSubmissionReportsByNamespaceRequest", "members": [ { - "name": "data", - "type": [ - { - "referenceType": "wix-forms-v2.Events.wixVeloEventsSubmissionContactMapped", - "displayName": "SubmissionContactMapped" - } - ], - "doc": "" - }, - { - "name": "metadata", + "name": "query", "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsBackendEventMetadata", - "displayName": "BackendEventMetadata" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportCursorQuery", + "displayName": "CursorQuery" } ], - "doc": "" + "doc": "WQL expression." } ], "docs": { @@ -1644,27 +1961,36 @@ } }, { - "name": "wixVeloEventsSubmissionCreated", + "name": "formsV4FormSpamSubmissionReportQueryFormSpamSubmissionReportsByNamespaceResponse", "members": [ { - "name": "entity", + "name": "formSpamSubmissionReports", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReport", + "displayName": "FormSpamSubmissionReport" + } + ] + } } ], - "doc": "Information about the created submission." + "doc": "The retrieved FormSpamSubmissionReports." }, { - "name": "metadata", + "name": "pagingMetadata", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsBackendEventMetadata", - "displayName": "BackendEventMetadata" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportCursorPagingMetadata", + "displayName": "CursorPagingMetadata" } ], - "doc": "Event metadata." + "doc": "Details on the paged set of results returned." } ], "docs": { @@ -1674,17 +2000,16 @@ } }, { - "name": "wixVeloEventsSubmissionDeleted", + "name": "formsV4FormSpamSubmissionReportReportNotSpamSubmissionRequest", "members": [ { - "name": "metadata", + "name": "formSpamSubmissionReportId", "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsBackendEventMetadata", - "displayName": "BackendEventMetadata" + "nativeType": "string" } ], - "doc": "Event metadata." + "doc": "Id of the form spam submission report to report as not spam." } ], "docs": { @@ -1694,27 +2019,46 @@ } }, { - "name": "wixVeloEventsSubmissionUpdated", + "name": "formsV4FormSpamSubmissionReportReportNotSpamSubmissionResponse", "members": [ { - "name": "entity", + "name": "submission", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSubmission", "displayName": "FormSubmission" } ], - "doc": "Information about the updated submission." + "doc": "Created form submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportReportSpamSubmissionRequest", + "members": [ + { + "name": "reportReason", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the reason why the submission was reported as spam." }, { - "name": "metadata", + "name": "submissionId", "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsBackendEventMetadata", - "displayName": "BackendEventMetadata" + "nativeType": "string" } ], - "doc": "Event metadata." + "doc": "Id of the submission to report as spam." } ], "docs": { @@ -1724,37 +2068,48 @@ } }, { - "name": "wixVeloEventsSubmitContactResponse", + "name": "formsV4FormSpamSubmissionReportReportSpamSubmissionResponse", "members": [ { - "name": "contactId", + "name": "formSpamSubmissionReport", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4FormSpamSubmissionReportFormSpamSubmissionReport", + "displayName": "FormSpamSubmissionReport" } ], - "doc": "ID of the contact that was found or created." - }, + "doc": "Created form spam submission report." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportSorting", + "members": [ { - "name": "identityType", + "name": "fieldName", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Identity type of the returned contact.\n\n- `CONTACT`: The returned contact ID belongs to a new or existing contact.\n- `MEMBER`: The returned contact ID belongs to the currently logged-in site member.\n- `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.\n" + "doc": "Name of the field to sort by." }, { - "name": "newContact", + "name": "order", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Indicates whether the contact was just created or already existed.\n\nIf the contact was just created, returns `true`.\nIf it already existed, returns `false`.\n" + "doc": "Sort order." } ], "docs": { @@ -1764,37 +2119,47 @@ } }, { - "name": "wixVeloEventsSubmitter", + "name": "formsV4FormSpamSubmissionReportSpamReport", "members": [ { - "name": "externalAppId", + "name": "reportReason", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "App ID." - }, + "doc": "Identifies the reason why the submission was reported as spam." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4FormSpamSubmissionReportSubmitter", + "members": [ { - "name": "memberId", + "name": "applicationId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Member ID." + "doc": "Application ID." }, { - "name": "serviceId", + "name": "memberId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Service ID." + "doc": "Member ID." }, { "name": "userId", @@ -1822,9 +2187,8 @@ { "name": "oneOfSubmitterSubmitterOneOf", "members": [ - "externalAppId", + "applicationId", "memberId", - "serviceId", "userId", "visitorId" ] @@ -1838,17 +2202,17 @@ } }, { - "name": "wixVeloEventsSubmitterSubmitterOneOf", + "name": "formsV4FormSpamSubmissionReportSubmitterSubmitterOneOf", "members": [ { - "name": "externalAppId", + "name": "applicationId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "App ID." + "doc": "Application ID." }, { "name": "memberId", @@ -1861,34 +2225,44 @@ "doc": "Member ID." }, { - "name": "serviceId", + "name": "userId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Service ID." + "doc": "User ID." }, { - "name": "userId", + "name": "visitorId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "User ID." - }, + "doc": "Visitor ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionActionEvent", + "members": [ { - "name": "visitorId", + "name": "bodyAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Visitor ID." + "doc": "" } ], "docs": { @@ -1898,38 +2272,47 @@ } }, { - "name": "wixVeloEventsTask", + "name": "formsV4SpamSubmissionAddressInfo", "members": [ { - "name": "executeAt", + "name": "tag", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "" - }, + "doc": "Address tag." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionAlternativeUri", + "members": [ { - "name": "key", + "name": "absoluteUri", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsTaskKey", - "displayName": "TaskKey" + "nativeType": "string" } ], - "doc": "" + "doc": "absolute uri that will be used by the host to call that method. The path-suffix mapped from the method http option will NOT be appended to this URI. For TPAs. it must be https" }, { - "name": "payload", + "name": "methodName", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "name of the method as it appears in the proto" } ], "docs": { @@ -1939,50 +2322,119 @@ } }, { - "name": "wixVeloEventsTaskAction", + "name": "formsV4SpamSubmissionAnchorData", "members": [ { - "name": "cancel", + "name": "anchor", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCancel", - "displayName": "Cancel" + "nativeType": "string" } ], - "doc": "" + "doc": "The target node's ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionAppEmbedData", + "members": [ + { + "name": "bookingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBookingData", + "displayName": "BookingData" + } + ], + "doc": "Data for embedded Wix Bookings content." }, { - "name": "complete", + "name": "eventData", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsComplete", - "displayName": "Complete" + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEventData", + "displayName": "EventData" } ], - "doc": "" + "doc": "Data for embedded Wix Events content." }, { - "name": "reschedule", + "name": "image", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsReschedule", - "displayName": "Reschedule" + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" } ], - "doc": "" + "doc": "An image for the embedded content." + }, + { + "name": "imageSrc", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Deprecated: Use `image` instead." + }, + { + "name": "itemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the embedded content." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the embedded content." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of Wix App content being embedded." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the embedded content." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfTaskActionActionOneOf", + "name": "oneOfAppEmbedDataAppDataOneOf", "members": [ - "cancel", - "complete", - "reschedule" + "bookingData", + "eventData" ] } ] @@ -1994,40 +2446,29 @@ } }, { - "name": "wixVeloEventsTaskActionActionOneOf", + "name": "formsV4SpamSubmissionAppEmbedDataAppDataOneOf", "members": [ { - "name": "cancel", - "optional": true, - "type": [ - { - "referenceType": "wix-forms-v2.Events.wixVeloEventsCancel", - "displayName": "Cancel" - } - ], - "doc": "" - }, - { - "name": "complete", + "name": "bookingData", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsComplete", - "displayName": "Complete" + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBookingData", + "displayName": "BookingData" } ], - "doc": "" + "doc": "Data for embedded Wix Bookings content." }, { - "name": "reschedule", + "name": "eventData", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsReschedule", - "displayName": "Reschedule" + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEventData", + "displayName": "EventData" } ], - "doc": "" + "doc": "Data for embedded Wix Events content." } ], "docs": { @@ -2037,39 +2478,52 @@ } }, { - "name": "wixVeloEventsTaskKey", + "name": "formsV4SpamSubmissionArray", "members": [ { - "name": "appId", + "name": "checkboxGroupOptions", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCheckboxGroup", + "displayName": "CheckboxGroup" } ], - "doc": "" + "doc": "Checkbox group input field" }, { - "name": "instanceId", + "name": "componentType", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Component type of the array input field" }, { - "name": "subjectId", + "name": "validation", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldArrayType", + "displayName": "InputFieldArrayType" } ], - "doc": "" + "doc": "Validation of array type." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfArrayComponentTypeOptionsOneOf", + "members": [ + "checkboxGroupOptions" + ] + } + ] + }, "docs": { "description": [ "" @@ -2077,17 +2531,18 @@ } }, { - "name": "wixVeloEventsUpdateSubmissionRequest", + "name": "formsV4SpamSubmissionArrayComponentTypeOptionsOneOf", "members": [ { - "name": "submission", + "name": "checkboxGroupOptions", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCheckboxGroup", + "displayName": "CheckboxGroup" } ], - "doc": "Submission to update." + "doc": "Checkbox group input field" } ], "docs": { @@ -2097,18 +2552,17 @@ } }, { - "name": "wixVeloEventsUpdateSubmissionResponse", + "name": "formsV4SpamSubmissionArrayErrorMessages", "members": [ { - "name": "submission", + "name": "default", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsFormSubmission", - "displayName": "FormSubmission" + "nativeType": "string" } ], - "doc": "The updated submission." + "doc": "Default error message on invalid validation." } ], "docs": { @@ -2118,36 +2572,25254 @@ } }, { - "name": "wixVeloEventsUpsertContactFromSubmissionRequest", + "name": "formsV4SpamSubmissionArrayItems", "members": [ { - "name": "contactId", + "name": "boolean", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBooleanType", + "displayName": "BooleanType" } ], - "doc": "Optional contact id to which submission should be mapped." + "doc": "Boolean type validation for items." }, { - "name": "emailVerified", + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionObjectType", + "displayName": "ObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "String type validation for items." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfArrayItemsItemsOneOf", + "members": [ + "boolean", + "integer", + "number", + "object", + "string" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionArrayItemsItemsOneOf", + "members": [ + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionObjectType", + "displayName": "ObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "String type validation for items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionArrayType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionArrayErrorMessages", + "displayName": "ArrayErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionArrayItems", + "displayName": "ArrayItems" + } + ], + "doc": "Type of items allowed in array." + }, + { + "name": "maxItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum amount of array elements." + }, + { + "name": "minItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum amount of array elements." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionArrayTypeArrayItems", + "members": [ + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldIntegerType", + "displayName": "InputFieldIntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "itemType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of array items" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldObjectType", + "displayName": "InputFieldObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "String type validation for items." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfArrayTypeArrayItemsItemTypeOptionsOneOf", + "members": [ + "booleanOptions", + "integerOptions", + "numberOptions", + "objectOptions", + "stringOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionArrayTypeArrayItemsItemTypeOptionsOneOf", + "members": [ + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldIntegerType", + "displayName": "InputFieldIntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldObjectType", + "displayName": "InputFieldObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "String type validation for items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionAudioData", + "members": [ + { + "name": "audio", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Audio file details." + }, + { + "name": "authorName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Author name." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the audio node's container." + }, + { + "name": "coverImage", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Cover image." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the audio node's download button is disabled." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An HTML version of the audio node." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Track name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBackendEventMetadata", + "members": [ + { + "name": "entityId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event timestamp." + }, + { + "name": "id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event ID." + }, + { + "name": "triggeredByAnonymizeRequest", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBackground", + "members": [ + { + "name": "color", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexademical value." + }, + { + "name": "gradient", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGradient", + "displayName": "Gradient" + } + ], + "doc": "Details for a gradient background." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "An image to use for the background." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Background type. For each option, include the relevant details." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBackgroundBackgroundOneOf", + "members": [ + "color", + "gradient", + "image" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBackgroundBackgroundOneOf", + "members": [ + { + "name": "color", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexademical value." + }, + { + "name": "gradient", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGradient", + "displayName": "Gradient" + } + ], + "doc": "Details for a gradient background." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "An image to use for the background." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBlockquoteData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBookingData", + "members": [ + { + "name": "durations", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booking duration in minutes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBoolean", + "members": [ + { + "name": "checkboxOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCheckbox", + "displayName": "Checkbox" + } + ], + "doc": "Checkbox input field" + }, + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the boolean input field" + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Validation of field output value." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBooleanComponentTypeOptionsOneOf", + "members": [ + "checkboxOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBooleanComponentTypeOptionsOneOf", + "members": [ + { + "name": "checkboxOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCheckbox", + "displayName": "Checkbox" + } + ], + "doc": "Checkbox input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBooleanErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBooleanType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "boolean" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBooleanErrorMessages", + "displayName": "BooleanErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBorder", + "members": [ + { + "name": "radius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBorderColors", + "members": [ + { + "name": "bottom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Bottom border color as a hexadecimal value." + }, + { + "name": "left", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Left border color as a hexadecimal value." + }, + { + "name": "right", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Right border color as a hexadecimal value." + }, + { + "name": "top", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Top border color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBreakPoint", + "members": [ + { + "name": "columns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of columns of layout grid." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionItemLayout", + "displayName": "ItemLayout" + } + ] + } + } + ], + "doc": "Description of layouts for items." + }, + { + "name": "margin", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMargin", + "displayName": "Margin" + } + ], + "doc": "Description of elements margins." + }, + { + "name": "padding", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMargin", + "displayName": "Margin" + } + ], + "doc": "Description of elements paddings." + }, + { + "name": "rowHeight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Row height of layout grid." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionBulletedListData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionButtonData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the button's container." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLink", + "displayName": "Link" + } + ], + "doc": "Button link details." + }, + { + "name": "styles", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStyles", + "displayName": "Styles" + } + ], + "doc": "Styling for the button." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text to display on the button." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The button type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCellStyle", + "members": [ + { + "name": "backgroundColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cell background color as a hexadecimal value." + }, + { + "name": "verticalAlignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Vertical alignment for the cell's text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCheckbox", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Label of the field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCheckboxGroup", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCustomOption", + "displayName": "CustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionOption", + "displayName": "Option" + } + ] + } + } + ], + "doc": "List of options to select from" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCheckboxGroupOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations." + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Media item. Media, associated with option, like image." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Selectable option value, which is saved to DB. Corresponds to product id, found in field's products list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCodeBlockData", + "members": [ + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextStyle", + "displayName": "TextStyle" + } + ], + "doc": "Styling for the code block's text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCollapsibleListData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the collapsible list's container." + }, + { + "name": "direction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The direction of the text in the list. Either left-to-right or right-to-left." + }, + { + "name": "expandOnlyOne", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If `true`, only one item can be expanded at a time." + }, + { + "name": "initialExpandedItems", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets which items are expanded when the page loads." + }, + { + "name": "isQapageData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If `true`, The collapsible item will appear in search results as an FAQ." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionColorData", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text's background color as a hexadecimal value." + }, + { + "name": "foreground", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text's foreground color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionColors", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexadecimal value." + }, + { + "name": "border", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The border color as a hexadecimal value." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionContext", + "members": [ + { + "name": "currency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "3 capital letters string representing a currency according to ISO-4217" + }, + { + "name": "identity", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionIdentificationData", + "displayName": "IdentificationData" + } + ], + "doc": "The identification type and identity data" + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "App instance ID of SPI in context" + }, + { + "name": "languages", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "A string representing a language and region in the format of \"xx-XX\". First 2 letters represent the language code according to ISO 639-1. This is followed by a dash \"-\", and then a by 2 capital letters representing the region according to ISO 3166-2" + }, + { + "name": "requestId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A unique identifier for each request. Can be used for logging / troubleshooting" + } + ], + "docs": { + "description": [ + "this message is not directly used by any service,\nit exists to describe the expected parameters that SHOULD be provided to invoked Velo methods as part of open-platform.\ne.g. SPIs, event-handlers, etc..\nNOTE: this context object MUST be provided as the last argument in each Velo method signature." + ] + } + }, + { + "name": "formsV4SpamSubmissionCreateSpamSubmissionRequest", + "members": [ + { + "name": "spamSubmission", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "Spam submission to be created." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCreateSpamSubmissionResponse", + "members": [ + { + "name": "spamSubmission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "The created spam submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCursors", + "displayName": "Cursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCursorQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object.\n\nSee [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sort object." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCursorQueryPagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCursorQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCustomFieldInfo", + "members": [ + { + "name": "key", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom field key." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionCustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDataExtensionsDetails", + "members": [ + { + "name": "fqdns", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "FQDNS which can be extended with this field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDateTimeConstraints", + "members": [ + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as \"$now\" to represent the current date and time.\nThe dynamic calculation supports expressions like \"$now+2d\" (2 days in the future), \"$now-1h\" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])" + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as \"$now\" to represent the current date and time.\nThe dynamic calculation supports expressions like \"$now+2d\" (2 days in the future), \"$now-1h\" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDecoration", + "members": [ + { + "name": "anchorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAnchorData", + "displayName": "AnchorData" + } + ], + "doc": "Data for an anchor link decoration." + }, + { + "name": "colorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionColorData", + "displayName": "ColorData" + } + ], + "doc": "Data for a color decoration." + }, + { + "name": "fontSizeData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFontSizeData", + "displayName": "FontSizeData" + } + ], + "doc": "Data for a font size decoration." + }, + { + "name": "fontWeightValue", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font weight for a bold decoration." + }, + { + "name": "italicData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an italic decoration." + }, + { + "name": "linkData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLinkData", + "displayName": "LinkData" + } + ], + "doc": "Data for an external link decoration." + }, + { + "name": "mentionData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMentionData", + "displayName": "MentionData" + } + ], + "doc": "Data for a mention decoration." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of decoration to apply." + }, + { + "name": "underlineData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an underline decoration." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDecorationDataOneOf", + "members": [ + "anchorData", + "colorData", + "fontSizeData", + "fontWeightValue", + "italicData", + "linkData", + "mentionData", + "underlineData" + ] + } + ] + }, + "docs": { + "description": [ + "Adds appearence changes to text" + ] + } + }, + { + "name": "formsV4SpamSubmissionDecorationDataOneOf", + "members": [ + { + "name": "anchorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAnchorData", + "displayName": "AnchorData" + } + ], + "doc": "Data for an anchor link decoration." + }, + { + "name": "colorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionColorData", + "displayName": "ColorData" + } + ], + "doc": "Data for a color decoration." + }, + { + "name": "fontSizeData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFontSizeData", + "displayName": "FontSizeData" + } + ], + "doc": "Data for a font size decoration." + }, + { + "name": "fontWeightValue", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font weight for a bold decoration." + }, + { + "name": "italicData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an italic decoration." + }, + { + "name": "linkData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLinkData", + "displayName": "LinkData" + } + ], + "doc": "Data for an external link decoration." + }, + { + "name": "mentionData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMentionData", + "displayName": "MentionData" + } + ], + "doc": "Data for a mention decoration." + }, + { + "name": "underlineData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an underline decoration." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDeleteSpamSubmissionRequest", + "members": [ + { + "name": "spamSubmissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the spam submission to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDeleteSpamSubmissionResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDesign", + "members": [ + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionOptionDesign", + "displayName": "OptionDesign" + } + ], + "doc": "Styling for voting options." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPollDesign", + "displayName": "PollDesign" + } + ], + "doc": "Styling for the poll." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDimensions", + "members": [ + { + "name": "colsMinWidth", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing the minimum width of each column in pixels." + }, + { + "name": "colsWidthRatio", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing relative width of each column in relation to the other columns." + }, + { + "name": "rowsHeight", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing the height of each row in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDisplayField", + "members": [ + { + "name": "header", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionHeader", + "displayName": "Header" + } + ], + "doc": "Header field" + }, + { + "name": "richText", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichText", + "displayName": "RichText" + } + ], + "doc": "Rich text field" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDisplayFieldComponentTypeOneOf", + "members": [ + "header", + "richText" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDisplayFieldComponentTypeOneOf", + "members": [ + { + "name": "header", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionHeader", + "displayName": "Header" + } + ], + "doc": "Header field" + }, + { + "name": "richText", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichText", + "displayName": "RichText" + } + ], + "doc": "Rich text field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDividerData", + "members": [ + { + "name": "alignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider alignment." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the divider's container." + }, + { + "name": "lineStyle", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider line style." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider width." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDocumentStyle", + "members": [ + { + "name": "blockquote", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for block quote nodes." + }, + { + "name": "codeBlock", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for code block nodes." + }, + { + "name": "headerFive", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H5 nodes." + }, + { + "name": "headerFour", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H4 nodes." + }, + { + "name": "headerOne", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H1 nodes." + }, + { + "name": "headerSix", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H6 nodes." + }, + { + "name": "headerThree", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H3 nodes." + }, + { + "name": "headerTwo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H2 nodes." + }, + { + "name": "paragraph", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for paragraph nodes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDropdown", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDropdownCustomOption", + "displayName": "DropdownCustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDropdownOption", + "displayName": "DropdownOption" + } + ] + } + } + ], + "doc": "List of options to select from" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of dropdown input" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDropdownCustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDropdownOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionDynamicPriceOptions", + "members": [ + { + "name": "maxPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Maximal price monetary amount." + }, + { + "name": "minPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Minimal price monetary amount." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionEmailInfo", + "members": [ + { + "name": "tag", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Email tag." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionEmbedData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the oEmbed node's container." + }, + { + "name": "oembed", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionOembed", + "displayName": "Oembed" + } + ], + "doc": "An [oEmbed](https://www.oembed.com) object." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Origin asset source." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionEmpty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionEventData", + "members": [ + { + "name": "location", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event location." + }, + { + "name": "scheduling", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event schedule." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionExtendedFields", + "members": [ + { + "name": "namespaces", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "Object" + } + ] + } + } + ], + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFileData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the file's container." + }, + { + "name": "mimeType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File MIME type." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File name." + }, + { + "name": "path", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File path." + }, + { + "name": "pdfSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPdfSettings", + "displayName": "PDFSettings" + } + ], + "doc": "Settings for PDF files." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "File size in KB." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFileSource", + "displayName": "FileSource" + } + ], + "doc": "The source for the file's data." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFileSource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An ID that's resolved to a URL by a resolver function." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom ID. Use `id` instead." + }, + { + "name": "private", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates whether the file's source is private." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the file's source." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFileSourceDataOneOf", + "members": [ + "_id", + "custom", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFileSourceDataOneOf", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An ID that's resolved to a URL by a resolver function." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom ID. Use `id` instead." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the file's source." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFileUpload", + "members": [ + { + "name": "buttonText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text on upload button" + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "explanationText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom text which appears when file is uploaded, if missing file name will be shown" + }, + { + "name": "fileLimit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of files allowed to upload" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + }, + { + "name": "uploadFileFormats", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Supported file formats for upload" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFixedPriceOptions", + "members": [ + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fixed price monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFontSizeData", + "members": [ + { + "name": "unit", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The units used for the font size." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font size value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionForm", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date of creation." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date of last update." + }, + { + "name": "deletedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormField", + "displayName": "FormField" + } + ] + } + } + ], + "doc": "Fields which were soft deleted." + }, + { + "name": "deletedFieldsV2", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormFieldV2", + "displayName": "FormFieldV2" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Data extensions ExtendedFields." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormField", + "displayName": "FormField" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "fieldsV2", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormFieldV2", + "displayName": "FormFieldV2" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "kind", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Regular forms can be freely modified.\nExtensions are copied from templates and might have restrictions." + }, + { + "name": "mediaFolderId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media folder ID." + }, + { + "name": "namespace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the namespace that the form belongs to." + }, + { + "name": "postSubmissionTriggers", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPostSubmissionTriggers", + "displayName": "PostSubmissionTriggers" + } + ], + "doc": "Defines triggers that will be executed after the submission, for the submissions based on this schema.\nForms provide a set of predefined triggers that allow it to assign specific business cases to created forms." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormProperties", + "displayName": "FormProperties" + } + ], + "doc": "Properties of the form." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Represents the current state of an item. Each time the item is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision." + }, + { + "name": "rules", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormRule", + "displayName": "FormRule" + } + ] + } + } + ], + "doc": "Form rules, can be applied to layout and items properties." + }, + { + "name": "steps", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStep", + "displayName": "Step" + } + ] + } + } + ], + "doc": "Defines the layout for form fields in each submission step." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormField", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID." + }, + { + "name": "dataExtensionsDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDataExtensionsDetails", + "displayName": "DataExtensionsDetails" + } + ], + "doc": "Details identifying field, which is extension of other entity" + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden." + }, + { + "name": "pii", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Mark the field as containing personal information. This will encrypt user data when storing it." + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Definition of a target where the value of field belongs." + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionValidation", + "displayName": "Validation" + } + ], + "doc": "Validation of field output value." + }, + { + "name": "view", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Field view properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormFieldContactInfo", + "members": [ + { + "name": "addressInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAddressInfo", + "displayName": "AddressInfo" + } + ], + "doc": "Address info." + }, + { + "name": "contactField", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Field mapped to contacts." + }, + { + "name": "customFieldInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCustomFieldInfo", + "displayName": "CustomFieldInfo" + } + ], + "doc": "Custom field info." + }, + { + "name": "emailInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEmailInfo", + "displayName": "EmailInfo" + } + ], + "doc": "Email info." + }, + { + "name": "phoneInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPhoneInfo", + "displayName": "PhoneInfo" + } + ], + "doc": "Phone info." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFormFieldContactInfoAdditionalInfoOneOf", + "members": [ + "addressInfo", + "customFieldInfo", + "emailInfo", + "phoneInfo" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormFieldContactInfoAdditionalInfoOneOf", + "members": [ + { + "name": "addressInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAddressInfo", + "displayName": "AddressInfo" + } + ], + "doc": "Address info." + }, + { + "name": "customFieldInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCustomFieldInfo", + "displayName": "CustomFieldInfo" + } + ], + "doc": "Custom field info." + }, + { + "name": "emailInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEmailInfo", + "displayName": "EmailInfo" + } + ], + "doc": "Email info." + }, + { + "name": "phoneInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPhoneInfo", + "displayName": "PhoneInfo" + } + ], + "doc": "Phone info." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormFieldV2", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Field id." + }, + { + "name": "displayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDisplayField", + "displayName": "DisplayField" + } + ], + "doc": "Field for displaying information" + }, + { + "name": "fieldType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of the field" + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden.\nDefault: false" + }, + { + "name": "identifier", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom identification of field, can be used to specify exceptional behaviour of client for specific field" + }, + { + "name": "inputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputField", + "displayName": "InputField" + } + ], + "doc": "Field accept input of data" + }, + { + "name": "submitOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSubmitButton", + "displayName": "SubmitButton" + } + ], + "doc": "Submit button of the form" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFormFieldV2FieldTypeOptionsOneOf", + "members": [ + "displayOptions", + "inputOptions", + "submitOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormFieldV2FieldTypeOptionsOneOf", + "members": [ + { + "name": "displayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDisplayField", + "displayName": "DisplayField" + } + ], + "doc": "Field for displaying information" + }, + { + "name": "inputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputField", + "displayName": "InputField" + } + ], + "doc": "Field accept input of data" + }, + { + "name": "submitOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSubmitButton", + "displayName": "SubmitButton" + } + ], + "doc": "Submit button of the form" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormLayout", + "members": [ + { + "name": "large", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBreakPoint", + "displayName": "BreakPoint" + } + ], + "doc": "Layout for large break point." + }, + { + "name": "medium", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBreakPoint", + "displayName": "BreakPoint" + } + ], + "doc": "Layout for medium break point." + }, + { + "name": "small", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBreakPoint", + "displayName": "BreakPoint" + } + ], + "doc": "Layout for small break point." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormOverride", + "members": [ + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Overridden entity id. Either fieldId, or \"{fieldIdWithNestedForm}/{nestedFormFieldId}\"" + }, + { + "name": "entityType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Override entity type." + }, + { + "name": "valueChanges", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Form entity properties path with new value, that will be changed on condition." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormProperties", + "members": [ + { + "name": "disabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Identifies if the form is disabled." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormRule", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the rule" + }, + { + "name": "condition", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Rule on which item properties or layouts will be changed." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the rule" + }, + { + "name": "overrides", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormOverride", + "displayName": "FormOverride" + } + ] + } + } + ], + "doc": "Form items with defined properties that will be\nchanged when given condition is resolved to true." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormSpamSubmissionSpiConfig", + "members": [ + { + "name": "baseUri", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpiBaseUri", + "displayName": "SpiBaseUri" + } + ], + "doc": "URI where the SPI Implementer is deployed" + }, + { + "name": "namespaceConfigs", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormsSpamSubmissionsNamespaceConfig", + "displayName": "FormsSpamSubmissionsNamespaceConfig" + } + ] + } + } + ], + "doc": "Configuration of namespaces known by implementer" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionFormSubmission", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the form submission was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Submission ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the form submission was updated." + }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Data extensions ExtendedFields." + }, + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the form which submission belongs to." + }, + { + "name": "namespace", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + }, + { + "name": "orderDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionOrderDetails", + "displayName": "OrderDetails" + } + ], + "doc": "Order details." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission." + }, + { + "name": "seen", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the submission was read by a site Extension with permissions to manage submissions." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Status of the submission.\n- `PENDING`: When a submission has been created, but has not yet been recorded in the submission table of the forms dashboard.\n- `PAYMENT_WAITING`: When a submission of form, requiring payment, has been created.\n- `PAYMENT_CANCELED`: When a submission's of form, requiring payment, order has been canceled.\n- `CONFIRMED`: When a submission is recorded in the submissions table of the forms dashboard." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Submission values where key is the form field and value is the data submitted for the given field." + }, + { + "name": "submitter", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSubmitter", + "displayName": "Submitter" + } + ], + "doc": "ID of the creator of the form submission." + } + ], + "docs": { + "description": [ + "Form submission that was created or retrieved." + ] + } + }, + { + "name": "formsV4SpamSubmissionFormsSpamSubmissionsNamespaceConfig", + "members": [ + { + "name": "namespace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Namespace name." + }, + { + "name": "permissions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmissionPermissions", + "displayName": "SpamSubmissionPermissions" + } + ], + "doc": "Permissions associated with this namespace." + }, + { + "name": "wixSpamFilterDisabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Disables Wix spam submissions filter.\nSpam submissions are persisted in spam submissions storage to support marking submissions as not spam." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionGalleryData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the gallery's container." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the gallery's download button is disabled." + }, + { + "name": "disableExpand", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the gallery's expand button is disabled." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionItem", + "displayName": "Item" + } + ] + } + } + ], + "doc": "The items in the gallery." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGalleryOptions", + "displayName": "GalleryOptions" + } + ], + "doc": "Options for defining the gallery's appearance." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionGalleryOptions", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionItemStyle", + "displayName": "ItemStyle" + } + ], + "doc": "Styling for gallery items." + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLayout", + "displayName": "Layout" + } + ], + "doc": "Gallery layout." + }, + { + "name": "thumbnails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionThumbnails", + "displayName": "Thumbnails" + } + ], + "doc": "Styling for gallery thumbnail images." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionGetSpamSubmissionRequest", + "members": [ + { + "name": "spamSubmissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the spam submission to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionGetSpamSubmissionResponse", + "members": [ + { + "name": "spamSubmission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "The retrieved spam submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionGif", + "members": [ + { + "name": "gif", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "GIF format URL." + }, + { + "name": "mp4", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "MP4 format URL." + }, + { + "name": "still", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Thumbnail URL." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionGifData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the GIF's container." + }, + { + "name": "downsized", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGif", + "displayName": "GIF" + } + ], + "doc": "The source of the downsized GIF." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Height in pixels." + }, + { + "name": "original", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGif", + "displayName": "GIF" + } + ], + "doc": "The source of the full size GIF." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionGradient", + "members": [ + { + "name": "angle", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The gradient angle in degrees." + }, + { + "name": "lastColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The end color as a hexademical value." + }, + { + "name": "startColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The start color as a hexademical value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionHeader", + "members": [ + { + "name": "content", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Content of the header" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionHeadingData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level from 1-6." + }, + { + "name": "level", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Heading level from 1-6." + }, + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextStyle", + "displayName": "TextStyle" + } + ], + "doc": "Styling for the heading text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionHeight", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom height value in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionHtmlData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the HTML node's container." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The HTML code for the node." + }, + { + "name": "isAdsense", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this is an AdSense element. Use `source` instead." + }, + { + "name": "source", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of HTML code." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the HTML code for the node." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfHTMLDataDataOneOf", + "members": [ + "html", + "isAdsense", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionHtmlDataDataOneOf", + "members": [ + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The HTML code for the node." + }, + { + "name": "isAdsense", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this is an AdSense element. Use `source` instead." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the HTML code for the node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionIdentificationData", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "identityType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'ANONYMOUS_VISITOR'`\n- `'APP'`\n- `'MEMBER'`\n- `'UNKNOWN'`\n- `'WIX_USER'`" + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionIdentificationDataIdOneOf", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionImage", + "members": [ + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLink", + "displayName": "Link" + } + ], + "doc": "Link details for images that are links." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Image file details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionImageData", + "members": [ + { + "name": "altText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Image's alternative text." + }, + { + "name": "caption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Image caption." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the image's container." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the image's download button is disabled." + }, + { + "name": "disableExpand", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the image expands to full screen when clicked." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Image file details." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLink", + "displayName": "Link" + } + ], + "doc": "Link details for images that are links." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputField", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "nativeType": "Array" + } + ], + "doc": "Input return array as value" + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBoolean", + "displayName": "Boolean" + } + ], + "doc": "Input return boolean as value" + }, + { + "name": "inputType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of the input field" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumber", + "displayName": "Number" + } + ], + "doc": "Input return number as value" + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionObject", + "displayName": "Object" + } + ], + "doc": "Input return object as value" + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPayment", + "displayName": "Payment" + } + ], + "doc": "Input returns selected products as value." + }, + { + "name": "pii", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Mark the field as containing personal information. This will encrypt user data when storing it.\nDefault: false" + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is required.\nDefault: false" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionString", + "displayName": "String" + } + ], + "doc": "Input return string as value" + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Definition of a target where the value of field belongs." + }, + { + "name": "wixFileOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionWixFile", + "displayName": "WixFile" + } + ], + "doc": "Input return \"Wix file\" as value" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfInputFieldInputTypeOptionsOneOf", + "members": [ + "arrayOptions", + "booleanOptions", + "numberOptions", + "objectOptions", + "paymentOptions", + "stringOptions", + "wixFileOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldArrayErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldArrayType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldArrayErrorMessages", + "displayName": "InputFieldArrayErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionArrayTypeArrayItems", + "displayName": "ArrayTypeArrayItems" + } + ], + "doc": "Type of items allowed in array." + }, + { + "name": "maxItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum amount of array elements." + }, + { + "name": "minItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum amount of array elements." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldBooleanErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldBooleanType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "boolean" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldBooleanErrorMessages", + "displayName": "InputFieldBooleanErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldInputTypeOptionsOneOf", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "nativeType": "Array" + } + ], + "doc": "Input return array as value" + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBoolean", + "displayName": "Boolean" + } + ], + "doc": "Input return boolean as value" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumber", + "displayName": "Number" + } + ], + "doc": "Input return number as value" + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionObject", + "displayName": "Object" + } + ], + "doc": "Input return object as value" + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPayment", + "displayName": "Payment" + } + ], + "doc": "Input returns selected products as value." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionString", + "displayName": "String" + } + ], + "doc": "Input return string as value" + }, + { + "name": "wixFileOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionWixFile", + "displayName": "WixFile" + } + ], + "doc": "Input return \"Wix file\" as value" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldIntegerType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldNumberErrorMessages", + "displayName": "InputFieldNumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldNumberErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldNumberType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldNumberErrorMessages", + "displayName": "InputFieldNumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldObjectErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldObjectType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldObjectErrorMessages", + "displayName": "InputFieldObjectErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionObjectTypePropertiesType", + "displayName": "ObjectTypePropertiesType" + } + ] + } + } + ], + "doc": "Description of object properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldStringErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionInputFieldStringType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldStringErrorMessages", + "displayName": "InputFieldStringErrorMessages" + } + ], + "doc": "Custom error messages when validation fails." + }, + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of a string." + }, + { + "name": "maxLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum length." + }, + { + "name": "minLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum length." + }, + { + "name": "pattern", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pattern for a regular expression match." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionIntegerType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberErrorMessages", + "displayName": "NumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionItem", + "members": [ + { + "name": "altText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item's alternative text." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionImage", + "displayName": "Image" + } + ], + "doc": "An image item." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item title." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionVideo", + "displayName": "Video" + } + ], + "doc": "A video item." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfItemDataOneOf", + "members": [ + "image", + "video" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionItemDataOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionImage", + "displayName": "Image" + } + ], + "doc": "An image item." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionVideo", + "displayName": "Video" + } + ], + "doc": "A video item." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionItemLayout", + "members": [ + { + "name": "column", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Vertical coordinate in the grid." + }, + { + "name": "fieldId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form field reference id." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Width." + }, + { + "name": "row", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Horizontal coordinate in the grid." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Height." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionItemStyle", + "members": [ + { + "name": "crop", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets how item images are cropped." + }, + { + "name": "ratio", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Item ratio" + }, + { + "name": "spacing", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The spacing between items in pixels." + }, + { + "name": "targetSize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Desirable dimension for each item in pixels (behvaior changes according to gallery type)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionLayout", + "members": [ + { + "name": "horizontalScroll", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether horizontal scroll is enabled." + }, + { + "name": "mobileNumberOfColumns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of columns to display on mobile screens." + }, + { + "name": "numberOfColumns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of columns to display on full size screens." + }, + { + "name": "orientation", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Gallery orientation." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Gallery layout type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionLink", + "members": [ + { + "name": "anchor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The target node's ID. Used for linking to another node in this object." + }, + { + "name": "customData", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A serialized object used for a custom or external link panel." + }, + { + "name": "rel", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRel", + "displayName": "Rel" + } + ], + "doc": "The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document." + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "he HTML `target` attribute value for the link. This property defines where the linked document opens as follows:\n`SELF` - Default. Opens the linked document in the same frame as the link.\n`BLANK` - Opens the linked document in a new browser tab or window.\n`PARENT` - Opens the linked document in the link's parent frame.\n`TOP` - Opens the linked document in the full body of the link's browser tab or window." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the linked document." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfLinkDataOneOf", + "members": [ + "anchor", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionLinkData", + "members": [ + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLink", + "displayName": "Link" + } + ], + "doc": "Link details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionLinkDataOneOf", + "members": [ + { + "name": "anchor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The target node's ID. Used for linking to another node in this object." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the linked document." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionLinkPreviewData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the link preview's container." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview description." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The preview content as HTML." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLink", + "displayName": "Link" + } + ], + "doc": "Link details." + }, + { + "name": "thumbnailUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview thumbnail URL." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionListValue", + "members": [ + { + "name": "values", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "any" + } + ] + } + } + ], + "doc": "Repeated field of dynamically typed values." + } + ], + "docs": { + "description": [ + "`ListValue` is a wrapper around a repeated field of values." + ] + } + }, + { + "name": "formsV4SpamSubmissionMapData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the map's container." + }, + { + "name": "mapSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMapSettings", + "displayName": "MapSettings" + } + ], + "doc": "Map settings." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionMapSettings", + "members": [ + { + "name": "address", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The address to display on the map." + }, + { + "name": "draggable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the map is draggable." + }, + { + "name": "initialZoom", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Initial zoom value." + }, + { + "name": "lat", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Location latitude." + }, + { + "name": "lng", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Location longitude." + }, + { + "name": "locationName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location name." + }, + { + "name": "mapType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Map type. `HYBRID` is a combination of the `ROADMAP` and `SATELLITE` map types." + }, + { + "name": "marker", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the location marker is visible." + }, + { + "name": "streetViewControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether street view control is enabled." + }, + { + "name": "viewModeControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether view mode control is enabled." + }, + { + "name": "zoomControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether zoom control is enabled." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionMargin", + "members": [ + { + "name": "horizontal", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Horizontal value." + }, + { + "name": "vertical", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Vertical value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionMedia", + "members": [ + { + "name": "duration", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media duration in seconds. Only relevant for audio and video files." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media height in pixels." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFileSource", + "displayName": "FileSource" + } + ], + "doc": "The source for the media's data." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionMediaItem", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "WixMedia image." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaItemMediaOneOf", + "members": [ + "image" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionMediaItemMediaOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "WixMedia image." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionMentionData", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Mentioned user's ID." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The mentioned user's name." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The version of the user's name that appears after the `@` character in the mention." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionMetadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Object ID." + }, + { + "name": "createdTimestamp", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "When the object was created." + }, + { + "name": "updatedTimestamp", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "When the object was most recently updated." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Schema version." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNestedForm", + "members": [ + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionForm", + "displayName": "Form" + } + ], + "doc": "Nested form." + }, + { + "name": "targets", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Targets which have this form." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNestedFormFieldOverrides", + "members": [ + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden. Leave blank for no override." + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is required. Leave blank for no override." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNestedFormOverrides", + "members": [ + { + "name": "fieldOverrides", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNestedFormFieldOverrides", + "displayName": "NestedFormFieldOverrides" + } + ] + } + } + ], + "doc": "Field overrides by field ID" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNode", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Node ID." + }, + { + "name": "appEmbedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAppEmbedData", + "displayName": "AppEmbedData" + } + ], + "doc": "Data for an app embed node." + }, + { + "name": "audioData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAudioData", + "displayName": "AudioData" + } + ], + "doc": "Data for an audio node." + }, + { + "name": "blockquoteData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBlockquoteData", + "displayName": "BlockquoteData" + } + ], + "doc": "Data for a block quote node." + }, + { + "name": "bulletedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBulletedListData", + "displayName": "BulletedListData" + } + ], + "doc": "Data for a bulleted list node." + }, + { + "name": "buttonData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionButtonData", + "displayName": "ButtonData" + } + ], + "doc": "Data for a button node." + }, + { + "name": "codeBlockData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCodeBlockData", + "displayName": "CodeBlockData" + } + ], + "doc": "Data for a code block node." + }, + { + "name": "collapsibleListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCollapsibleListData", + "displayName": "CollapsibleListData" + } + ], + "doc": "Data for a collapsible list node." + }, + { + "name": "dividerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDividerData", + "displayName": "DividerData" + } + ], + "doc": "Data for a divider node." + }, + { + "name": "embedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEmbedData", + "displayName": "EmbedData" + } + ], + "doc": "Data for an oEmbed node." + }, + { + "name": "externalData", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data for a custon external node." + }, + { + "name": "fileData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFileData", + "displayName": "FileData" + } + ], + "doc": "Data for a file node." + }, + { + "name": "galleryData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGalleryData", + "displayName": "GalleryData" + } + ], + "doc": "Data for a gallery node." + }, + { + "name": "gifData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGifData", + "displayName": "GIFData" + } + ], + "doc": "Data for a GIF node." + }, + { + "name": "headingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionHeadingData", + "displayName": "HeadingData" + } + ], + "doc": "Data for a heading node." + }, + { + "name": "htmlData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionHtmlData", + "displayName": "HTMLData" + } + ], + "doc": "Data for an embedded HTML node." + }, + { + "name": "imageData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionImageData", + "displayName": "ImageData" + } + ], + "doc": "Data for an image node." + }, + { + "name": "linkPreviewData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLinkPreviewData", + "displayName": "LinkPreviewData" + } + ], + "doc": "Data for a link preview node." + }, + { + "name": "mapData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMapData", + "displayName": "MapData" + } + ], + "doc": "Data for a map node." + }, + { + "name": "nodes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNode", + "displayName": "Node" + } + ] + } + } + ], + "doc": "A list of child nodes." + }, + { + "name": "orderedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionOrderedListData", + "displayName": "OrderedListData" + } + ], + "doc": "Data for an ordered list node." + }, + { + "name": "paragraphData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionParagraphData", + "displayName": "ParagraphData" + } + ], + "doc": "Data for a paragraph node." + }, + { + "name": "pollData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPollData", + "displayName": "PollData" + } + ], + "doc": "Data for a poll node." + }, + { + "name": "style", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNodeStyle", + "displayName": "NodeStyle" + } + ], + "doc": "Padding and background color styling for the node." + }, + { + "name": "tableCellData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTableCellData", + "displayName": "TableCellData" + } + ], + "doc": "Data for a table cell node." + }, + { + "name": "tableData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTableData", + "displayName": "TableData" + } + ], + "doc": "Data for a table node." + }, + { + "name": "textData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextData", + "displayName": "TextData" + } + ], + "doc": "Data for a text node. Used to apply decorations to text." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "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." + }, + { + "name": "videoData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionVideoData", + "displayName": "VideoData" + } + ], + "doc": "Data for a video node." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfNodeDataOneOf", + "members": [ + "appEmbedData", + "audioData", + "blockquoteData", + "bulletedListData", + "buttonData", + "codeBlockData", + "collapsibleListData", + "dividerData", + "embedData", + "externalData", + "fileData", + "galleryData", + "gifData", + "headingData", + "htmlData", + "imageData", + "linkPreviewData", + "mapData", + "orderedListData", + "paragraphData", + "pollData", + "tableCellData", + "tableData", + "textData", + "videoData" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNodeDataOneOf", + "members": [ + { + "name": "appEmbedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAppEmbedData", + "displayName": "AppEmbedData" + } + ], + "doc": "Data for an app embed node." + }, + { + "name": "audioData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAudioData", + "displayName": "AudioData" + } + ], + "doc": "Data for an audio node." + }, + { + "name": "blockquoteData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBlockquoteData", + "displayName": "BlockquoteData" + } + ], + "doc": "Data for a block quote node." + }, + { + "name": "bulletedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBulletedListData", + "displayName": "BulletedListData" + } + ], + "doc": "Data for a bulleted list node." + }, + { + "name": "buttonData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionButtonData", + "displayName": "ButtonData" + } + ], + "doc": "Data for a button node." + }, + { + "name": "codeBlockData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCodeBlockData", + "displayName": "CodeBlockData" + } + ], + "doc": "Data for a code block node." + }, + { + "name": "collapsibleListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCollapsibleListData", + "displayName": "CollapsibleListData" + } + ], + "doc": "Data for a collapsible list node." + }, + { + "name": "dividerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDividerData", + "displayName": "DividerData" + } + ], + "doc": "Data for a divider node." + }, + { + "name": "embedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionEmbedData", + "displayName": "EmbedData" + } + ], + "doc": "Data for an oEmbed node." + }, + { + "name": "externalData", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data for a custon external node." + }, + { + "name": "fileData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFileData", + "displayName": "FileData" + } + ], + "doc": "Data for a file node." + }, + { + "name": "galleryData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGalleryData", + "displayName": "GalleryData" + } + ], + "doc": "Data for a gallery node." + }, + { + "name": "gifData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionGifData", + "displayName": "GIFData" + } + ], + "doc": "Data for a GIF node." + }, + { + "name": "headingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionHeadingData", + "displayName": "HeadingData" + } + ], + "doc": "Data for a heading node." + }, + { + "name": "htmlData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionHtmlData", + "displayName": "HTMLData" + } + ], + "doc": "Data for an embedded HTML node." + }, + { + "name": "imageData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionImageData", + "displayName": "ImageData" + } + ], + "doc": "Data for an image node." + }, + { + "name": "linkPreviewData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionLinkPreviewData", + "displayName": "LinkPreviewData" + } + ], + "doc": "Data for a link preview node." + }, + { + "name": "mapData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMapData", + "displayName": "MapData" + } + ], + "doc": "Data for a map node." + }, + { + "name": "orderedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionOrderedListData", + "displayName": "OrderedListData" + } + ], + "doc": "Data for an ordered list node." + }, + { + "name": "paragraphData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionParagraphData", + "displayName": "ParagraphData" + } + ], + "doc": "Data for a paragraph node." + }, + { + "name": "pollData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPollData", + "displayName": "PollData" + } + ], + "doc": "Data for a poll node." + }, + { + "name": "tableCellData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTableCellData", + "displayName": "TableCellData" + } + ], + "doc": "Data for a table cell node." + }, + { + "name": "tableData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTableData", + "displayName": "TableData" + } + ], + "doc": "Data for a table node." + }, + { + "name": "textData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextData", + "displayName": "TextData" + } + ], + "doc": "Data for a text node. Used to apply decorations to text." + }, + { + "name": "videoData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionVideoData", + "displayName": "VideoData" + } + ], + "doc": "Data for a video node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNodeStyle", + "members": [ + { + "name": "backgroundColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexadecimal value." + }, + { + "name": "paddingBottom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The bottom padding value in pixels." + }, + { + "name": "paddingTop", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The top padding value in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNumber", + "members": [ + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the number input field" + }, + { + "name": "numberInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberInput", + "displayName": "NumberInput" + } + ], + "doc": "Number value input field" + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Validation of field output value." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfNumberComponentTypeOptionsOneOf", + "members": [ + "numberInputOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNumberComponentTypeOptionsOneOf", + "members": [ + { + "name": "numberInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberInput", + "displayName": "NumberInput" + } + ], + "doc": "Number value input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNumberErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNumberInput", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder for the value input" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionNumberType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberErrorMessages", + "displayName": "NumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionObject", + "members": [ + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldObjectType", + "displayName": "InputFieldObjectType" + } + ], + "doc": "Validation of object type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfObjectValidationOneOf", + "members": [ + "nestedFormId", + "object" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionObjectErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionObjectType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionObjectErrorMessages", + "displayName": "ObjectErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPropertiesType", + "displayName": "PropertiesType" + } + ] + } + } + ], + "doc": "Description of object properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionObjectTypePropertiesType", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldArrayType", + "displayName": "InputFieldArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldIntegerType", + "displayName": "InputFieldIntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "propertiesType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of object properties" + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the property is required." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "String type validation for property." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfObjectTypePropertiesTypePropertiesTypeOptionsOneOf", + "members": [ + "arrayOptions", + "booleanOptions", + "integerOptions", + "numberOptions", + "stringOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionObjectTypePropertiesTypePropertiesTypeOptionsOneOf", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldArrayType", + "displayName": "InputFieldArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldIntegerType", + "displayName": "InputFieldIntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "String type validation for property." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionObjectValidationOneOf", + "members": [ + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldObjectType", + "displayName": "InputFieldObjectType" + } + ], + "doc": "Validation of object type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionOembed", + "members": [ + { + "name": "authorName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the author or owner of the resource." + }, + { + "name": "authorUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the author or owner of the resource." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The height of the resource specified in the `url` property in pixels." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "HTML for embedding a video player. The HTML should have no padding or margins." + }, + { + "name": "providerName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the resource provider." + }, + { + "name": "providerUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the resource provider." + }, + { + "name": "thumbnailHeight", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined." + }, + { + "name": "thumbnailUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined." + }, + { + "name": "thumbnailWidth", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource title." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The resource type." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The source URL for the resource." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The oEmbed version number. This value must be `1.0`." + }, + { + "name": "videoUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for an embedded viedo." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The width of the resource specified in the `url` property in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Media item. Media, associated with option, like image." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionOptionDesign", + "members": [ + { + "name": "borderRadius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionOptionLayout", + "members": [ + { + "name": "enableImage", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether to display option images." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionOrderDetails", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the order related to submission (applicable if form has payments added)." + }, + { + "name": "currency", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Currency." + }, + { + "name": "itemSubtotal", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item subtotal." + }, + { + "name": "number", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order number." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionOrderedListData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionOwner", + "members": [ + { + "name": "applicationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID." + }, + { + "name": "visitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Visitor ID." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfOwnerOwnerOneOf", + "members": [ + "applicationId", + "memberId", + "userId", + "visitorId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionOwnerOwnerOneOf", + "members": [ + { + "name": "applicationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID." + }, + { + "name": "visitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Visitor ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionParagraphData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level from 1-6." + }, + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextStyle", + "displayName": "TextStyle" + } + ], + "doc": "Styling for the paragraph text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPayment", + "members": [ + { + "name": "checkboxGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPaymentCheckboxGroup", + "displayName": "PaymentCheckboxGroup" + } + ], + "doc": "Checkbox group input field." + }, + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the payment input field." + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPaymentType", + "displayName": "PaymentType" + } + ], + "doc": "Validation of payment type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPaymentComponentTypeOptionsOneOf", + "members": [ + "checkboxGroupOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPaymentCheckboxGroup", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field." + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCheckboxGroupOption", + "displayName": "CheckboxGroupOption" + } + ] + } + } + ], + "doc": "List of options to select from." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPaymentComponentTypeOptionsOneOf", + "members": [ + { + "name": "checkboxGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPaymentCheckboxGroup", + "displayName": "PaymentCheckboxGroup" + } + ], + "doc": "Checkbox group input field." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPaymentType", + "members": [ + { + "name": "maxItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum amount of different products." + }, + { + "name": "minItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum amount of different products." + }, + { + "name": "products", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionProduct", + "displayName": "Product" + } + ] + } + } + ], + "doc": "Field mapped to products." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPdfSettings", + "members": [ + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the PDF download button is disabled." + }, + { + "name": "disablePrint", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the PDF print button is disabled." + }, + { + "name": "viewMode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "PDF view mode. One of the following:\n`NONE` : The PDF isn't displayed.\n`FULL` : A full page view of the PDF is displayed.\n`MINI` : A mini view of the PDF is displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPermissions", + "members": [ + { + "name": "allowMultipleVotes", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether one voter can vote multiple times." + }, + { + "name": "view", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets who can view the poll results." + }, + { + "name": "vote", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets who can vote." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPhoneInfo", + "members": [ + { + "name": "tag", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Phone tag." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPlaybackOptions", + "members": [ + { + "name": "autoPlay", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the media will automatically start playing." + }, + { + "name": "playInLoop", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether media's will be looped." + }, + { + "name": "showControls", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether media's controls will be shown." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPluginContainerData", + "members": [ + { + "name": "alignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The node's alignment within its container." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionHeight", + "displayName": "Height" + } + ], + "doc": "The height of the node when it's displayed." + }, + { + "name": "spoiler", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpoiler", + "displayName": "Spoiler" + } + ], + "doc": "Spoiler cover settings for the node." + }, + { + "name": "textWrap", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerDataWidth", + "displayName": "PluginContainerDataWidth" + } + ], + "doc": "The width of the node when it's displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPluginContainerDataWidth", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom width value in pixels." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "One of the following predefined width options:\n`CONTENT`: The width of the container matches the content width.\n`SMALL`: Small width.\n`ORIGINAL`: The width of the container matches the original asset width.\n`FULL_WIDTH`: Full width." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPluginContainerDataWidthDataOneOf", + "members": [ + "custom", + "size" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPluginContainerDataWidthDataOneOf", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom width value in pixels." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "One of the following predefined width options:\n`CONTENT`: The width of the container matches the content width.\n`SMALL`: Small width.\n`ORIGINAL`: The width of the container matches the original asset width.\n`FULL_WIDTH`: Full width." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPoll", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll ID." + }, + { + "name": "creatorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll creator ID." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Main poll image." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPollOption", + "displayName": "PollOption" + } + ] + } + } + ], + "doc": "Voting options." + }, + { + "name": "settings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSettings", + "displayName": "Settings" + } + ], + "doc": "The poll's permissions and display settings." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPollData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the poll's container." + }, + { + "name": "design", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDesign", + "displayName": "Design" + } + ], + "doc": "Styling for the poll and voting options." + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPollDataLayout", + "displayName": "PollDataLayout" + } + ], + "doc": "Layout settings for the poll and voting options." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPoll", + "displayName": "Poll" + } + ], + "doc": "Poll data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPollDataLayout", + "members": [ + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionOptionLayout", + "displayName": "OptionLayout" + } + ], + "doc": "Voting otpions layout settings." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPollLayout", + "displayName": "PollLayout" + } + ], + "doc": "Poll layout settings." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPollDesign", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBackground", + "displayName": "Background" + } + ], + "doc": "Background styling." + }, + { + "name": "borderRadius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPollLayout", + "members": [ + { + "name": "direction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The direction of the text displayed in the voting options. Text can be displayed either right-to-left or left-to-right." + }, + { + "name": "enableImage", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether to display the main poll image." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The layout for displaying the voting options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPollOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option ID." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "The image displayed with the option." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPostSubmissionTriggers", + "members": [ + { + "name": "upsertContact", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionUpsertContact", + "displayName": "UpsertContact" + } + ], + "doc": "Upserts a contact from the submission data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPredefinedValidation", + "members": [ + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of predefined validation." + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPaymentType", + "displayName": "PaymentType" + } + ], + "doc": "Payment input field." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPredefinedValidationFormatOptionsOneOf", + "members": [ + "paymentOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPredefinedValidationFormatOptionsOneOf", + "members": [ + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPaymentType", + "displayName": "PaymentType" + } + ], + "doc": "Payment input field." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionProduct", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "dynamicPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDynamicPriceOptions", + "displayName": "DynamicPriceOptions" + } + ], + "doc": "Dynamic price options." + }, + { + "name": "fixedPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFixedPriceOptions", + "displayName": "FixedPriceOptions" + } + ], + "doc": "Fixed price options." + }, + { + "name": "priceType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Price type." + }, + { + "name": "productType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product type." + }, + { + "name": "quantityLimit", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionQuantityLimit", + "displayName": "QuantityLimit" + } + ], + "doc": "Quantity limit." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfProductPriceOptionsOneOf", + "members": [ + "dynamicPriceOptions", + "fixedPriceOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionProductPriceOptionsOneOf", + "members": [ + { + "name": "dynamicPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDynamicPriceOptions", + "displayName": "DynamicPriceOptions" + } + ], + "doc": "Dynamic price options." + }, + { + "name": "fixedPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFixedPriceOptions", + "displayName": "FixedPriceOptions" + } + ], + "doc": "Fixed price options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPropertiesType", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionArrayType", + "displayName": "ArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the property is required." + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "String type validation for property." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPropertiesTypePropertiesTypeOneOf", + "members": [ + "array", + "boolean", + "integer", + "number", + "string" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionPropertiesTypePropertiesTypeOneOf", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionArrayType", + "displayName": "ArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "String type validation for property." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionQuantityLimit", + "members": [ + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum quantity." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum quantity." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionQuerySpamSubmissionsRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCursorQuery", + "displayName": "CursorQuery" + } + ], + "doc": "WQL expression." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionQuerySpamSubmissionsResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCursorPagingMetadata", + "displayName": "CursorPagingMetadata" + } + ], + "doc": "Details on the paged set of results returned." + }, + { + "name": "spamSubmissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ] + } + } + ], + "doc": "The retrieved SpamSubmissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionRadioGroup", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRadioGroupCustomOption", + "displayName": "RadioGroupCustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRadioGroupOption", + "displayName": "RadioGroupOption" + } + ] + } + } + ], + "doc": "Flag identifying to show option allowing input custom value\nList of options to select from" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionRadioGroupCustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionRadioGroupOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionRedirect", + "members": [ + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "How should url be opened" + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Url to which UoU should be redirected after successful submit of form" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionRel", + "members": [ + { + "name": "nofollow", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates to search engine crawlers not to follow the link." + }, + { + "name": "noreferrer", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates that this link protect referral information from being passed to the target website." + }, + { + "name": "sponsored", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement." + }, + { + "name": "ugc", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionReportNotSpamSubmissionRequest", + "members": [ + { + "name": "spamSubmissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the spam submission to report as not spam." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionReportNotSpamSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Created submission" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionReportSpamSubmissionRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the submission to report as spam." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionReportSpamSubmissionResponse", + "members": [ + { + "name": "spamSubmission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "Created spam submission" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionRichContent", + "members": [ + { + "name": "documentStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDocumentStyle", + "displayName": "DocumentStyle" + } + ], + "doc": "Global styling for header, paragraph, block quote, and code block nodes in the object." + }, + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMetadata", + "displayName": "Metadata" + } + ], + "doc": "Object metadata." + }, + { + "name": "nodes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNode", + "displayName": "Node" + } + ] + } + } + ], + "doc": "Node objects representing a rich content document." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionRichText", + "members": [ + { + "name": "content", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Content of the rich text field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSettings", + "members": [ + { + "name": "permissions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPermissions", + "displayName": "Permissions" + } + ], + "doc": "Permissions settings for voting." + }, + { + "name": "showVoters", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether voters are displayed in the vote results." + }, + { + "name": "showVotesCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the vote count is displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSpamSubmission", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date of creation." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Spam submission id." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date of last update." + }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Data extensions ExtendedFields." + }, + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of a form to which submission belongs." + }, + { + "name": "namespace", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form namespace to which submissions belong." + }, + { + "name": "reportReason", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the reason why the submission was reported as spam." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Submission values where key is a target of a form field and value is a submissions for the given field." + }, + { + "name": "submitter", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSubmitter", + "displayName": "Submitter" + } + ], + "doc": "Submission submitter ID." + } + ], + "docs": { + "description": [ + "SpamSubmissionReport stores a submission, which was marked as spam." + ] + } + }, + { + "name": "formsV4SpamSubmissionSpamSubmissionCreated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSpamSubmissionDeleted", + "members": [ + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSpamSubmissionPermissions", + "members": [ + { + "name": "create", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Create permission name" + }, + { + "name": "delete", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Delete permission name" + }, + { + "name": "read", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Read permission name" + }, + { + "name": "reportNotSpam", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Report as not spam permission name" + }, + { + "name": "update", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Update permission name" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSpamSubmissionUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSpiBaseUri", + "members": [ + { + "name": "alternativeUris", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionAlternativeUri", + "displayName": "AlternativeUri" + } + ] + } + } + ], + "doc": "override method mappings per method" + }, + { + "name": "baseUri", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "URI that will be used by the host to call the implementer. The path-suffix defined on the method will be appended to it" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSpoiler", + "members": [ + { + "name": "buttonText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text for the button used to remove the spoiler cover." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The description displayed on top of the spoiler cover." + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the spoiler cover is enabled for this node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionStep", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Step ID." + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Is step hidden" + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormLayout", + "displayName": "FormLayout" + } + ], + "doc": "Form step properties" + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the step." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionString", + "members": [ + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the string input field" + }, + { + "name": "dropdownOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDropdown", + "displayName": "Dropdown" + } + ], + "doc": "Selection field as drop down" + }, + { + "name": "radioGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRadioGroup", + "displayName": "RadioGroup" + } + ], + "doc": "Selection field as radio group" + }, + { + "name": "textInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextInput", + "displayName": "TextInput" + } + ], + "doc": "Text input field" + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "Validation of field output value." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfStringComponentTypeOptionsOneOf", + "members": [ + "dropdownOptions", + "radioGroupOptions", + "textInputOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionStringComponentTypeOptionsOneOf", + "members": [ + { + "name": "dropdownOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDropdown", + "displayName": "Dropdown" + } + ], + "doc": "Selection field as drop down" + }, + { + "name": "radioGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRadioGroup", + "displayName": "RadioGroup" + } + ], + "doc": "Selection field as radio group" + }, + { + "name": "textInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionTextInput", + "displayName": "TextInput" + } + ], + "doc": "Text input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionStringErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionStringType", + "members": [ + { + "name": "dateOptionalTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE_OPTIONAL_TIME format options" + }, + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE format options" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE_TIME format options" + }, + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStringErrorMessages", + "displayName": "StringErrorMessages" + } + ], + "doc": "Custom error messages when validation fails." + }, + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of a string." + }, + { + "name": "maxLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum length." + }, + { + "name": "minLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum length." + }, + { + "name": "pattern", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pattern for a regular expression match." + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "TIME format options" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfStringTypeFormatOptionsOneOf", + "members": [ + "dateOptionalTimeOptions", + "dateOptions", + "dateTimeOptions", + "timeOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionStringTypeFormatOptionsOneOf", + "members": [ + { + "name": "dateOptionalTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE_OPTIONAL_TIME format options" + }, + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE format options" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE_TIME format options" + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "TIME format options" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionStyles", + "members": [ + { + "name": "border", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBorder", + "displayName": "Border" + } + ], + "doc": "Border attributes." + }, + { + "name": "colors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionColors", + "displayName": "Colors" + } + ], + "doc": "Color attributes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSubmitButton", + "members": [ + { + "name": "nextText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "When button is not on last page it behaves as switch between pages page, text of label to go to next page." + }, + { + "name": "previousText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "When button is not on last page it behaves as switch between pages page, text of label to go to previous page." + }, + { + "name": "redirect", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRedirect", + "displayName": "Redirect" + } + ], + "doc": "Submit action effect is to redirect to" + }, + { + "name": "submitText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text on the button when button is submitting a form" + }, + { + "name": "thankYouMessage", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionThankYouMessage", + "displayName": "ThankYouMessage" + } + ], + "doc": "Submit action effect is to show message" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSubmitButtonSubmitActionOneOf", + "members": [ + "redirect", + "thankYouMessage" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSubmitButtonSubmitActionOneOf", + "members": [ + { + "name": "redirect", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRedirect", + "displayName": "Redirect" + } + ], + "doc": "Submit action effect is to redirect to" + }, + { + "name": "thankYouMessage", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionThankYouMessage", + "displayName": "ThankYouMessage" + } + ], + "doc": "Submit action effect is to show message" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSubmitter", + "members": [ + { + "name": "applicationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Application ID." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID." + }, + { + "name": "visitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Visitor ID." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSubmitterSubmitterOneOf", + "members": [ + "applicationId", + "memberId", + "userId", + "visitorId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionSubmitterSubmitterOneOf", + "members": [ + { + "name": "applicationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Application ID." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID." + }, + { + "name": "visitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Visitor ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionTableCellData", + "members": [ + { + "name": "borderColors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBorderColors", + "displayName": "BorderColors" + } + ], + "doc": "The cell's border colors." + }, + { + "name": "cellStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionCellStyle", + "displayName": "CellStyle" + } + ], + "doc": "Styling for the cell's background color and text alignment." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionTableData", + "members": [ + { + "name": "columnHeader", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the table's first column is a header." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the table's container." + }, + { + "name": "dimensions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDimensions", + "displayName": "Dimensions" + } + ], + "doc": "The table's dimensions." + }, + { + "name": "header", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Deprecated: Use `rowHeader` and `columnHeader` instead." + }, + { + "name": "rowHeader", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the table's first row is a header." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionTextData", + "members": [ + { + "name": "decorations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDecoration", + "displayName": "Decoration" + } + ] + } + } + ], + "doc": "The decorations to apply." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text to apply decorations to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionTextInput", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder for the value input" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionTextNodeStyle", + "members": [ + { + "name": "decorations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionDecoration", + "displayName": "Decoration" + } + ] + } + } + ], + "doc": "The decorations to apply to the node." + }, + { + "name": "lineHeight", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Line height for text in the node." + }, + { + "name": "nodeStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNodeStyle", + "displayName": "NodeStyle" + } + ], + "doc": "Padding and background color for the node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionTextStyle", + "members": [ + { + "name": "lineHeight", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A CSS `line-height` value for the text as a unitless ratio." + }, + { + "name": "textAlignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text alignment. Defaults to `AUTO`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionThankYouMessage", + "members": [ + { + "name": "duration", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Duration after how much second it should disappear. If 0, will stay forever.\nDefault: false" + }, + { + "name": "text", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Message show after form submission" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionThumbnails", + "members": [ + { + "name": "placement", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Thumbnail alignment." + }, + { + "name": "spacing", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Spacing between thumbnails in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionUpdateSpamSubmissionRequest", + "members": [ + { + "name": "spamSubmission", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "Spam submission to be updated, may be partial." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionUpdateSpamSubmissionResponse", + "members": [ + { + "name": "spamSubmission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "Updated spam submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionUpsertContact", + "members": [ + { + "name": "fieldsMapping", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormFieldContactInfo", + "displayName": "FormFieldContactInfo" + } + ] + } + } + ], + "doc": "Fields mapping (target field mapped to corresponding contact field)." + }, + { + "name": "labels", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of contact label keys.\n[Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)\nhelp categorize contacts." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionValidateSpamRequest", + "members": [ + { + "name": "form", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionForm", + "displayName": "Form" + } + ], + "doc": "Form." + }, + { + "name": "submission", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionValidateSpamResponse", + "members": [ + { + "name": "spam", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Is the submission a spam." + }, + { + "name": "spamSubmission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionSpamSubmission", + "displayName": "SpamSubmission" + } + ], + "doc": "The created SpamSubmission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionValidation", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionArrayType", + "displayName": "ArrayType" + } + ], + "doc": "Validation of array type." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Validation of boolean type." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Validation of integer type." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Validation of number type." + }, + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionObjectType", + "displayName": "ObjectType" + } + ], + "doc": "Validation of object type." + }, + { + "name": "predefined", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPredefinedValidation", + "displayName": "PredefinedValidation" + } + ], + "doc": "Predefined validation of specific format" + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is required." + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "Validation of string type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfValidationValidationOneOf", + "members": [ + "array", + "boolean", + "integer", + "number", + "object", + "predefined", + "string" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionValidationValidationOneOf", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionArrayType", + "displayName": "ArrayType" + } + ], + "doc": "Validation of array type." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Validation of boolean type." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Validation of integer type." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Validation of number type." + }, + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionObjectType", + "displayName": "ObjectType" + } + ], + "doc": "Validation of object type." + }, + { + "name": "predefined", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPredefinedValidation", + "displayName": "PredefinedValidation" + } + ], + "doc": "Predefined validation of specific format" + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "Validation of string type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionVideo", + "members": [ + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Video file details." + }, + { + "name": "thumbnail", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Video thumbnail file details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionVideoData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the video's container." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the video's download button is disabled." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionPlaybackOptions", + "displayName": "PlaybackOptions" + } + ], + "doc": "Video options." + }, + { + "name": "thumbnail", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Video thumbnail details." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Video title." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Video details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionWixFile", + "members": [ + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the array input field" + }, + { + "name": "fileUploadOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFileUpload", + "displayName": "FileUpload" + } + ], + "doc": "File upload input field" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfWixFileComponentTypeOptionsOneOf", + "members": [ + "fileUploadOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SpamSubmissionWixFileComponentTypeOptionsOneOf", + "members": [ + { + "name": "fileUploadOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SpamSubmissionFileUpload", + "displayName": "FileUpload" + } + ], + "doc": "File upload input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionAddressInfo", + "members": [ + { + "name": "tag", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Address tag." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionAnchorData", + "members": [ + { + "name": "anchor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The target node's ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionAppEmbedData", + "members": [ + { + "name": "bookingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBookingData", + "displayName": "BookingData" + } + ], + "doc": "Data for embedded Wix Bookings content." + }, + { + "name": "eventData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEventData", + "displayName": "EventData" + } + ], + "doc": "Data for embedded Wix Events content." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "An image for the embedded content." + }, + { + "name": "imageSrc", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Deprecated: Use `image` instead." + }, + { + "name": "itemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the embedded content." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the embedded content." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of Wix App content being embedded." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the embedded content." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAppEmbedDataAppDataOneOf", + "members": [ + "bookingData", + "eventData" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionAppEmbedDataAppDataOneOf", + "members": [ + { + "name": "bookingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBookingData", + "displayName": "BookingData" + } + ], + "doc": "Data for embedded Wix Bookings content." + }, + { + "name": "eventData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEventData", + "displayName": "EventData" + } + ], + "doc": "Data for embedded Wix Events content." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionApplicationError", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + }, + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data related to the error." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the error." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionArray", + "members": [ + { + "name": "checkboxGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCheckboxGroup", + "displayName": "CheckboxGroup" + } + ], + "doc": "Checkbox group input field" + }, + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the array input field" + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldArrayType", + "displayName": "InputFieldArrayType" + } + ], + "doc": "Validation of array type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfArrayComponentTypeOptionsOneOf", + "members": [ + "checkboxGroupOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionArrayComponentTypeOptionsOneOf", + "members": [ + { + "name": "checkboxGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCheckboxGroup", + "displayName": "CheckboxGroup" + } + ], + "doc": "Checkbox group input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionArrayErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionArrayItems", + "members": [ + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionObjectType", + "displayName": "ObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "String type validation for items." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfArrayItemsItemsOneOf", + "members": [ + "boolean", + "integer", + "number", + "object", + "string" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionArrayItemsItemsOneOf", + "members": [ + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionObjectType", + "displayName": "ObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "String type validation for items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionArrayType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionArrayErrorMessages", + "displayName": "ArrayErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionArrayItems", + "displayName": "ArrayItems" + } + ], + "doc": "Type of items allowed in array." + }, + { + "name": "maxItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum amount of array elements." + }, + { + "name": "minItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum amount of array elements." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionArrayTypeArrayItems", + "members": [ + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldIntegerType", + "displayName": "InputFieldIntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "itemType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of array items" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldObjectType", + "displayName": "InputFieldObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "String type validation for items." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfArrayTypeArrayItemsItemTypeOptionsOneOf", + "members": [ + "booleanOptions", + "integerOptions", + "numberOptions", + "objectOptions", + "stringOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionArrayTypeArrayItemsItemTypeOptionsOneOf", + "members": [ + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldIntegerType", + "displayName": "InputFieldIntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldObjectType", + "displayName": "InputFieldObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "String type validation for items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionAudioData", + "members": [ + { + "name": "audio", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Audio file details." + }, + { + "name": "authorName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Author name." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the audio node's container." + }, + { + "name": "coverImage", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Cover image." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the audio node's download button is disabled." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An HTML version of the audio node." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Track name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBackendEventMetadata", + "members": [ + { + "name": "entityId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event timestamp." + }, + { + "name": "id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event ID." + }, + { + "name": "triggeredByAnonymizeRequest", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBackground", + "members": [ + { + "name": "color", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexademical value." + }, + { + "name": "gradient", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGradient", + "displayName": "Gradient" + } + ], + "doc": "Details for a gradient background." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "An image to use for the background." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Background type. For each option, include the relevant details." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBackgroundBackgroundOneOf", + "members": [ + "color", + "gradient", + "image" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBackgroundBackgroundOneOf", + "members": [ + { + "name": "color", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexademical value." + }, + { + "name": "gradient", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGradient", + "displayName": "Gradient" + } + ], + "doc": "Details for a gradient background." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "An image to use for the background." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBlockquoteData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBookingData", + "members": [ + { + "name": "durations", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booking duration in minutes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBoolean", + "members": [ + { + "name": "checkboxOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCheckbox", + "displayName": "Checkbox" + } + ], + "doc": "Checkbox input field" + }, + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the boolean input field" + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Validation of field output value." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBooleanComponentTypeOptionsOneOf", + "members": [ + "checkboxOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBooleanComponentTypeOptionsOneOf", + "members": [ + { + "name": "checkboxOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCheckbox", + "displayName": "Checkbox" + } + ], + "doc": "Checkbox input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBooleanErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBooleanType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "boolean" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBooleanErrorMessages", + "displayName": "BooleanErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBorder", + "members": [ + { + "name": "radius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBorderColors", + "members": [ + { + "name": "bottom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Bottom border color as a hexadecimal value." + }, + { + "name": "left", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Left border color as a hexadecimal value." + }, + { + "name": "right", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Right border color as a hexadecimal value." + }, + { + "name": "top", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Top border color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBreakPoint", + "members": [ + { + "name": "columns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of columns of layout grid." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionItemLayout", + "displayName": "ItemLayout" + } + ] + } + } + ], + "doc": "Description of layouts for items." + }, + { + "name": "margin", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMargin", + "displayName": "Margin" + } + ], + "doc": "Description of elements margins." + }, + { + "name": "padding", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMargin", + "displayName": "Margin" + } + ], + "doc": "Description of elements paddings." + }, + { + "name": "rowHeight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Row height of layout grid." + }, + { + "name": "sections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSection", + "displayName": "Section" + } + ] + } + } + ], + "doc": "Sections of the layout, which allow manage fields" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkActionMetadata", + "members": [ + { + "name": "totalFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that couldn't be processed." + }, + { + "name": "totalSuccesses", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that were successfully processed." + }, + { + "name": "undetailedFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkCreateSubmissionBySubmitterData", + "members": [ + { + "name": "repeatedCreation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "A flag indicating whether this operation is a repeated creation, such as restoring a previously manually reported as spam entity." + }, + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Submissions to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkCreateSubmissionBySubmitterRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form id. Restricts submissions creation for a single form." + }, + { + "name": "returnEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "When set, items will be returned on successful create." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ] + } + } + ], + "doc": "Submissions to create.\nDeprecated" + }, + { + "name": "submissionsV2", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulkCreateSubmissionBySubmitterData", + "displayName": "BulkCreateSubmissionBySubmitterData" + } + ] + } + } + ], + "doc": "Submissions data to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkCreateSubmissionBySubmitterResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Metadata of request" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulkSubmissionResult", + "displayName": "BulkSubmissionResult" + } + ] + } + } + ], + "doc": "Created submissions with metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkDeleteSubmissionRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "permanent", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Delete submission bypassing trash-bin\nDefault: false" + }, + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkDeleteSubmissionResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Metadata of request" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulkDeleteSubmissionResult", + "displayName": "BulkDeleteSubmissionResult" + } + ] + } + } + ], + "doc": "Results of bulk submission delete" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkDeleteSubmissionResult", + "members": [ + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionItemMetadata", + "displayName": "ItemMetadata" + } + ], + "doc": "Deleted item metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkMarkSubmissionsAsSeenRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the form which the submissions belongs to." + }, + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission IDs to mark as seen." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkMarkSubmissionsAsSeenResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkRemoveSubmissionFromTrashBinRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkRemoveSubmissionFromTrashBinResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Metadata of request" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulkRemoveSubmissionFromTrashBinResult", + "displayName": "BulkRemoveSubmissionFromTrashBinResult" + } + ] + } + } + ], + "doc": "Results of bulk submission removal from trash" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkRemoveSubmissionFromTrashBinResult", + "members": [ + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionItemMetadata", + "displayName": "ItemMetadata" + } + ], + "doc": "Deleted item metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulkSubmissionResult", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The created submission." + }, + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionItemMetadata", + "displayName": "ItemMetadata" + } + ], + "doc": "Created submission metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionBulletedListData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionButtonData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the button's container." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLink", + "displayName": "Link" + } + ], + "doc": "Button link details." + }, + { + "name": "styles", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStyles", + "displayName": "Styles" + } + ], + "doc": "Styling for the button." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text to display on the button." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The button type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCancel", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCellStyle", + "members": [ + { + "name": "backgroundColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cell background color as a hexadecimal value." + }, + { + "name": "verticalAlignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Vertical alignment for the cell's text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCheckbox", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Label of the field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCheckboxGroup", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCustomOption", + "displayName": "CustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionOption", + "displayName": "Option" + } + ] + } + } + ], + "doc": "List of options to select from" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCodeBlockData", + "members": [ + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextStyle", + "displayName": "TextStyle" + } + ], + "doc": "Styling for the code block's text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCollapsibleListData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the collapsible list's container." + }, + { + "name": "direction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The direction of the text in the list. Either left-to-right or right-to-left." + }, + { + "name": "expandOnlyOne", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If `true`, only one item can be expanded at a time." + }, + { + "name": "initialExpandedItems", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets which items are expanded when the page loads." + }, + { + "name": "isQapageData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If `true`, The collapsible item will appear in search results as an FAQ." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionColorData", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text's background color as a hexadecimal value." + }, + { + "name": "foreground", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text's foreground color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionColors", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexadecimal value." + }, + { + "name": "border", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The border color as a hexadecimal value." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionComplete", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionConfirmSubmissionRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Submission ID to confirm." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionConfirmSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The confirmed submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCountDeletedSubmissionsRequest", + "members": [ + { + "name": "formIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Form IDs." + }, + { + "name": "namespace", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + }, + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of statuses of submissions which should be taken into count\nDefault: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCountDeletedSubmissionsResponse", + "members": [ + { + "name": "formsDeletedSubmissionsCount", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormDeletedSubmissionsCount", + "displayName": "FormDeletedSubmissionsCount" + } + ] + } + } + ], + "doc": "Forms submission count." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCountSubmissionsRequest", + "members": [ + { + "name": "formIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Form IDs." + }, + { + "name": "namespace", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + }, + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of statuses of submissions which should be taken into count\nDefault: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCountSubmissionsResponse", + "members": [ + { + "name": "formsSubmissionsCount", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmissionsCount", + "displayName": "FormSubmissionsCount" + } + ] + } + } + ], + "doc": "Forms submission count." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCreateCheckoutFromSubmissionRequest", + "members": [ + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionForm", + "displayName": "Form" + } + ], + "doc": "Submission's form." + }, + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Submission to create checkout from." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCreateCheckoutFromSubmissionRequestFormSchemaIdentifierOneOf", + "members": [ + "form" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCreateCheckoutFromSubmissionRequestFormSchemaIdentifierOneOf", + "members": [ + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionForm", + "displayName": "Form" + } + ], + "doc": "Submission's form." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCreateCheckoutFromSubmissionResponse", + "members": [ + { + "name": "checkoutId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Checkout ID (applicable for form involving payments)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCreateSubmissionBySubmitterRequest", + "members": [ + { + "name": "repeatedCreation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "A flag indicating whether this operation is a repeated creation, such as restoring a previously manually reported as spam entity." + }, + { + "name": "submission", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Submission to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCreateSubmissionBySubmitterResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The created submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCreateSubmissionRequest", + "members": [ + { + "name": "captchaToken", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Captcha token." + }, + { + "name": "submission", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Submission to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCreateSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The created submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursors", + "displayName": "Cursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCursorQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object.\n\nSee [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sort object." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCursorQueryPagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCursorQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "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`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCustomFieldInfo", + "members": [ + { + "name": "key", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom field key." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionCustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDataExtensionsDetails", + "members": [ + { + "name": "fqdns", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "FQDNS which can be extended with this field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDateOptions", + "members": [ + { + "name": "dateFormatParts", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Order of date picking component parts (e.g., YEAR, MONTH, DAY)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDateTimeConstraints", + "members": [ + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as \"$now\" to represent the current date and time.\nThe dynamic calculation supports expressions like \"$now+2d\" (2 days in the future), \"$now-1h\" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])" + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as \"$now\" to represent the current date and time.\nThe dynamic calculation supports expressions like \"$now+2d\" (2 days in the future), \"$now-1h\" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDateTimeInput", + "members": [ + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateOptions", + "displayName": "DateOptions" + } + ], + "doc": "Options specific to the Date-only input type." + }, + { + "name": "dateTimeInputType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Date and/or time input component type" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeOptions", + "displayName": "DateTimeOptions" + } + ], + "doc": "Options specific to the combined Date and Time input type." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field. Additional information about the date/time input." + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field. Displayed text for the date/time input." + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying whether to show or hide the label.\nDefault: true" + }, + { + "name": "showPlaceholder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying whether to show or hide the placeholder.\nDefault: true" + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTimeOptions", + "displayName": "TimeOptions" + } + ], + "doc": "Options specific to the Time-only input type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDateTimeInputDateTimeInputTypeOptionsOneOf", + "members": [ + "dateOptions", + "dateTimeOptions", + "timeOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDateTimeInputDateTimeInputTypeOptionsOneOf", + "members": [ + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateOptions", + "displayName": "DateOptions" + } + ], + "doc": "Options specific to the Date-only input type." + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeOptions", + "displayName": "DateTimeOptions" + } + ], + "doc": "Options specific to the combined Date and Time input type." + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTimeOptions", + "displayName": "TimeOptions" + } + ], + "doc": "Options specific to the Time-only input type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDateTimeOptions", + "members": [ + { + "name": "dateFormatParts", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Order of date picking component parts (e.g., YEAR, MONTH, DAY)." + }, + { + "name": "use24HourFormat", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag indicating whether to use the 24-hour time format.\nDefault: false." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDecoration", + "members": [ + { + "name": "anchorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionAnchorData", + "displayName": "AnchorData" + } + ], + "doc": "Data for an anchor link decoration." + }, + { + "name": "colorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionColorData", + "displayName": "ColorData" + } + ], + "doc": "Data for a color decoration." + }, + { + "name": "fontSizeData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFontSizeData", + "displayName": "FontSizeData" + } + ], + "doc": "Data for a font size decoration." + }, + { + "name": "fontWeightValue", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font weight for a bold decoration." + }, + { + "name": "italicData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an italic decoration." + }, + { + "name": "linkData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLinkData", + "displayName": "LinkData" + } + ], + "doc": "Data for an external link decoration." + }, + { + "name": "mentionData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMentionData", + "displayName": "MentionData" + } + ], + "doc": "Data for a mention decoration." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of decoration to apply." + }, + { + "name": "underlineData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an underline decoration." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDecorationDataOneOf", + "members": [ + "anchorData", + "colorData", + "fontSizeData", + "fontWeightValue", + "italicData", + "linkData", + "mentionData", + "underlineData" + ] + } + ] + }, + "docs": { + "description": [ + "Adds appearence changes to text" + ] + } + }, + { + "name": "formsV4SubmissionDecorationDataOneOf", + "members": [ + { + "name": "anchorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionAnchorData", + "displayName": "AnchorData" + } + ], + "doc": "Data for an anchor link decoration." + }, + { + "name": "colorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionColorData", + "displayName": "ColorData" + } + ], + "doc": "Data for a color decoration." + }, + { + "name": "fontSizeData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFontSizeData", + "displayName": "FontSizeData" + } + ], + "doc": "Data for a font size decoration." + }, + { + "name": "fontWeightValue", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font weight for a bold decoration." + }, + { + "name": "italicData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an italic decoration." + }, + { + "name": "linkData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLinkData", + "displayName": "LinkData" + } + ], + "doc": "Data for an external link decoration." + }, + { + "name": "mentionData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMentionData", + "displayName": "MentionData" + } + ], + "doc": "Data for a mention decoration." + }, + { + "name": "underlineData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an underline decoration." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDeleteSubmissionRequest", + "members": [ + { + "name": "permanent", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Delete submission bypassing trash-bin\nDefault: false" + }, + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the submission to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDeleteSubmissionResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDesign", + "members": [ + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionOptionDesign", + "displayName": "OptionDesign" + } + ], + "doc": "Styling for voting options." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPollDesign", + "displayName": "PollDesign" + } + ], + "doc": "Styling for the poll." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDimensions", + "members": [ + { + "name": "colsMinWidth", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing the minimum width of each column in pixels." + }, + { + "name": "colsWidthRatio", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing relative width of each column in relation to the other columns." + }, + { + "name": "rowsHeight", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing the height of each row in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDisplayField", + "members": [ + { + "name": "header", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionHeader", + "displayName": "Header" + } + ], + "doc": "Header field" + }, + { + "name": "richText", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichText", + "displayName": "RichText" + } + ], + "doc": "Rich text field" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDisplayFieldComponentTypeOneOf", + "members": [ + "header", + "richText" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDisplayFieldComponentTypeOneOf", + "members": [ + { + "name": "header", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionHeader", + "displayName": "Header" + } + ], + "doc": "Header field" + }, + { + "name": "richText", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichText", + "displayName": "RichText" + } + ], + "doc": "Rich text field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDividerData", + "members": [ + { + "name": "alignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider alignment." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the divider's container." + }, + { + "name": "lineStyle", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider line style." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider width." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDocumentStyle", + "members": [ + { + "name": "blockquote", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for block quote nodes." + }, + { + "name": "codeBlock", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for code block nodes." + }, + { + "name": "headerFive", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H5 nodes." + }, + { + "name": "headerFour", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H4 nodes." + }, + { + "name": "headerOne", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H1 nodes." + }, + { + "name": "headerSix", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H6 nodes." + }, + { + "name": "headerThree", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H3 nodes." + }, + { + "name": "headerTwo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for H2 nodes." + }, + { + "name": "paragraph", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextNodeStyle", + "displayName": "TextNodeStyle" + } + ], + "doc": "Styling for paragraph nodes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDropdown", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDropdownCustomOption", + "displayName": "DropdownCustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDropdownOption", + "displayName": "DropdownOption" + } + ] + } + } + ], + "doc": "List of options to select from" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of dropdown input" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDropdownCustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDropdownOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionDynamicPriceOptions", + "members": [ + { + "name": "maxPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Maximal price monetary amount." + }, + { + "name": "minPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Minimal price monetary amount." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionEmailInfo", + "members": [ + { + "name": "tag", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Email tag." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionEmbedData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the oEmbed node's container." + }, + { + "name": "oembed", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionOembed", + "displayName": "Oembed" + } + ], + "doc": "An [oEmbed](https://www.oembed.com) object." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Origin asset source." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionEmpty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionEventData", + "members": [ + { + "name": "location", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event location." + }, + { + "name": "scheduling", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event schedule." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionExtendedFields", + "members": [ + { + "name": "namespaces", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "Object" + } + ] + } + } + ], + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFileData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the file's container." + }, + { + "name": "mimeType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File MIME type." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File name." + }, + { + "name": "path", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File path." + }, + { + "name": "pdfSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPdfSettings", + "displayName": "PDFSettings" + } + ], + "doc": "Settings for PDF files." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "File size in KB." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFileSource", + "displayName": "FileSource" + } + ], + "doc": "The source for the file's data." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFileSource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An ID that's resolved to a URL by a resolver function." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom ID. Use `id` instead." + }, + { + "name": "private", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates whether the file's source is private." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the file's source." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFileSourceDataOneOf", + "members": [ + "_id", + "custom", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFileSourceDataOneOf", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An ID that's resolved to a URL by a resolver function." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom ID. Use `id` instead." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the file's source." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFileUpload", + "members": [ + { + "name": "buttonText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text on upload button" + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "explanationText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom text which appears when file is uploaded, if missing file name will be shown" + }, + { + "name": "fileLimit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of files allowed to upload" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + }, + { + "name": "uploadFileFormats", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Supported file formats for upload" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFixedPriceOptions", + "members": [ + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fixed price monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFontSizeData", + "members": [ + { + "name": "unit", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The units used for the font size." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font size value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionForm", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date of creation." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date of last update." + }, + { + "name": "deletedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormField", + "displayName": "FormField" + } + ] + } + } + ], + "doc": "Fields which were soft deleted." + }, + { + "name": "deletedFieldsV2", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormFieldV2", + "displayName": "FormFieldV2" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Data extensions ExtendedFields." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormField", + "displayName": "FormField" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "fieldsV2", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormFieldV2", + "displayName": "FormFieldV2" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "kind", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Regular forms can be freely modified.\nExtensions are copied from templates and might have restrictions." + }, + { + "name": "limitationRule", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLimitationRule", + "displayName": "LimitationRule" + } + ], + "doc": "Rules that limit submissions on this form." + }, + { + "name": "mediaFolderId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media folder ID." + }, + { + "name": "namespace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the namespace that the form belongs to." + }, + { + "name": "postSubmissionTriggers", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPostSubmissionTriggers", + "displayName": "PostSubmissionTriggers" + } + ], + "doc": "Defines triggers that will be executed after the submission, for the submissions based on this schema.\nForms provide a set of predefined triggers that allow it to assign specific business cases to created forms." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormProperties", + "displayName": "FormProperties" + } + ], + "doc": "Properties of the form." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Represents the current state of an item. Each time the item is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision." + }, + { + "name": "rules", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormRule", + "displayName": "FormRule" + } + ] + } + } + ], + "doc": "Form rules, can be applied to layout and items properties." + }, + { + "name": "steps", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStep", + "displayName": "Step" + } + ] + } + } + ], + "doc": "Defines the layout for form fields in each submission step." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormDeletedSubmissionsCount", + "members": [ + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "totalCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormField", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID." + }, + { + "name": "dataExtensionsDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDataExtensionsDetails", + "displayName": "DataExtensionsDetails" + } + ], + "doc": "Details identifying field, which is extension of other entity" + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden." + }, + { + "name": "pii", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Mark the field as containing personal information. This will encrypt user data when storing it." + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Definition of a target where the value of field belongs." + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionValidation", + "displayName": "Validation" + } + ], + "doc": "Validation of field output value." + }, + { + "name": "view", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Field view properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormFieldContactInfo", + "members": [ + { + "name": "addressInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionAddressInfo", + "displayName": "AddressInfo" + } + ], + "doc": "Address info." + }, + { + "name": "contactField", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Field mapped to contacts." + }, + { + "name": "customFieldInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCustomFieldInfo", + "displayName": "CustomFieldInfo" + } + ], + "doc": "Custom field info." + }, + { + "name": "emailInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEmailInfo", + "displayName": "EmailInfo" + } + ], + "doc": "Email info." + }, + { + "name": "phoneInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPhoneInfo", + "displayName": "PhoneInfo" + } + ], + "doc": "Phone info." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFormFieldContactInfoAdditionalInfoOneOf", + "members": [ + "addressInfo", + "customFieldInfo", + "emailInfo", + "phoneInfo" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormFieldContactInfoAdditionalInfoOneOf", + "members": [ + { + "name": "addressInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionAddressInfo", + "displayName": "AddressInfo" + } + ], + "doc": "Address info." + }, + { + "name": "customFieldInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCustomFieldInfo", + "displayName": "CustomFieldInfo" + } + ], + "doc": "Custom field info." + }, + { + "name": "emailInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEmailInfo", + "displayName": "EmailInfo" + } + ], + "doc": "Email info." + }, + { + "name": "phoneInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPhoneInfo", + "displayName": "PhoneInfo" + } + ], + "doc": "Phone info." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormFieldV2", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Field id." + }, + { + "name": "displayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDisplayField", + "displayName": "DisplayField" + } + ], + "doc": "Field for displaying information such as header or text paragraph" + }, + { + "name": "fieldType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of the field" + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden.\nDefault: false" + }, + { + "name": "identifier", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom identification of field, can be used to specify exceptional behaviour of client for specific field" + }, + { + "name": "inputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputField", + "displayName": "InputField" + } + ], + "doc": "Field accept input of data" + }, + { + "name": "submitOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmitButton", + "displayName": "SubmitButton" + } + ], + "doc": "Submit button of the form" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFormFieldV2FieldTypeOptionsOneOf", + "members": [ + "displayOptions", + "inputOptions", + "submitOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormFieldV2FieldTypeOptionsOneOf", + "members": [ + { + "name": "displayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDisplayField", + "displayName": "DisplayField" + } + ], + "doc": "Field for displaying information such as header or text paragraph" + }, + { + "name": "inputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputField", + "displayName": "InputField" + } + ], + "doc": "Field accept input of data" + }, + { + "name": "submitOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmitButton", + "displayName": "SubmitButton" + } + ], + "doc": "Submit button of the form" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormLayout", + "members": [ + { + "name": "large", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBreakPoint", + "displayName": "BreakPoint" + } + ], + "doc": "Layout for large break point." + }, + { + "name": "medium", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBreakPoint", + "displayName": "BreakPoint" + } + ], + "doc": "Layout for medium break point." + }, + { + "name": "small", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBreakPoint", + "displayName": "BreakPoint" + } + ], + "doc": "Layout for small break point." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormOverride", + "members": [ + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Overridden entity id. Either fieldId, or \"{fieldIdWithNestedForm}/{nestedFormFieldId}\"" + }, + { + "name": "entityType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Override entity type." + }, + { + "name": "valueChanges", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Form entity properties path with new value, that will be changed on condition." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormProperties", + "members": [ + { + "name": "disabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Identifies if the form is disabled." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormRule", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the rule" + }, + { + "name": "condition", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Rule on which item properties or layouts will be changed." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the rule" + }, + { + "name": "overrides", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormOverride", + "displayName": "FormOverride" + } + ] + } + } + ], + "doc": "Form items with defined properties that will be\nchanged when given condition is resolved to true." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormSubmission", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the form submission was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Submission ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the form submission was updated." + }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionExtendedFields", + "displayName": "ExtendedFields" + } + ], + "doc": "Data extension object that holds users' and apps' fields." + }, + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the form which the submission belongs to." + }, + { + "name": "namespace", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace." + }, + { + "name": "orderDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionOrderDetails", + "displayName": "OrderDetails" + } + ], + "doc": "Order details.
\nNote: This object is only applicable when submittng a form in the Wix Payments app." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission." + }, + { + "name": "seen", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a site owner marked a submission as \"seen\"." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Status of the submission.\n- `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.\n- `PAYMENT_WAITING`: A form submission requiring payment is created.\n- `PAYMENT_CANCELED`: An order of a form submission is canceled.\n- `CONFIRMED`: A submission is recorded in the Wix Forms collection." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Submission values where `key` is the form field and `value` is the data submitted for the given field." + }, + { + "name": "submitter", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmitter", + "displayName": "Submitter" + } + ], + "doc": "ID of the visitor that submitted the form." + } + ], + "docs": { + "description": [ + "Form submission that was created or retrieved." + ] + } + }, + { + "name": "formsV4SubmissionFormSubmissionStatusUpdatedEvent", + "members": [ + { + "name": "previousStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Previous status of the submission." + }, + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Updated submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionFormSubmissionsCount", + "members": [ + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "totalCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of submissions." + }, + { + "name": "unseenCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of submissions that haven't yet been seen by site Extensions with manage submission permissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGalleryData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the gallery's container." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the gallery's download button is disabled." + }, + { + "name": "disableExpand", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the gallery's expand button is disabled." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionItem", + "displayName": "Item" + } + ] + } + } + ], + "doc": "The items in the gallery." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGalleryOptions", + "displayName": "GalleryOptions" + } + ], + "doc": "Options for defining the gallery's appearance." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGalleryOptions", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionItemStyle", + "displayName": "ItemStyle" + } + ], + "doc": "Styling for gallery items." + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLayout", + "displayName": "Layout" + } + ], + "doc": "Gallery layout." + }, + { + "name": "thumbnails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionThumbnails", + "displayName": "Thumbnails" + } + ], + "doc": "Styling for gallery thumbnail images." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGetDeletedSubmissionRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Submission id." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGetDeletedSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The retrieved Submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGetMediaUploadUrlRequest", + "members": [ + { + "name": "filename", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of file to upload." + }, + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "mimeType", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "[Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#) of file to upload.\n\nFor example, `'image/png'`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGetMediaUploadUrlResponse", + "members": [ + { + "name": "uploadUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Url to upload file." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGetSubmissionByCheckoutIdRequest", + "members": [ + { + "name": "checkoutId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Checkout ID of the submission to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGetSubmissionByCheckoutIdResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The retrieved submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGetSubmissionRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the submission to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGetSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The retrieved submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGif", + "members": [ + { + "name": "gif", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "GIF format URL." + }, + { + "name": "mp4", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "MP4 format URL." + }, + { + "name": "still", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Thumbnail URL." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGifData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the GIF's container." + }, + { + "name": "downsized", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGif", + "displayName": "GIF" + } + ], + "doc": "The source of the downsized GIF." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Height in pixels." + }, + { + "name": "original", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGif", + "displayName": "GIF" + } + ], + "doc": "The source of the full size GIF." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionGradient", + "members": [ + { + "name": "angle", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The gradient angle in degrees." + }, + { + "name": "lastColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The end color as a hexademical value." + }, + { + "name": "startColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The start color as a hexademical value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionHeader", + "members": [ + { + "name": "content", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Content of the header" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionHeadingData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level from 1-6." + }, + { + "name": "level", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Heading level from 1-6." + }, + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextStyle", + "displayName": "TextStyle" + } + ], + "doc": "Styling for the heading text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionHeight", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom height value in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionHtmlData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the HTML node's container." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The HTML code for the node." + }, + { + "name": "isAdsense", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this is an AdSense element. Use `source` instead." + }, + { + "name": "source", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of HTML code." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the HTML code for the node." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfHTMLDataDataOneOf", + "members": [ + "html", + "isAdsense", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionHtmlDataDataOneOf", + "members": [ + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The HTML code for the node." + }, + { + "name": "isAdsense", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this is an AdSense element. Use `source` instead." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the HTML code for the node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionImage", + "members": [ + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLink", + "displayName": "Link" + } + ], + "doc": "Link details for images that are links." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Image file details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionImageData", + "members": [ + { + "name": "altText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Image's alternative text." + }, + { + "name": "caption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Image caption." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the image's container." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the image's download button is disabled." + }, + { + "name": "disableExpand", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the image expands to full screen when clicked." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Image file details." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLink", + "displayName": "Link" + } + ], + "doc": "Link details for images that are links." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputField", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "nativeType": "Array" + } + ], + "doc": "Input return array as value" + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBoolean", + "displayName": "Boolean" + } + ], + "doc": "Input return boolean as value" + }, + { + "name": "inputType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of the input field" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumber", + "displayName": "Number" + } + ], + "doc": "Input return number as value" + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionObject", + "displayName": "Object" + } + ], + "doc": "Input return object as value" + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPayment", + "displayName": "Payment" + } + ], + "doc": "Input returns selected products as value." + }, + { + "name": "pii", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Mark the field as containing personal information. This will encrypt user data when storing it.\nDefault: false" + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is required.\nDefault: false" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionString", + "displayName": "String" + } + ], + "doc": "Input return string as value" + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Definition of a target where the value of field belongs." + }, + { + "name": "wixFileOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionWixFile", + "displayName": "WixFile" + } + ], + "doc": "Input return \"Wix file\" as value" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfInputFieldInputTypeOptionsOneOf", + "members": [ + "arrayOptions", + "booleanOptions", + "numberOptions", + "objectOptions", + "paymentOptions", + "stringOptions", + "wixFileOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldArrayErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldArrayType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldArrayErrorMessages", + "displayName": "InputFieldArrayErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionArrayTypeArrayItems", + "displayName": "ArrayTypeArrayItems" + } + ], + "doc": "Type of items allowed in array." + }, + { + "name": "maxItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum amount of array elements." + }, + { + "name": "minItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum amount of array elements." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldBooleanErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldBooleanType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "boolean" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldBooleanErrorMessages", + "displayName": "InputFieldBooleanErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldInputTypeOptionsOneOf", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "nativeType": "Array" + } + ], + "doc": "Input return array as value" + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBoolean", + "displayName": "Boolean" + } + ], + "doc": "Input return boolean as value" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumber", + "displayName": "Number" + } + ], + "doc": "Input return number as value" + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionObject", + "displayName": "Object" + } + ], + "doc": "Input return object as value" + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPayment", + "displayName": "Payment" + } + ], + "doc": "Input returns selected products as value." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionString", + "displayName": "String" + } + ], + "doc": "Input return string as value" + }, + { + "name": "wixFileOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionWixFile", + "displayName": "WixFile" + } + ], + "doc": "Input return \"Wix file\" as value" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldIntegerType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldNumberErrorMessages", + "displayName": "InputFieldNumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldNumberErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldNumberType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldNumberErrorMessages", + "displayName": "InputFieldNumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldObjectErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldObjectType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldObjectErrorMessages", + "displayName": "InputFieldObjectErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionObjectTypePropertiesType", + "displayName": "ObjectTypePropertiesType" + } + ] + } + } + ], + "doc": "Description of object properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldStringErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionInputFieldStringType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldStringErrorMessages", + "displayName": "InputFieldStringErrorMessages" + } + ], + "doc": "Custom error messages when validation fails." + }, + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of a string." + }, + { + "name": "maxLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum length." + }, + { + "name": "minLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum length." + }, + { + "name": "pattern", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pattern for a regular expression match." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionIntegerType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberErrorMessages", + "displayName": "NumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionIsFormSubmittableRequest", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionIsFormSubmittableResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionItem", + "members": [ + { + "name": "altText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item's alternative text." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionImage", + "displayName": "Image" + } + ], + "doc": "An image item." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item title." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionVideo", + "displayName": "Video" + } + ], + "doc": "A video item." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfItemDataOneOf", + "members": [ + "image", + "video" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionItemDataOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionImage", + "displayName": "Image" + } + ], + "doc": "An image item." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionVideo", + "displayName": "Video" + } + ], + "doc": "A video item." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionItemLayout", + "members": [ + { + "name": "column", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Vertical coordinate in the grid." + }, + { + "name": "fieldId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form field reference id." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Width." + }, + { + "name": "row", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Horizontal coordinate in the grid." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Height." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionItemMetadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + }, + { + "name": "error", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionApplicationError", + "displayName": "ApplicationError" + } + ], + "doc": "Details about the error in case of failure." + }, + { + "name": "originalIndex", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionItemStyle", + "members": [ + { + "name": "crop", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets how item images are cropped." + }, + { + "name": "ratio", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Item ratio" + }, + { + "name": "spacing", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The spacing between items in pixels." + }, + { + "name": "targetSize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Desirable dimension for each item in pixels (behvaior changes according to gallery type)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionLayout", + "members": [ + { + "name": "horizontalScroll", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether horizontal scroll is enabled." + }, + { + "name": "mobileNumberOfColumns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of columns to display on mobile screens." + }, + { + "name": "numberOfColumns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of columns to display on full size screens." + }, + { + "name": "orientation", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Gallery orientation." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Gallery layout type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionLimitationRule", + "members": [ + { + "name": "dateTimeDeadline", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Limitation by submission date, disables form when a set date and time is reached." + }, + { + "name": "maxAllowedSubmissions", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Limitation by submission count, disables form when a set amount of submissions is reached." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionLink", + "members": [ + { + "name": "anchor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The target node's ID. Used for linking to another node in this object." + }, + { + "name": "customData", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A serialized object used for a custom or external link panel." + }, + { + "name": "rel", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRel", + "displayName": "Rel" + } + ], + "doc": "The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document." + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "he HTML `target` attribute value for the link. This property defines where the linked document opens as follows:\n`SELF` - Default. Opens the linked document in the same frame as the link.\n`BLANK` - Opens the linked document in a new browser tab or window.\n`PARENT` - Opens the linked document in the link's parent frame.\n`TOP` - Opens the linked document in the full body of the link's browser tab or window." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the linked document." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfLinkDataOneOf", + "members": [ + "anchor", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionLinkData", + "members": [ + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLink", + "displayName": "Link" + } + ], + "doc": "Link details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionLinkDataOneOf", + "members": [ + { + "name": "anchor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The target node's ID. Used for linking to another node in this object." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the linked document." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionLinkPreviewData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the link preview's container." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview description." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The preview content as HTML." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLink", + "displayName": "Link" + } + ], + "doc": "Link details." + }, + { + "name": "thumbnailUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview thumbnail URL." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionListDeletedSubmissionsRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`." + }, + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of statuses of submissions which should be returned\nDefault: CONFIRMED" + }, + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionListDeletedSubmissionsResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorPagingMetadata", + "displayName": "CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ] + } + } + ], + "doc": "The retrieved Submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionListValue", + "members": [ + { + "name": "values", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "any" + } + ] + } + } + ], + "doc": "Repeated field of dynamically typed values." + } + ], + "docs": { + "description": [ + "`ListValue` is a wrapper around a repeated field of values." + ] + } + }, + { + "name": "formsV4SubmissionMapData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the map's container." + }, + { + "name": "mapSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMapSettings", + "displayName": "MapSettings" + } + ], + "doc": "Map settings." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionMapSettings", + "members": [ + { + "name": "address", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The address to display on the map." + }, + { + "name": "draggable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the map is draggable." + }, + { + "name": "initialZoom", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Initial zoom value." + }, + { + "name": "lat", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Location latitude." + }, + { + "name": "lng", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Location longitude." + }, + { + "name": "locationName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location name." + }, + { + "name": "mapType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Map type. `HYBRID` is a combination of the `ROADMAP` and `SATELLITE` map types." + }, + { + "name": "marker", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the location marker is visible." + }, + { + "name": "streetViewControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether street view control is enabled." + }, + { + "name": "viewModeControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether view mode control is enabled." + }, + { + "name": "zoomControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether zoom control is enabled." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionMargin", + "members": [ + { + "name": "horizontal", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Horizontal value." + }, + { + "name": "vertical", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Vertical value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionMedia", + "members": [ + { + "name": "duration", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media duration in seconds. Only relevant for audio and video files." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media height in pixels." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFileSource", + "displayName": "FileSource" + } + ], + "doc": "The source for the media's data." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionMediaItem", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "WixMedia image." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaItemMediaOneOf", + "members": [ + "image" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionMediaItemMediaOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "WixMedia image." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionMentionData", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Mentioned user's ID." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The mentioned user's name." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The version of the user's name that appears after the `@` character in the mention." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionMetadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Object ID." + }, + { + "name": "createdTimestamp", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "When the object was created." + }, + { + "name": "updatedTimestamp", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "When the object was most recently updated." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Schema version." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNestedForm", + "members": [ + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionForm", + "displayName": "Form" + } + ], + "doc": "Nested form." + }, + { + "name": "targets", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Targets which have this form." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNestedFormFieldOverrides", + "members": [ + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden. Leave blank for no override." + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is required. Leave blank for no override." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNestedFormOverrides", + "members": [ + { + "name": "fieldOverrides", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNestedFormFieldOverrides", + "displayName": "NestedFormFieldOverrides" + } + ] + } + } + ], + "doc": "Field overrides by field ID" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNode", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Node ID." + }, + { + "name": "appEmbedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionAppEmbedData", + "displayName": "AppEmbedData" + } + ], + "doc": "Data for an app embed node." + }, + { + "name": "audioData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionAudioData", + "displayName": "AudioData" + } + ], + "doc": "Data for an audio node." + }, + { + "name": "blockquoteData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBlockquoteData", + "displayName": "BlockquoteData" + } + ], + "doc": "Data for a block quote node." + }, + { + "name": "bulletedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulletedListData", + "displayName": "BulletedListData" + } + ], + "doc": "Data for a bulleted list node." + }, + { + "name": "buttonData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionButtonData", + "displayName": "ButtonData" + } + ], + "doc": "Data for a button node." + }, + { + "name": "codeBlockData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCodeBlockData", + "displayName": "CodeBlockData" + } + ], + "doc": "Data for a code block node." + }, + { + "name": "collapsibleListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCollapsibleListData", + "displayName": "CollapsibleListData" + } + ], + "doc": "Data for a collapsible list node." + }, + { + "name": "dividerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDividerData", + "displayName": "DividerData" + } + ], + "doc": "Data for a divider node." + }, + { + "name": "embedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEmbedData", + "displayName": "EmbedData" + } + ], + "doc": "Data for an oEmbed node." + }, + { + "name": "externalData", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data for a custon external node." + }, + { + "name": "fileData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFileData", + "displayName": "FileData" + } + ], + "doc": "Data for a file node." + }, + { + "name": "galleryData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGalleryData", + "displayName": "GalleryData" + } + ], + "doc": "Data for a gallery node." + }, + { + "name": "gifData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGifData", + "displayName": "GIFData" + } + ], + "doc": "Data for a GIF node." + }, + { + "name": "headingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionHeadingData", + "displayName": "HeadingData" + } + ], + "doc": "Data for a heading node." + }, + { + "name": "htmlData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionHtmlData", + "displayName": "HTMLData" + } + ], + "doc": "Data for an embedded HTML node." + }, + { + "name": "imageData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionImageData", + "displayName": "ImageData" + } + ], + "doc": "Data for an image node." + }, + { + "name": "linkPreviewData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLinkPreviewData", + "displayName": "LinkPreviewData" + } + ], + "doc": "Data for a link preview node." + }, + { + "name": "mapData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMapData", + "displayName": "MapData" + } + ], + "doc": "Data for a map node." + }, + { + "name": "nodes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNode", + "displayName": "Node" + } + ] + } + } + ], + "doc": "A list of child nodes." + }, + { + "name": "orderedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionOrderedListData", + "displayName": "OrderedListData" + } + ], + "doc": "Data for an ordered list node." + }, + { + "name": "paragraphData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionParagraphData", + "displayName": "ParagraphData" + } + ], + "doc": "Data for a paragraph node." + }, + { + "name": "pollData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPollData", + "displayName": "PollData" + } + ], + "doc": "Data for a poll node." + }, + { + "name": "style", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNodeStyle", + "displayName": "NodeStyle" + } + ], + "doc": "Padding and background color styling for the node." + }, + { + "name": "tableCellData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTableCellData", + "displayName": "TableCellData" + } + ], + "doc": "Data for a table cell node." + }, + { + "name": "tableData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTableData", + "displayName": "TableData" + } + ], + "doc": "Data for a table node." + }, + { + "name": "textData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextData", + "displayName": "TextData" + } + ], + "doc": "Data for a text node. Used to apply decorations to text." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "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." + }, + { + "name": "videoData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionVideoData", + "displayName": "VideoData" + } + ], + "doc": "Data for a video node." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfNodeDataOneOf", + "members": [ + "appEmbedData", + "audioData", + "blockquoteData", + "bulletedListData", + "buttonData", + "codeBlockData", + "collapsibleListData", + "dividerData", + "embedData", + "externalData", + "fileData", + "galleryData", + "gifData", + "headingData", + "htmlData", + "imageData", + "linkPreviewData", + "mapData", + "orderedListData", + "paragraphData", + "pollData", + "tableCellData", + "tableData", + "textData", + "videoData" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNodeDataOneOf", + "members": [ + { + "name": "appEmbedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionAppEmbedData", + "displayName": "AppEmbedData" + } + ], + "doc": "Data for an app embed node." + }, + { + "name": "audioData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionAudioData", + "displayName": "AudioData" + } + ], + "doc": "Data for an audio node." + }, + { + "name": "blockquoteData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBlockquoteData", + "displayName": "BlockquoteData" + } + ], + "doc": "Data for a block quote node." + }, + { + "name": "bulletedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBulletedListData", + "displayName": "BulletedListData" + } + ], + "doc": "Data for a bulleted list node." + }, + { + "name": "buttonData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionButtonData", + "displayName": "ButtonData" + } + ], + "doc": "Data for a button node." + }, + { + "name": "codeBlockData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCodeBlockData", + "displayName": "CodeBlockData" + } + ], + "doc": "Data for a code block node." + }, + { + "name": "collapsibleListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCollapsibleListData", + "displayName": "CollapsibleListData" + } + ], + "doc": "Data for a collapsible list node." + }, + { + "name": "dividerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDividerData", + "displayName": "DividerData" + } + ], + "doc": "Data for a divider node." + }, + { + "name": "embedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionEmbedData", + "displayName": "EmbedData" + } + ], + "doc": "Data for an oEmbed node." + }, + { + "name": "externalData", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data for a custon external node." + }, + { + "name": "fileData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFileData", + "displayName": "FileData" + } + ], + "doc": "Data for a file node." + }, + { + "name": "galleryData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGalleryData", + "displayName": "GalleryData" + } + ], + "doc": "Data for a gallery node." + }, + { + "name": "gifData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionGifData", + "displayName": "GIFData" + } + ], + "doc": "Data for a GIF node." + }, + { + "name": "headingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionHeadingData", + "displayName": "HeadingData" + } + ], + "doc": "Data for a heading node." + }, + { + "name": "htmlData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionHtmlData", + "displayName": "HTMLData" + } + ], + "doc": "Data for an embedded HTML node." + }, + { + "name": "imageData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionImageData", + "displayName": "ImageData" + } + ], + "doc": "Data for an image node." + }, + { + "name": "linkPreviewData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionLinkPreviewData", + "displayName": "LinkPreviewData" + } + ], + "doc": "Data for a link preview node." + }, + { + "name": "mapData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMapData", + "displayName": "MapData" + } + ], + "doc": "Data for a map node." + }, + { + "name": "orderedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionOrderedListData", + "displayName": "OrderedListData" + } + ], + "doc": "Data for an ordered list node." + }, + { + "name": "paragraphData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionParagraphData", + "displayName": "ParagraphData" + } + ], + "doc": "Data for a paragraph node." + }, + { + "name": "pollData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPollData", + "displayName": "PollData" + } + ], + "doc": "Data for a poll node." + }, + { + "name": "tableCellData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTableCellData", + "displayName": "TableCellData" + } + ], + "doc": "Data for a table cell node." + }, + { + "name": "tableData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTableData", + "displayName": "TableData" + } + ], + "doc": "Data for a table node." + }, + { + "name": "textData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextData", + "displayName": "TextData" + } + ], + "doc": "Data for a text node. Used to apply decorations to text." + }, + { + "name": "videoData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionVideoData", + "displayName": "VideoData" + } + ], + "doc": "Data for a video node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNodeStyle", + "members": [ + { + "name": "backgroundColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexadecimal value." + }, + { + "name": "paddingBottom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The bottom padding value in pixels." + }, + { + "name": "paddingTop", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The top padding value in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNumber", + "members": [ + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the number input field" + }, + { + "name": "numberInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberInput", + "displayName": "NumberInput" + } + ], + "doc": "Number value input field" + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Validation of field output value." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfNumberComponentTypeOptionsOneOf", + "members": [ + "numberInputOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNumberComponentTypeOptionsOneOf", + "members": [ + { + "name": "numberInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberInput", + "displayName": "NumberInput" + } + ], + "doc": "Number value input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNumberErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNumberInput", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder for the value input" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionNumberType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberErrorMessages", + "displayName": "NumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionObject", + "members": [ + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldObjectType", + "displayName": "InputFieldObjectType" + } + ], + "doc": "Validation of object type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfObjectValidationOneOf", + "members": [ + "nestedFormId", + "object" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionObjectErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionObjectType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionObjectErrorMessages", + "displayName": "ObjectErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPropertiesType", + "displayName": "PropertiesType" + } + ] + } + } + ], + "doc": "Description of object properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionObjectTypePropertiesType", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldArrayType", + "displayName": "InputFieldArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldIntegerType", + "displayName": "InputFieldIntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "propertiesType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of object properties" + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the property is required." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "String type validation for property." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfObjectTypePropertiesTypePropertiesTypeOptionsOneOf", + "members": [ + "arrayOptions", + "booleanOptions", + "integerOptions", + "numberOptions", + "stringOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionObjectTypePropertiesTypePropertiesTypeOptionsOneOf", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldArrayType", + "displayName": "InputFieldArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldBooleanType", + "displayName": "InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldIntegerType", + "displayName": "InputFieldIntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldNumberType", + "displayName": "InputFieldNumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "String type validation for property." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionObjectValidationOneOf", + "members": [ + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldObjectType", + "displayName": "InputFieldObjectType" + } + ], + "doc": "Validation of object type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionOembed", + "members": [ + { + "name": "authorName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the author or owner of the resource." + }, + { + "name": "authorUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the author or owner of the resource." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The height of the resource specified in the `url` property in pixels." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "HTML for embedding a video player. The HTML should have no padding or margins." + }, + { + "name": "providerName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the resource provider." + }, + { + "name": "providerUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the resource provider." + }, + { + "name": "thumbnailHeight", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined." + }, + { + "name": "thumbnailUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined." + }, + { + "name": "thumbnailWidth", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource title." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The resource type." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The source URL for the resource." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The oEmbed version number. This value must be `1.0`." + }, + { + "name": "videoUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for an embedded viedo." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The width of the resource specified in the `url` property in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Media item. Media, associated with option, like image." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionOptionDesign", + "members": [ + { + "name": "borderRadius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionOptionLayout", + "members": [ + { + "name": "enableImage", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether to display option images." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionOrderDetails", + "members": [ + { + "name": "checkoutId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the checkout related to submission (only applicable if a form has payments)." + }, + { + "name": "currency", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Currency." + }, + { + "name": "itemSubtotal", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item subtotal." + }, + { + "name": "number", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order number." + }, + { + "name": "orderId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the order related to submission (only applicable if a form has payments)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionOrderedListData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionParagraphData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level from 1-6." + }, + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextStyle", + "displayName": "TextStyle" + } + ], + "doc": "Styling for the paragraph text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPayment", + "members": [ + { + "name": "checkboxGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionProductCheckboxGroup", + "displayName": "ProductCheckboxGroup" + } + ], + "doc": "Checkbox group input field." + }, + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the payment input field." + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPaymentType", + "displayName": "PaymentType" + } + ], + "doc": "Validation of payment type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPaymentComponentTypeOptionsOneOf", + "members": [ + "checkboxGroupOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPaymentComponentTypeOptionsOneOf", + "members": [ + { + "name": "checkboxGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionProductCheckboxGroup", + "displayName": "ProductCheckboxGroup" + } + ], + "doc": "Checkbox group input field." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPaymentType", + "members": [ + { + "name": "maxItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum amount of different products." + }, + { + "name": "minItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum amount of different products." + }, + { + "name": "products", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionProduct", + "displayName": "Product" + } + ] + } + } + ], + "doc": "Field mapped to products." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPdfSettings", + "members": [ + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the PDF download button is disabled." + }, + { + "name": "disablePrint", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the PDF print button is disabled." + }, + { + "name": "viewMode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "PDF view mode. One of the following:\n`NONE` : The PDF isn't displayed.\n`FULL` : A full page view of the PDF is displayed.\n`MINI` : A mini view of the PDF is displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPermissions", + "members": [ + { + "name": "allowMultipleVotes", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether one voter can vote multiple times." + }, + { + "name": "view", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets who can view the poll results." + }, + { + "name": "vote", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets who can vote." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPhoneInfo", + "members": [ + { + "name": "tag", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Phone tag." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPlaybackOptions", + "members": [ + { + "name": "autoPlay", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the media will automatically start playing." + }, + { + "name": "playInLoop", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether media's will be looped." + }, + { + "name": "showControls", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether media's controls will be shown." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPluginContainerData", + "members": [ + { + "name": "alignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The node's alignment within its container." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionHeight", + "displayName": "Height" + } + ], + "doc": "The height of the node when it's displayed." + }, + { + "name": "spoiler", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSpoiler", + "displayName": "Spoiler" + } + ], + "doc": "Spoiler cover settings for the node." + }, + { + "name": "textWrap", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerDataWidth", + "displayName": "PluginContainerDataWidth" + } + ], + "doc": "The width of the node when it's displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPluginContainerDataWidth", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom width value in pixels." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "One of the following predefined width options:\n`CONTENT`: The width of the container matches the content width.\n`SMALL`: Small width.\n`ORIGINAL`: The width of the container matches the original asset width.\n`FULL_WIDTH`: Full width." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPluginContainerDataWidthDataOneOf", + "members": [ + "custom", + "size" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPluginContainerDataWidthDataOneOf", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom width value in pixels." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "One of the following predefined width options:\n`CONTENT`: The width of the container matches the content width.\n`SMALL`: Small width.\n`ORIGINAL`: The width of the container matches the original asset width.\n`FULL_WIDTH`: Full width." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPoll", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll ID." + }, + { + "name": "creatorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll creator ID." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Main poll image." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPollOption", + "displayName": "PollOption" + } + ] + } + } + ], + "doc": "Voting options." + }, + { + "name": "settings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSettings", + "displayName": "Settings" + } + ], + "doc": "The poll's permissions and display settings." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPollData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the poll's container." + }, + { + "name": "design", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDesign", + "displayName": "Design" + } + ], + "doc": "Styling for the poll and voting options." + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPollDataLayout", + "displayName": "PollDataLayout" + } + ], + "doc": "Layout settings for the poll and voting options." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPoll", + "displayName": "Poll" + } + ], + "doc": "Poll data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPollDataLayout", + "members": [ + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionOptionLayout", + "displayName": "OptionLayout" + } + ], + "doc": "Voting otpions layout settings." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPollLayout", + "displayName": "PollLayout" + } + ], + "doc": "Poll layout settings." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPollDesign", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBackground", + "displayName": "Background" + } + ], + "doc": "Background styling." + }, + { + "name": "borderRadius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPollLayout", + "members": [ + { + "name": "direction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The direction of the text displayed in the voting options. Text can be displayed either right-to-left or left-to-right." + }, + { + "name": "enableImage", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether to display the main poll image." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The layout for displaying the voting options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPollOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option ID." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "The image displayed with the option." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPostSubmissionTriggers", + "members": [ + { + "name": "upsertContact", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionUpsertContact", + "displayName": "UpsertContact" + } + ], + "doc": "Upserts a contact from the submission data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPredefinedValidation", + "members": [ + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of predefined validation." + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPaymentType", + "displayName": "PaymentType" + } + ], + "doc": "Payment input field." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPredefinedValidationFormatOptionsOneOf", + "members": [ + "paymentOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPredefinedValidationFormatOptionsOneOf", + "members": [ + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPaymentType", + "displayName": "PaymentType" + } + ], + "doc": "Payment input field." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionProduct", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "dynamicPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDynamicPriceOptions", + "displayName": "DynamicPriceOptions" + } + ], + "doc": "Dynamic price options." + }, + { + "name": "fixedPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFixedPriceOptions", + "displayName": "FixedPriceOptions" + } + ], + "doc": "Fixed price options." + }, + { + "name": "priceType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Price type." + }, + { + "name": "productType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product type." + }, + { + "name": "quantityLimit", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionQuantityLimit", + "displayName": "QuantityLimit" + } + ], + "doc": "Quantity limit." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfProductPriceOptionsOneOf", + "members": [ + "dynamicPriceOptions", + "fixedPriceOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionProductCheckboxGroup", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field." + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionProductCheckboxGroupOption", + "displayName": "ProductCheckboxGroupOption" + } + ] + } + } + ], + "doc": "List of options to select from." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionProductCheckboxGroupOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations." + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Media item. Media, associated with option, like image." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Selectable option value, which is saved to DB. Corresponds to product id, found in field's products list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionProductPriceOptionsOneOf", + "members": [ + { + "name": "dynamicPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDynamicPriceOptions", + "displayName": "DynamicPriceOptions" + } + ], + "doc": "Dynamic price options." + }, + { + "name": "fixedPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFixedPriceOptions", + "displayName": "FixedPriceOptions" + } + ], + "doc": "Fixed price options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPropertiesType", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionArrayType", + "displayName": "ArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the property is required." + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "String type validation for property." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPropertiesTypePropertiesTypeOneOf", + "members": [ + "array", + "boolean", + "integer", + "number", + "string" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionPropertiesTypePropertiesTypeOneOf", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionArrayType", + "displayName": "ArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "String type validation for property." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionQuantityLimit", + "members": [ + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum quantity." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum quantity." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionQuerySubmissionRequest", + "members": [ + { + "name": "onlyYourOwn", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + }, + { + "name": "query", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorQuery", + "displayName": "CursorQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionQuerySubmissionResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorPagingMetadata", + "displayName": "CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ] + } + } + ], + "doc": "The retrieved submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionQuerySubmissionsByNamespaceForExportRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorQuery", + "displayName": "CursorQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionQuerySubmissionsByNamespaceForExportResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorPagingMetadata", + "displayName": "CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ] + } + } + ], + "doc": "The retrieved Submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionQuerySubmissionsByNamespaceRequest", + "members": [ + { + "name": "onlyYourOwn", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + }, + { + "name": "query", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorQuery", + "displayName": "CursorQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionQuerySubmissionsByNamespaceResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCursorPagingMetadata", + "displayName": "CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ] + } + } + ], + "doc": "The retrieved Submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRadioGroup", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRadioGroupCustomOption", + "displayName": "RadioGroupCustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRadioGroupOption", + "displayName": "RadioGroupOption" + } + ] + } + } + ], + "doc": "Flag identifying to show option allowing input custom value\nList of options to select from" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRadioGroupCustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRadioGroupOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRedirect", + "members": [ + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "How should url be opened" + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Url to which UoU should be redirected after successful submit of form" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRel", + "members": [ + { + "name": "nofollow", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates to search engine crawlers not to follow the link." + }, + { + "name": "noreferrer", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates that this link protect referral information from being passed to the target website." + }, + { + "name": "sponsored", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement." + }, + { + "name": "ugc", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRemoveSubmissionFromTrashBinRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the submission to restore." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRemoveSubmissionFromTrashBinResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRemovedSubmissionFromTrash", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Removed submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionReschedule", + "members": [ + { + "name": "executeAt", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "" + }, + { + "name": "payload", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRestoreSubmissionFromTrashBinRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the submission to restore." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRestoreSubmissionFromTrashBinResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The restored submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRichContent", + "members": [ + { + "name": "documentStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDocumentStyle", + "displayName": "DocumentStyle" + } + ], + "doc": "Global styling for header, paragraph, block quote, and code block nodes in the object." + }, + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMetadata", + "displayName": "Metadata" + } + ], + "doc": "Object metadata." + }, + { + "name": "nodes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNode", + "displayName": "Node" + } + ] + } + } + ], + "doc": "Node objects representing a rich content document." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionRichText", + "members": [ + { + "name": "content", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Content of the rich text field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSection", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the section" + }, + { + "name": "allowedFieldIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "A list of field identifiers that are permitted to be placed within a section.\nThe section will only accept fields with IDs specified in this list.\nIf the section encounters the $new key within the list,\nit allows the inclusion of fields not explicitly listed,\nenabling dynamic addition of new fields." + }, + { + "name": "row", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Horizontal coordinate in the grid." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSettings", + "members": [ + { + "name": "permissions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPermissions", + "displayName": "Permissions" + } + ], + "doc": "Permissions settings for voting." + }, + { + "name": "showVoters", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether voters are displayed in the vote results." + }, + { + "name": "showVotesCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the vote count is displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSpoiler", + "members": [ + { + "name": "buttonText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text for the button used to remove the spoiler cover." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The description displayed on top of the spoiler cover." + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the spoiler cover is enabled for this node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionStep", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Step ID." + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Is step hidden" + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormLayout", + "displayName": "FormLayout" + } + ], + "doc": "Form step properties" + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the step." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionString", + "members": [ + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the string input field" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeInput", + "displayName": "DateTimeInput" + } + ], + "doc": "Field for selecting date and/or time" + }, + { + "name": "dropdownOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDropdown", + "displayName": "Dropdown" + } + ], + "doc": "Selection field as drop down" + }, + { + "name": "radioGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRadioGroup", + "displayName": "RadioGroup" + } + ], + "doc": "Selection field as radio group" + }, + { + "name": "textInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextInput", + "displayName": "TextInput" + } + ], + "doc": "Text input field" + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionInputFieldStringType", + "displayName": "InputFieldStringType" + } + ], + "doc": "Validation of field output value." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfStringComponentTypeOptionsOneOf", + "members": [ + "dateTimeOptions", + "dropdownOptions", + "radioGroupOptions", + "textInputOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionStringComponentTypeOptionsOneOf", + "members": [ + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeInput", + "displayName": "DateTimeInput" + } + ], + "doc": "Field for selecting date and/or time" + }, + { + "name": "dropdownOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDropdown", + "displayName": "Dropdown" + } + ], + "doc": "Selection field as drop down" + }, + { + "name": "radioGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRadioGroup", + "displayName": "RadioGroup" + } + ], + "doc": "Selection field as radio group" + }, + { + "name": "textInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTextInput", + "displayName": "TextInput" + } + ], + "doc": "Text input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionStringErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionStringType", + "members": [ + { + "name": "dateOptionalTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE_OPTIONAL_TIME format options" + }, + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE format options" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE_TIME format options" + }, + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStringErrorMessages", + "displayName": "StringErrorMessages" + } + ], + "doc": "Custom error messages when validation fails." + }, + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of a string." + }, + { + "name": "maxLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum length." + }, + { + "name": "minLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum length." + }, + { + "name": "pattern", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pattern for a regular expression match." + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "TIME format options" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfStringTypeFormatOptionsOneOf", + "members": [ + "dateOptionalTimeOptions", + "dateOptions", + "dateTimeOptions", + "timeOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionStringTypeFormatOptionsOneOf", + "members": [ + { + "name": "dateOptionalTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE_OPTIONAL_TIME format options" + }, + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE format options" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "DATE_TIME format options" + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDateTimeConstraints", + "displayName": "DateTimeConstraints" + } + ], + "doc": "TIME format options" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionStyles", + "members": [ + { + "name": "border", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBorder", + "displayName": "Border" + } + ], + "doc": "Border attributes." + }, + { + "name": "colors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionColors", + "displayName": "Colors" + } + ], + "doc": "Color attributes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionContactMapped", + "members": [ + { + "name": "contactId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Mapped upserted contact ID." + }, + { + "name": "emails", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Mapped contact emails." + }, + { + "name": "namespace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the namespace that the submission's form belongs to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionContactMappedEvent", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmissionContactMapped", + "displayName": "SubmissionContactMapped" + } + ], + "doc": "Event data." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionContactMappingSkipped", + "members": [ + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form Id." + }, + { + "name": "namespace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the namespace that the submission's form belongs to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionContactMappingSkippedEvent", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmissionContactMappingSkipped", + "displayName": "SubmissionContactMappingSkipped" + } + ], + "doc": "Event data." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionCreated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Information about the created submission." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionDeleted", + "members": [ + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionRemovedSubmissionFromTrash", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRemovedSubmissionFromTrash", + "displayName": "RemovedSubmissionFromTrash" + } + ], + "doc": "Event data." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionStatusUpdated", + "members": [ + { + "name": "data", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmissionStatusUpdatedEvent", + "displayName": "FormSubmissionStatusUpdatedEvent" + } + ], + "doc": "Event data." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmissionUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Information about the updated submission." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmitButton", + "members": [ + { + "name": "nextText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "When button is not on last page it behaves as switch between pages page, text of label to go to next page." + }, + { + "name": "previousText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "When button is not on last page it behaves as switch between pages page, text of label to go to previous page." + }, + { + "name": "redirect", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRedirect", + "displayName": "Redirect" + } + ], + "doc": "Submit action effect is to redirect to" + }, + { + "name": "submitText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text on the button when button is submitting a form" + }, + { + "name": "thankYouMessage", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionThankYouMessage", + "displayName": "ThankYouMessage" + } + ], + "doc": "Submit action effect is to show message" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSubmitButtonSubmitActionOneOf", + "members": [ + "redirect", + "thankYouMessage" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmitButtonSubmitActionOneOf", + "members": [ + { + "name": "redirect", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRedirect", + "displayName": "Redirect" + } + ], + "doc": "Submit action effect is to redirect to" + }, + { + "name": "thankYouMessage", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionThankYouMessage", + "displayName": "ThankYouMessage" + } + ], + "doc": "Submit action effect is to show message" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmitContactResponse", + "members": [ + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the contact that was found or created." + }, + { + "name": "identityType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identity type of the returned contact.\n\n- `CONTACT`: The returned contact ID belongs to a new or existing contact.\n- `MEMBER`: The returned contact ID belongs to the currently logged-in site member.\n- `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.\n" + }, + { + "name": "newContact", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates whether the contact was just created or already existed.\n\nIf the contact was just created, returns `true`.\nIf it already existed, returns `false`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmitter", + "members": [ + { + "name": "applicationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Application ID." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID." + }, + { + "name": "visitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Visitor ID." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSubmitterSubmitterOneOf", + "members": [ + "applicationId", + "memberId", + "userId", + "visitorId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionSubmitterSubmitterOneOf", + "members": [ + { + "name": "applicationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Application ID." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "User ID." + }, + { + "name": "visitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Visitor ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTableCellData", + "members": [ + { + "name": "borderColors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBorderColors", + "displayName": "BorderColors" + } + ], + "doc": "The cell's border colors." + }, + { + "name": "cellStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCellStyle", + "displayName": "CellStyle" + } + ], + "doc": "Styling for the cell's background color and text alignment." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTableData", + "members": [ + { + "name": "columnHeader", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the table's first column is a header." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the table's container." + }, + { + "name": "dimensions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDimensions", + "displayName": "Dimensions" + } + ], + "doc": "The table's dimensions." + }, + { + "name": "header", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Deprecated: Use `rowHeader` and `columnHeader` instead." + }, + { + "name": "rowHeader", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the table's first row is a header." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTask", + "members": [ + { + "name": "executeAt", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "" + }, + { + "name": "key", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionTaskKey", + "displayName": "TaskKey" + } + ], + "doc": "" + }, + { + "name": "payload", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTaskAction", + "members": [ + { + "name": "cancel", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCancel", + "displayName": "Cancel" + } + ], + "doc": "" + }, + { + "name": "complete", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionComplete", + "displayName": "Complete" + } + ], + "doc": "" + }, + { + "name": "reschedule", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionReschedule", + "displayName": "Reschedule" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfTaskActionActionOneOf", + "members": [ + "cancel", + "complete", + "reschedule" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTaskActionActionOneOf", + "members": [ + { + "name": "cancel", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionCancel", + "displayName": "Cancel" + } + ], + "doc": "" + }, + { + "name": "complete", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionComplete", + "displayName": "Complete" + } + ], + "doc": "" + }, + { + "name": "reschedule", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionReschedule", + "displayName": "Reschedule" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTaskKey", + "members": [ + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "subjectId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTextData", + "members": [ + { + "name": "decorations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDecoration", + "displayName": "Decoration" + } + ] + } + } + ], + "doc": "The decorations to apply." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text to apply decorations to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTextInput", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder for the value input" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTextNodeStyle", + "members": [ + { + "name": "decorations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionDecoration", + "displayName": "Decoration" + } + ] + } + } + ], + "doc": "The decorations to apply to the node." + }, + { + "name": "lineHeight", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Line height for text in the node." + }, + { + "name": "nodeStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNodeStyle", + "displayName": "NodeStyle" + } + ], + "doc": "Padding and background color for the node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTextStyle", + "members": [ + { + "name": "lineHeight", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A CSS `line-height` value for the text as a unitless ratio." + }, + { + "name": "textAlignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text alignment. Defaults to `AUTO`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionThankYouMessage", + "members": [ + { + "name": "duration", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Duration after how much second it should disappear. If 0, will stay forever.\nDefault: false" + }, + { + "name": "text", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionRichContent", + "displayName": "RichContent" + } + ], + "doc": "Message show after form submission" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionThumbnails", + "members": [ + { + "name": "placement", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Thumbnail alignment." + }, + { + "name": "spacing", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Spacing between thumbnails in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionTimeOptions", + "members": [ + { + "name": "use24HourFormat", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag indicating whether to use the 24-hour time format.\nDefault: false." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionUpdateSubmissionRequest", + "members": [ + { + "name": "submission", + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "Submission to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionUpdateSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormSubmission", + "displayName": "FormSubmission" + } + ], + "doc": "The updated submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionUpsertContact", + "members": [ + { + "name": "fieldsMapping", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFormFieldContactInfo", + "displayName": "FormFieldContactInfo" + } + ] + } + } + ], + "doc": "Fields mapping (target field mapped to corresponding contact field)." + }, + { + "name": "labels", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of contact label keys.\n[Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)\nhelp categorize contacts." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionUpsertContactFromSubmissionRequest", + "members": [ + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional contact id to which submission should be mapped." + }, + { + "name": "emailVerified", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates contact has verified primary email." + }, + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Submission from which contact needs to be upserted." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionUpsertContactFromSubmissionResponse", + "members": [ + { + "name": "submitContactResponse", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionSubmitContactResponse", + "displayName": "SubmitContactResponse" + } + ], + "doc": "Submit contact response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionValidation", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionArrayType", + "displayName": "ArrayType" + } + ], + "doc": "Validation of array type." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Validation of boolean type." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Validation of integer type." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Validation of number type." + }, + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionObjectType", + "displayName": "ObjectType" + } + ], + "doc": "Validation of object type." + }, + { + "name": "predefined", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPredefinedValidation", + "displayName": "PredefinedValidation" + } + ], + "doc": "Predefined validation of specific format" + }, + { + "name": "required", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Indicates contact has verified primary email." + "doc": "Whether the field is required." }, { - "name": "submissionId", + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "Validation of string type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfValidationValidationOneOf", + "members": [ + "array", + "boolean", + "integer", + "number", + "object", + "predefined", + "string" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionValidationValidationOneOf", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionArrayType", + "displayName": "ArrayType" + } + ], + "doc": "Validation of array type." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionBooleanType", + "displayName": "BooleanType" + } + ], + "doc": "Validation of boolean type." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionIntegerType", + "displayName": "IntegerType" + } + ], + "doc": "Validation of integer type." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionNumberType", + "displayName": "NumberType" + } + ], + "doc": "Validation of number type." + }, + { + "name": "object", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionObjectType", + "displayName": "ObjectType" + } + ], + "doc": "Validation of object type." + }, + { + "name": "predefined", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPredefinedValidation", + "displayName": "PredefinedValidation" + } + ], + "doc": "Predefined validation of specific format" + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionStringType", + "displayName": "StringType" + } + ], + "doc": "Validation of string type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionVideo", + "members": [ + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Video file details." + }, + { + "name": "thumbnail", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Video thumbnail file details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionVideoData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPluginContainerData", + "displayName": "PluginContainerData" + } + ], + "doc": "Styling for the video's container." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the video's download button is disabled." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionPlaybackOptions", + "displayName": "PlaybackOptions" + } + ], + "doc": "Video options." + }, + { + "name": "thumbnail", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Video thumbnail details." + }, + { + "name": "title", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Submission from which contact needs to be upserted." + "doc": "Video title." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionMedia", + "displayName": "Media" + } + ], + "doc": "Video details." } ], "docs": { @@ -2157,18 +27829,60 @@ } }, { - "name": "wixVeloEventsUpsertContactFromSubmissionResponse", + "name": "formsV4SubmissionWixFile", "members": [ { - "name": "submitContactResponse", + "name": "componentType", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Events.wixVeloEventsSubmitContactResponse", - "displayName": "SubmitContactResponse" + "nativeType": "string" } ], - "doc": "Submit contact response." + "doc": "Component type of the array input field" + }, + { + "name": "fileUploadOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFileUpload", + "displayName": "FileUpload" + } + ], + "doc": "File upload input field" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfWixFileComponentTypeOptionsOneOf", + "members": [ + "fileUploadOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "formsV4SubmissionWixFileComponentTypeOptionsOneOf", + "members": [ + { + "name": "fileUploadOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Events.formsV4SubmissionFileUpload", + "displayName": "FileUpload" + } + ], + "doc": "File upload input field" } ], "docs": { diff --git a/wix-forms-v2/wix-forms-v2/Events/guides/events-intro.md b/wix-forms-v2/wix-forms-v2/Events/guides/events-intro.md index b4b0a2829f..5c54b6d5d2 100644 --- a/wix-forms-v2/wix-forms-v2/Events/guides/events-intro.md +++ b/wix-forms-v2/wix-forms-v2/Events/guides/events-intro.md @@ -4,16 +4,6 @@ title: Introduction # Introduction -  - -
- Developer Preview -
- APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.
-
- -  - Wix Forms events are fired in your site's backend when certain events related to forms occur in your site's backend. You can write event handlers that react to these events. Event handler functions receive data that corresponds to the event that has occurred. Use event handlers to create custom responses to forms events. > **Note:** Backend events don't work when previewing your site. diff --git a/wix-forms-v2/wix-forms-v2/Submissions.service.json b/wix-forms-v2/wix-forms-v2/Submissions.service.json index 4850f8dd89..f3731bfbf3 100644 --- a/wix-forms-v2/wix-forms-v2/Submissions.service.json +++ b/wix-forms-v2/wix-forms-v2/Submissions.service.json @@ -26,7 +26,7 @@ } } ], - "doc": "Submission IDs to mark as seen.", + "doc": "IDs of submissions to mark as seen.", "required": true }, { @@ -36,7 +36,7 @@ "nativeType": "string" } ], - "doc": "ID of the form which the submissions belongs to.", + "doc": "ID of the form which the submissions belong to.", "required": true } ], @@ -60,35 +60,69 @@ "doc": null }, "docs": { - "summary": "Marks form submissions as seen by site collaborators with manage submission permissions.", - "description": [], + "summary": "Marks form submissions as \"seen\".\n> **Note**:\n> The Submissions API is only available in Wix Studio and Editor X.", + "description": [ + "This function marks the submissions as if they were seen by the site owner. Only site collaborators with the **[Manage Submission](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions)** permissions can mark submissions." + ], "examples": [ { - "title": "bulkMarkSubmissionsAsSeen example", + "title": "Bulk mark submissions as \"seen\" (dashboard page code)", + "body": [ + "import { submissions } from 'wix-forms.v2';", + "", + "/* ", + "Sample ids value: [\"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\", \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\"]", + "", + "Sample formID value: \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\"", + "*/", + "", + "export async function myBulkMarkSubmissionsFunction(ids, formId) {", + " try {", + " const markedSubmissions = await submissions.bulkMarkSubmissionsAsSeen(ids, formId);", + " console.log('Success! Marked submissions:', markedSubmissions);", + " return markedSubmissions;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */", + "" + ] + }, + { + "title": "Bulk mark submissions as \"seen\" (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function bulkMarkSubmissionsAsSeen(ids, formId) {", - " try {", - " const result = await submissions.bulkMarkSubmissionsAsSeen(ids, formId);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "/* ", + "Sample ids value: [\"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\", \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\"]", + "", + "Sample formID value: \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\"", + "*/", + "", + "export const myBulkMarkSubmissionsFunction = webMethod(Permissions.Anyone, async (ids, formId) => {", + " try {", + " const elevatedBulkMarkSubmissions = elevate(submissions.bulkMarkSubmissionsAsSeen);", + " const markedSubmissions = await elevatedBulkMarkSubmissions(ids, formId);", + " console.log('Success! Marked submissions:', markedSubmissions);", + " return markedSubmissions;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to void */", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "bulkMarkSubmissionsAsSeen", "isAdminMethod": true }, @@ -125,37 +159,101 @@ "doc": null }, "docs": { - "summary": "Confirms a submission.", + "summary": "Confirms a submission.\n> **Note**:\n> The Submissions API is only available in Wix Studio and Editor X.", "description": [ - "You can only confirm a submission that has a `PENDING` status. The default status when a submission is created is `CONFIRMED`. You can change the default status for individual submissions using the `createSubmission()` or `updateSubmission()` methods.\n\nThis function is not a universal function and runs only on the backend." + "You can only confirm a submission that has a `PENDING` status.\nWhen using forms from the [Wix Pricing Plans](https://www.wix.com/app-market/paid-plans?referral=collection&appIndex=42&referralTag=made-by-wix&referralSectionName=made-by-wix) app, the default submission status is `PENDING`.\nWhen using forms from the [Wix Forms]() app, the default form submission status is `CONFIRMED`. You can change the default status for individual submissions using the `updateSubmission()` method." ], "examples": [ { - "title": "confirmSubmission example", + "title": "Confirm a submission (dashboard page code)", + "body": [ + "import { submissions } from 'wix-forms.v2';", + "", + "/*", + "Sample submissionId value: \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\"", + "*/", + "", + "export async function myConfirmSubmissionFunction(submissionId) {", + " try {", + " const submission = await submissions.confirmSubmission(submissionId);", + " console.log('Success! Confirmed submission:', submission);", + " return submission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"McBride\",", + " \"first_name\": \"Patsy\"", + " },", + " \"revision\": \"4\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": true,", + " \"_id\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"_createdDate\": \"2023-12-28T12:55:55.630Z\",", + " \"_updatedDate\": \"2023-12-28T13:42:24.853Z\"", + "}", + "*/" + ] + }, + { + "title": "Confirm a submission (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function confirmSubmission(submissionId) {", - " try {", - " const result = await submissions.confirmSubmission(submissionId);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "/*", + "Sample submissionId value: \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\"", + "*/", + "", + "export const myConfirmSubmissionFunction = webMethod(Permissions.Anyone, async (submissionId) => {", + " try {", + " const elevatedConfirmSubmission = elevate(submissions.confirmSubmission);", + " const submission = await elevatedConfirmSubmission(submissionId);", + " console.log('Success! Confirmed submission:', submission);", + " return submission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"McBride\",", + " \"first_name\": \"Patsy\"", + " },", + " \"revision\": \"4\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": true,", + " \"_id\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"_createdDate\": \"2023-12-28T12:55:55.630Z\",", + " \"_updatedDate\": \"2023-12-28T13:42:24.853Z\"", + "}", + "", + "*/", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "confirmSubmission", "isAdminMethod": true }, @@ -176,7 +274,7 @@ } } ], - "doc": "Form IDs.", + "doc": "Form IDs which submissions should be counted.", "required": true }, { @@ -186,8 +284,18 @@ "nativeType": "string" } ], - "doc": "Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint.", + "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `getSubmission()` to retrieve the namespace.", "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CountSubmissionsOptions" + } + ], + "doc": "", + "required": false } ], "requiredFields": [ @@ -210,35 +318,77 @@ "doc": null }, "docs": { - "summary": "Counts the number of submissions belonging to the specified forms.", - "description": [], + "summary": "Counts the number of submissions belonging to the specified forms.\n> **Note**:\n> The Submissions API is only available in Wix Studio and Editor X.", + "description": [ + "The `countSubmissions()` function is useful for analytics and tracking purposes. For example, if you have a contact form on your website, you can use this function to track how many submissions it receives daily, weekly, or monthly." + ], "examples": [ { - "title": "countSubmissions example", + "title": "Count submissions (dashboard page code)", + "body": [ + "import { submissions } from 'wix-forms.v2';", + "", + "/* ", + "Sample formIds value: [\"21bcb6c7-02b3-4ed1-b6db-7856094fac03\"]", + "Sample namespace value: \"wix.form_app.form\"", + "*/", + "", + "export async function myCountSubmissionsFunction(formIds, namespace) {", + " try {", + " const formsSubmissionsCount = await submissions.countSubmissions(formIds, namespace);", + " console.log('Success! Forms submissions count:', formsSubmissionsCount);", + " return formsSubmissionsCount;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"totalCount\": 4,", + " \"unseenCount\": 2", + "}", + "*/" + ] + }, + { + "title": "Count submissions (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function countSubmissions(formIds, namespace) {", - " try {", - " const result = await submissions.countSubmissions(formIds, namespace);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "/* ", + "Sample formIds value: [\"21bcb6c7-02b3-4ed1-b6db-7856094fac03\"]", + "Sample namespace value: \"wix.form_app.form\"", + "*/", + "", + "export const myCountSubmissionsFunction = webMethod(Permissions.Anyone, async (formIds, namespace) => {", + " try {", + " const elevatedCountSubmissions = elevate(submissions.countSubmissions);", + " const formsSubmissionsCount = await elevatedCountSubmissions(formIds, namespace);", + " console.log('Success! Forms submissions count:', formsSubmissionsCount);", + " return formsSubmissionsCount;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"totalCount\": 4,", + " \"unseenCount\": 2", + "}", + "*/" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "countSubmissions", "isAdminMethod": true }, @@ -262,7 +412,7 @@ "referenceType": "wix-forms-v2.Submissions.CreateSubmissionOptions" } ], - "doc": "", + "doc": "Optional fields.\n", "required": false } ], @@ -286,35 +436,198 @@ "doc": null }, "docs": { - "summary": "Creates a new submission.", - "description": [], + "summary": "Creates a submission.\n> **Note**:\n> The Submissions API is only available in Wix Studio and Editor X.", + "description": [ + "The `createSubmission()` function is an alternative way to the [`WixFormsV2`](https://www.wix.com/velo/reference/$w/wixformsv2/submit) element for submitting a form. In this case, clicking the submit button is unnecessary, the submission is automatically created when calling this function." + ], "examples": [ { - "title": "createSubmission example", + "title": "Create a submission ", + "body": [ + "import { submissions } from 'wix-forms.v2';", + "", + "/* Sample submission value:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"seen\": false,", + " \"status\": \"PENDING\",", + " \"submissions\": {", + " \"first_name\": \"Patsy\",", + " \"last_name\": \"McBride\"", + " }", + "}", + "*/", + "", + "export async function myCreateSubmissionFunction(submission, options) {", + " try {", + " const createdSubmission = await submissions.createSubmission(submission, options);", + " console.log('Success! Created submission:', createdSubmission);", + " return createdSubmission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + "{", + " \"submission\": {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"PENDING\",", + " \"submissions\": {", + " \"first_name\": \"Patsy\",", + " \"last_name\": \"McBride\"", + " },", + " \"revision\": \"1\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"_createdDate\": \"2023-12-28T12:55:55.630Z\",", + " \"_updatedDate\": \"2023-12-28T12:55:55.746Z\"", + " }", + "}", + "*/" + ] + }, + { + "title": "Create a submission (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { submissions } from 'wix-forms.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample submission value:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"seen\": false,", + " \"status\": \"PENDING\",", + " \"submissions\": {", + " \"first_name\": \"Patsy\",", + " \"last_name\": \"McBride\"", + " }", + "}", + "*/", + "", + "export const myCreateSubmissionFunction = webMethod(Permissions.Anyone, async (submission, options) => {", + " try {", + " const elevatedCreateSubmission = elevate(submissions.createSubmission);", + " const createdSubmission = await elevatedCreateSubmission(submission, options);", + " console.log('Success! Created submission:', createdSubmission);", + " return createdSubmission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + "{", + " \"submission\": {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"PENDING\",", + " \"submissions\": {", + " \"first_name\": \"Patsy\",", + " \"last_name\": \"McBride\"", + " },", + " \"revision\": \"1\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"_createdDate\": \"2023-12-28T12:55:55.630Z\",", + " \"_updatedDate\": \"2023-12-28T12:55:55.746Z\"", + " }", + "}", + "*/", + "" + ] + }, + { + "title": "Create a submission with a media file ", "body": [ + "/**************************************", + " * Backend code - my-backend-file.web.js *", + " *************************************/", + "", + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function createSubmission(submission, options) {", - " try {", - " const result = await submissions.createSubmission(submission, options);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "// Get a URL for uploading a media file", + "", + "export const myGetMediaUploadUrlFunction = webMethod(Permissions.Anyone, async (formId, filename, mimeType) => {", + " try {", + " const elevatedGetMediaUploadUrl = elevate(submissions.getMediaUploadUrl);", + " const uploadUrl = await elevatedGetMediaUploadUrl(formId, filename, mimeType);", + " return uploadUrl;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "// Create a submission", + "", + "export const myCreateSubmissionFunction = webMethod(Permissions.Anyone, async (submission, options) => {", + " try {", + " const elevatedCreateSubmission = elevate(submissions.createSubmission);", + " const createdSubmission = await elevatedCreateSubmission(submission, options);", + " return createdSubmission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/*************", + " * Page code *", + " ************/", + "", + "import { myCreateSubmissionFunction, myGetMediaUploadUrlFunction } from 'backend/my-backend-file.web';", + "", + "const submission = {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"seen\": false,", + " \"revision\": \"6\",", + " \"submissions\": {", + " \"first_name\": \"Jane\",", + " \"last_name\": \"McBride\",", + " \"file_upload_7a7f\": \"\"", + " }", + "}", + "", + "const formId = \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\"", + "", + "const filename = \"photo.jpg\"", + "", + "const mimeType = \"image/jpg\"", + "", + "$w.onReady(() => {", + "", + " myGetMediaUploadUrlFunction(formId, filename, mimeType).then((result) => {", + " submission.submissions.file_upload_7a7f = result.uploadUrl // push the URL into the submissions object", + " });", + "", + " /* ", + " Upload a media file to the generated URL by following the ", + " information written in the Upload API (https://www.wix.com/velo/reference/wix-media-v2/upload-api) article. ", + " */", + "", + " myCreateSubmissionFunction(submission).then((result) => {", + " console.log('Success! Created submission:', result);", + " });", + "", + "});" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "createSubmission" }, { @@ -329,6 +642,16 @@ ], "doc": "ID of the submission to delete.", "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DeleteSubmissionOptions" + } + ], + "doc": "Optional fields.", + "required": false } ], "requiredFields": [ @@ -350,35 +673,64 @@ "doc": null }, "docs": { - "summary": "Deletes a submission by ID.", - "description": [], + "summary": "Deletes a submission.\n> **Note:**\n> The Submissions API is only available in Wix Studio and Editor X.", + "description": [ + "This function moves the form submission into the trash bin. To delete the submission permanently, change the default `permanent` field value to `true.`" + ], "examples": [ { - "title": "deleteSubmission example", + "title": "Delete a submission (dashboard page code) ", + "body": [ + "import { submissions } from 'wix-forms.v2';", + "", + "/*", + "Sample submissionId value: \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\"", + "*/", + "", + "export async function myDeleteSubmissionFunction(submissionId) {", + " try {", + " const deletedSubmission = await submissions.deleteSubmission(submissionId);", + " console.log('Success! Submission is deleted');", + " return deletedSubmission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */" + ] + }, + { + "title": "Delete a submission (export from backend code) ", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function deleteSubmission(submissionId) {", - " try {", - " const result = await submissions.deleteSubmission(submissionId);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "/*", + "Sample submissionId value: \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\"", + "*/", + "", + "export const myDeleteSubmissionFunction = webMethod(Permissions.Anyone, async (submissionId) => {", + " try {", + " const elevatedDeleteSubmission = elevate(submissions.deleteSubmission);", + " const deletedSubmission = await elevatedDeleteSubmission(submissionId);", + " console.log('Success! Submission is deleted');", + " return deletedSubmission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to void */", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "deleteSubmission", "isAdminMethod": true }, @@ -437,35 +789,78 @@ "doc": null }, "docs": { - "summary": "Retrieves a URL, generated by Media Manager, to use when creating a submission with a field for uploading files.", - "description": [], + "summary": "Retrieves a URL generated by the [Media Manager](https://www.wix.com/velo/reference/wix-media-v2/files/generatefileuploadurl) to use when creating a submission that includes a field for uploading files.\n> **Notes:**\n> - The Submissions API is only available in Wix Studio and Editor X.\n> - You need at least a [Standard Premium](https://support.wix.com/en/article/choosing-a-premium-plan) plan for your site to upload files.", + "description": [ + "To learn how external clients can use the generated upload URL to upload a file to the Media Manager, see [Upload API](https://www.wix.com/velo/reference/wix-media-v2/files/upload-api)." + ], "examples": [ { - "title": "getMediaUploadUrl example", + "title": "Get media upload URL ", + "body": [ + "import { submissions } from 'wix-forms.v2';", + "", + "/* ", + "Sample formID value: \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\"", + "Sample filename value: \"cats.mp4\"", + "Sample mimeType value: \"video/mp4\"", + "*/", + "", + "export async function myGetMediaUploadUrlFunction(formId, filename, mimeType) {", + " try {", + " const uploadUrl = await submissions.getMediaUploadUrl(formId, filename, mimeType);", + " console.log('Success! Upload URL:', uploadUrl);", + " return uploadUrl;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + "{", + " \"uploadUrl\": \"https://upload.wixmp.com/upload/eyJhbGciOiJfdddcCI6IkpXVCJ9.eyJqdGkiOiIqweFkM2NiMi0zYzQ4LTRjNDQtODBkNi0yYmEwMTUwZDM0OTEiLCJhdWQiOiJ1cm46c2VydmljZTp1cGxvYWQiLCJpc3MiOiJ1cm46c2VydmljZTp1c3NzY2OWZmMGQwNzRkN2YyLXN0YWdlIiwicGF0aCI6IjkzYTE5ZjZkLTkwZjUtNGFkZi04ZTEwLTk4Zj2UvZWZkYTdlZTYtZDFlZi00NzZjLWJmOTItZTYwNmEwYWMzNGQ0LXNjcmVlbi5wbmciLCJjYWxsYmFja1VybCI6Imh0dHBzOi8vd2l4bXAtMTY4YWExOTc3NzY2OWZmMGQwNzRkN2YyLmFwcHNwb3QuY29tL19hcGkvdjMvdXBsb2FkL2NhbGxiYWNrP3VwbG9hZFRva2VuPWV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpwYzNNaU9pSjFjbTQ2YzJWeWRtbGpaVHBtYVd4bExuVndiRzloWkNJc0ltRjFaQ0k2SW5WeWJqcHpaWEoyYVdObE9tWnBiR1V1ZFhCc2IyRmtJaXdpYzNWaUlqb2lkWsafdEp1T21Gd2NEbzNZVEk1TVdZek5ERmpaamswT1RrMU9UUmlNRFpsTjJVM09EbG1PV1ppTlNJc0ltbGhkQ0k2TVRZNE5qZ3hOREUwTWl3aVpYaHdJam94TmpnMk9EVTNNelF5TENKcWRHa2lPaUprTkRBMVlUQmpZekV3bkIwYUNJNklpODVNMkV4T1dZMlpDMDVNR1kxTFRSaFpHWXRPR1V4TUMwNU9HWTFZelZsT0RNeE5USXZOemt3WWpFNFpHUXRaV1UyTmkwME9EQmlMV0V4TTJRdE5qbGxZbUl3WXpKbE1qTmxMMlZtWkdFM1pXVTJMV1F4WldZdE5EYzJZeTFpWmpreUxXVTJNRFpoTUdGak16UmtOQzF6WTNKbFpXNHVjRzVuSWl3aVlXTnNJam9pY0hWaWJHbGpJaXdpYkdaaklqcDdJbUZuWlNJNk1qVTVNakF3TUN3aVlXTjBdfdhVzl1SWpvaVpXUWlPaUprWld4bGRHVXRNalU1TWpBd01DSjlMQ0pqYkdJaU9tNTFiR3g5Li1qdkg3VkN4U2N6UXZpM3U2MVJmSTg3WUY3YllKRGdlNWZqc21ZMk9WSEUiLCJhY2wiOiJwdWJsaWMiLCJtaW1lVHlwZSI6ImltYWdlL3BuZyJ9.z0G6bPu_K1qdoj9EK-6Lo_ZEpd2jTihSp6LEPBVqiXw\"", + "}", + "", + "*/" + ] + }, + { + "title": "Get media upload URL (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function getMediaUploadUrl(formId, filename, mimeType) {", - " try {", - " const result = await submissions.getMediaUploadUrl(formId, filename, mimeType);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "/* ", + "Sample formID value: \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\"", + "Sample filename value: \"cats.mp4\"", + "Sample mimeType value: \"video/mp4\"", + "*/", + "", + "export const myGetMediaUploadUrlFunction = webMethod(Permissions.Anyone, async (formId, filename, mimeType) => {", + " try {", + " const elevatedGetMediaUploadUrl = elevate(submissions.getMediaUploadUrl);", + " const uploadUrl = await elevatedGetMediaUploadUrl(formId, filename, mimeType);", + " console.log('Success! Upload URL:', uploadUrl);", + " return uploadUrl;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + "{", + " \"uploadUrl\": \"https://upload.wixmp.com/upload/eyJhbGciOiJfdddcCI6IkpXVCJ9.eyJqdGkiOiIqweFkM2NiMi0zYzQ4LTRjNDQtODBkNi0yYmEwMTUwZDM0OTEiLCJhdWQiOiJ1cm46c2VydmljZTp1cGxvYWQiLCJpc3MiOiJ1cm46c2VydmljZTp1c3NzY2OWZmMGQwNzRkN2YyLXN0YWdlIiwicGF0aCI6IjkzYTE5ZjZkLTkwZjUtNGFkZi04ZTEwLTk4Zj2UvZWZkYTdlZTYtZDFlZi00NzZjLWJmOTItZTYwNmEwYWMzNGQ0LXNjcmVlbi5wbmciLCJjYWxsYmFja1VybCI6Imh0dHBzOi8vd2l4bXAtMTY4YWExOTc3NzY2OWZmMGQwNzRkN2YyLmFwcHNwb3QuY29tL19hcGkvdjMvdXBsb2FkL2NhbGxiYWNrP3VwbG9hZFRva2VuPWV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpwYzNNaU9pSjFjbTQ2YzJWeWRtbGpaVHBtYVd4bExuVndiRzloWkNJc0ltRjFaQ0k2SW5WeWJqcHpaWEoyYVdObE9tWnBiR1V1ZFhCc2IyRmtJaXdpYzNWaUlqb2lkWsafdEp1T21Gd2NEbzNZVEk1TVdZek5ERmpaamswT1RrMU9UUmlNRFpsTjJVM09EbG1PV1ppTlNJc0ltbGhkQ0k2TVRZNE5qZ3hOREUwTWl3aVpYaHdJam94TmpnMk9EVTNNelF5TENKcWRHa2lPaUprTkRBMVlUQmpZekV3bkIwYUNJNklpODVNMkV4T1dZMlpDMDVNR1kxTFRSaFpHWXRPR1V4TUMwNU9HWTFZelZsT0RNeE5USXZOemt3WWpFNFpHUXRaV1UyTmkwME9EQmlMV0V4TTJRdE5qbGxZbUl3WXpKbE1qTmxMMlZtWkdFM1pXVTJMV1F4WldZdE5EYzJZeTFpWmpreUxXVTJNRFpoTUdGak16UmtOQzF6WTNKbFpXNHVjRzVuSWl3aVlXTnNJam9pY0hWaWJHbGpJaXdpYkdaaklqcDdJbUZuWlNJNk1qVTVNakF3TUN3aVlXTjBdfdhVzl1SWpvaVpXUWlPaUprWld4bGRHVXRNalU1TWpBd01DSjlMQ0pqYkdJaU9tNTFiR3g5Li1qdkg3VkN4U2N6UXZpM3U2MVJmSTg3WUY3YllKRGdlNWZqc21ZMk9WSEUiLCJhY2wiOiJwdWJsaWMiLCJtaW1lVHlwZSI6ImltYWdlL3BuZyJ9.z0G6bPu_K1qdoj9EK-6Lo_ZEpd2jTihSp6LEPBVqiXw\"", + "}", + "", + "*/", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "getMediaUploadUrl" }, { @@ -492,44 +887,107 @@ "nativeType": "Promise", "typeParams": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "referenceType": "wix-forms-v2.Submissions.GetSubmissionResponse" } ] } } ], - "doc": "The retrieved submission.\n" + "doc": null }, "docs": { - "summary": "Retrieves a submission by ID.", + "summary": "Retrieves a submission by ID.\n> **Note:**\n> The Submissions API is only available in the Wix Studio editor and Editor X.", "description": [], "examples": [ { - "title": "getSubmission example", + "title": "Get a submission (dashboard page code)", + "body": [ + "import { submissions } from 'wix-forms.v2';", + "", + "/* ", + "Sample submissionId value: \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\"", + "*/", + "", + "export async function myGetSubmissionFunction(submissionId) {", + " try {", + " const submission = await submissions.getSubmission(submissionId);", + " console.log('Success! Submission:', submission);", + " return submission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"Doe\",", + " \"first_name\": \"John\"", + " },", + " \"revision\": \"4\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": true,", + " \"_id\": \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\",", + " \"_createdDate\": \"2023-12-28T12:54:04.652Z\",", + " \"_updatedDate\": \"2023-12-28T13:42:24.856Z\"", + "}", + "*/" + ] + }, + { + "title": "Get a submission (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function getSubmission(submissionId) {", - " try {", - " const result = await submissions.getSubmission(submissionId);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "/* ", + "Sample submissionId value: \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\"", + "*/", + "", + "export const myGetSubmissionFunction = webMethod(Permissions.Anyone, async (submissionId) => {", + " try {", + " const elevatedGetSubmission = elevate(submissions.getSubmission);", + " const submission = await elevatedGetSubmission(submissionId);", + " console.log('Success! Submission:', submission);", + " return submission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"Doe\",", + " \"first_name\": \"John\"", + " },", + " \"revision\": \"4\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": true,", + " \"_id\": \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\",", + " \"_createdDate\": \"2023-12-28T12:54:04.652Z\",", + " \"_updatedDate\": \"2023-12-28T13:42:24.856Z\"", + "}", + "*/", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "getSubmission", "isAdminMethod": true }, @@ -557,8 +1015,11 @@ "doc": null }, "docs": { - "summary": "Creates a query to retrieve a list of submissions. ", + "summary": "Creates a query to retrieve a list of submissions.", "description": [ + "> **Note:**", + "> The Submissions API is only available in Wix Studio and Editor X.", + "", "", "The `querySubmissionsByNamespace()` method builds a query to retrieve a list of submissions from the specified namespace and returns a [`SubmissionsQueryBuilder`](#submissionsquerybuilder) object. ", ">**Note:** You can only query submissions from a specified namespace. Use the query filter on the `namespace` field, otherwise you will receive an error.", @@ -572,37 +1033,136 @@ "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", - "|`_id`|[`eq()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#eq),[`in()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#in),[`ne()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ne),[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|", - "|`formId`|[`eq()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#eq),[`in()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#in),[`ne()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ne),[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|", - "|`namespace`|[`eq()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#eq),[`in()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#in),[`ne()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ne),[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|", + "|`_id`|[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|", + "|`formId`|[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|", + "|`namespace`|[`eq()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#eq)|", "|`status`|[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|", "|`_createdDate`|[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|", - "|`_updatedDate`|[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|" + "|`_updatedDate`|[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|", + "|`seen`|[`ascending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#ascending),[`descending()`](wix-forms-v2.Submissions.SubmissionsQueryBuilder#descending)|" ], "examples": [ { - "title": "Query a submission by namespace ", + "title": "Query submissions by namespace (dashboard page code)", "body": [ + "import { submissions } from 'wix-forms.v2';", "", + "export async function myQuerySubmissionsByNamespaceFunction() {", + " try {", + " const items = await submissions.querySubmissionsByNamespace()", + " .eq('namespace', 'wix.form_app.form')", + " .find()", + " console.log('Success! Submissions:', items);", + " return items", + " } catch (error) {", + " console.error(error)", + " }", + "}", "", + "/* Promise resolves to:", + "[", + " {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"Doe\",", + " \"first_name\": \"John\"", + " },", + " \"revision\": \"3\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\",", + " \"_createdDate\": \"2023-12-28T12:54:04.652Z\",", + " \"_updatedDate\": \"2023-12-28T12:54:05.483Z\"", + " },", + " {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"McBride\",", + " \"first_name\": \"Patsy\"", + " },", + " \"revision\": \"3\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"_createdDate\": \"2023-12-28T12:55:55.630Z\",", + " \"_updatedDate\": \"2023-12-28T12:55:56.233Z\"", + " }", + "]", + "*/" + ] + }, + { + "title": "Query submissions by namespace (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function querySubmissionsByNamespace() {", - " const { items } = submissions.querySubmissionsByNamespace()", - " .eq(\"namespace\", \"wix.form_app.form\")", - " .find();", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "export const myQuerySubmissionsByNamespaceFunction = webMethod(Permissions.Anyone, async () => {", + " try {", + " const elevatedQuerySubmissions = elevate(submissions.querySubmissionsByNamespace);", + " const items = await elevatedQuerySubmissions()", + " .eq('namespace', 'wix.form_app.form')", + " .find();", + " console.log('Success! Submissions:', items);", + " return items;", + " } catch (error) {", + " console.error(error);", + " }", + "});", + "", + "/* Promise resolves to:", + "[", + " {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"Doe\",", + " \"first_name\": \"John\"", + " },", + " \"revision\": \"3\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\",", + " \"_createdDate\": \"2023-12-28T12:54:04.652Z\",", + " \"_updatedDate\": \"2023-12-28T12:54:05.483Z\"", + " },", + " {", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"McBride\",", + " \"first_name\": \"Patsy\"", + " },", + " \"revision\": \"3\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"f8281b62-1b2f-45bf-ba7d-f041d7653d2d\",", + " \"_createdDate\": \"2023-12-28T12:55:55.630Z\",", + " \"_updatedDate\": \"2023-12-28T12:55:56.233Z\"", + " }", + "]", + "*/", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "querySubmissionsByNamespace", "isAdminMethod": true }, @@ -652,37 +1212,122 @@ "doc": "The updated submission.\n" }, "docs": { - "summary": "Updates a submission.", + "summary": "Updates a submission.\n> **Note**:\n> The Submissions API is only available in Wix Studio and Editor X.", "description": [ "Each time the submission is updated, `revision` increments by 1. The existing `revision` must be included when updating the submission. This ensures you're working with the latest submission information, and prevents unintended overwrites." ], "examples": [ { - "title": "updateSubmission example", + "title": "Update a submission (dashboard page code) ", + "body": [ + "import { submissions } from 'wix-forms.v2';", + "", + "/*", + "Sample _id value: \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\"", + "Sample submission value: ", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"seen\": false,", + " \"status\": \"CONFIRMED\",", + " \"revision\": \"6\",", + " \"submissions\": {", + " \"first_name\": \"Jane\",", + " \"last_name\": \"McBride\"", + " }", + "}", + "*/", + "", + "export async function myUpdateSubmissionFunction(_id, submission) {", + " try {", + " const updatedSubmission = await submissions.updateSubmission(_id, submission);", + " console.log('Success! Updated submission:', updatedSubmission);", + " return updatedSubmission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"McBride\",", + " \"first_name\": \"Jane\"", + " },", + " \"revision\": \"6\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\",", + " \"_createdDate\": \"2023-12-28T12:54:04.652Z\",", + " \"_updatedDate\": \"2023-12-28T14:33:02.571Z\"", + "}", + "*/" + ] + }, + { + "title": "Update a submission (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { submissions } from 'wix-forms.v2';", - " ", - " async function updateSubmission(id, submission, options) {", - " try {", - " const result = await submissions.updateSubmission(id, submission, options);", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "import { elevate } from 'wix-auth';", + "", + "/*", + "Sample _id value: \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\"", + "Sample submission value: ", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"seen\": false,", + " \"status\": \"CONFIRMED\",", + " \"revision\": \"6\",", + " \"submissions\": {", + " \"first_name\": \"Jane\",", + " \"last_name\": \"McBride\"", + " }", + "}", + "*/", + "", + "export const myUpdateSubmissionFunction = webMethod(Permissions.Anyone, async (_id, submission) => {", + " try {", + " const elevatedUpdateSubmission = elevate(submissions.updateSubmission);", + " const updatedSubmission = await elevatedUpdateSubmission(_id, submission);", + " console.log('Success! Updated submission:', updatedSubmission);", + " return updatedSubmission;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + "{", + " \"formId\": \"21bcb6c7-02b3-4ed1-b6db-7856094fac03\",", + " \"namespace\": \"wix.form_app.form\",", + " \"status\": \"CONFIRMED\",", + " \"submissions\": {", + " \"last_name\": \"McBride\",", + " \"first_name\": \"Jane\"", + " },", + " \"revision\": \"6\",", + " \"submitter\": {", + " \"applicationId\": \"151e476a-715e-ec33-db9a-a7ff4d51f70a\"", + " },", + " \"seen\": false,", + " \"_id\": \"abb9b5c9-a881-467c-9c34-b9bea43ca5f0\",", + " \"_createdDate\": \"2023-12-28T12:54:04.652Z\",", + " \"_updatedDate\": \"2023-12-28T14:33:02.571Z\"", + "}", + "*/", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "updateSubmission", "isAdminMethod": true } @@ -709,32 +1354,17 @@ } }, { - "name": "BulkMarkSubmissionsAsSeenRequest", + "name": "AddressInfo", "members": [ { - "name": "formId", + "name": "tag", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the form which the submissions belongs to." - }, - { - "name": "ids", - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Submission IDs to mark as seen." + "doc": "Address tag." } ], "docs": { @@ -744,43 +1374,17 @@ } }, { - "name": "BulkMarkSubmissionsAsSeenResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Cancel", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Complete", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ConfirmSubmissionRequest", + "name": "AnchorData", "members": [ { - "name": "submissionId", + "name": "anchor", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Submission ID to confirm." + "doc": "The target node's ID." } ], "docs": { @@ -790,159 +1394,100 @@ } }, { - "name": "ConfirmSubmissionResponse", + "name": "AppEmbedData", "members": [ { - "name": "submission", + "name": "bookingData", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "referenceType": "wix-forms-v2.Submissions.BookingData" } ], - "doc": "The confirmed submission." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CountSubmissionsRequest", - "members": [ + "doc": "Data for embedded Wix Bookings content." + }, { - "name": "formIds", + "name": "eventData", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-forms-v2.Submissions.EventData" } ], - "doc": "Form IDs." + "doc": "Data for embedded Wix Events content." }, { - "name": "namespace", + "name": "image", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.Media" } ], - "doc": "Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CountSubmissionsResponse", - "members": [ + "doc": "An image for the embedded content." + }, { - "name": "formsSubmissionsCount", + "name": "imageSrc", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-forms-v2.Submissions.FormSubmissionsCount" - } - ] - } + "nativeType": "string" } ], - "doc": "Forms submission count." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateSubmissionByOwnerRequest", - "members": [ + "doc": "Deprecated: Use `image` instead." + }, { - "name": "submission", + "name": "itemId", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "nativeType": "string" } ], - "doc": "Submission to create." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateSubmissionByOwnerResponse", - "members": [ + "doc": "The ID of the embedded content." + }, { - "name": "submission", + "name": "name", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "nativeType": "string" } ], - "doc": "The created submission." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateSubmissionBySubmitterRequest", - "members": [ + "doc": "The name of the embedded content." + }, { - "name": "submission", + "name": "type", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "nativeType": "string" } ], - "doc": "Submission to create." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateSubmissionBySubmitterResponse", - "members": [ + "doc": "The type of Wix App content being embedded." + }, { - "name": "submission", + "name": "url", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "nativeType": "string" } ], - "doc": "The created submission." + "doc": "The URL for the embedded content." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAppEmbedDataAppDataOneOf", + "members": [ + "bookingData", + "eventData" + ] + } + ] + }, "docs": { "description": [ "" @@ -950,17 +1495,27 @@ } }, { - "name": "CreateSubmissionOptions", + "name": "AppEmbedDataAppDataOneOf", "members": [ { - "name": "captchaToken", + "name": "bookingData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.BookingData" } ], - "doc": "Captcha token." + "doc": "Data for embedded Wix Bookings content." + }, + { + "name": "eventData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EventData" + } + ], + "doc": "Data for embedded Wix Events content." } ], "docs": { @@ -970,46 +1525,37 @@ } }, { - "name": "CreateSubmissionRequest", + "name": "ApplicationError", "members": [ { - "name": "captchaToken", + "name": "code", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Captcha token." + "doc": "Error code." }, { - "name": "submission", + "name": "data", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "nativeType": "Object" } ], - "doc": "Submission to create." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateSubmissionResponse", - "members": [ + "doc": "Data related to the error." + }, { - "name": "submission", + "name": "description", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "nativeType": "string" } ], - "doc": "The created submission." + "doc": "Description of the error." } ], "docs": { @@ -1019,27 +1565,17 @@ } }, { - "name": "CursorPaging", + "name": "ArrayErrorMessages", "members": [ { - "name": "cursor", + "name": "default", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" - }, - { - "name": "limit", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Number of items to load." + "doc": "Default error message on invalid validation." } ], "docs": { @@ -1049,92 +1585,69 @@ } }, { - "name": "CursorPagingMetadata", + "name": "ArrayItems", "members": [ { - "name": "count", + "name": "boolean", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-forms-v2.Submissions.BooleanType" } ], - "doc": "Number of items returned in the response." + "doc": "Boolean type validation for items." }, { - "name": "cursors", + "name": "integer", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.Cursors" + "referenceType": "wix-forms-v2.Submissions.IntegerType" } ], - "doc": "Offset that was requested." + "doc": "Integer type validation for items." }, { - "name": "hasNext", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CursorQuery", - "members": [ - { - "name": "cursorPaging", + "name": "number", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.CursorPaging" + "referenceType": "wix-forms-v2.Submissions.NumberType" } ], - "doc": "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`." + "doc": "Number type validation for items." }, { - "name": "filter", + "name": "object", "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-forms-v2.Submissions.ObjectType" } ], - "doc": "Filter object.\n\nSee [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n" + "doc": "Object type validation for items" }, { - "name": "sort", + "name": "string", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-forms-v2.Submissions.Sorting" - } - ] - } + "referenceType": "wix-forms-v2.Submissions.StringType" } ], - "doc": "Sort object." + "doc": "String type validation for items." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfCursorQueryPagingMethodOneOf", + "name": "oneOfArrayItemsItemsOneOf", "members": [ - "cursorPaging" + "boolean", + "integer", + "number", + "object", + "string" ] } ] @@ -1146,66 +1659,57 @@ } }, { - "name": "CursorQueryPagingMethodOneOf", + "name": "ArrayItemsItemsOneOf", "members": [ { - "name": "cursorPaging", + "name": "boolean", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.CursorPaging" + "referenceType": "wix-forms-v2.Submissions.BooleanType" } ], - "doc": "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`." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Cursors", - "members": [ + "doc": "Boolean type validation for items." + }, { - "name": "next", + "name": "integer", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.IntegerType" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Integer type validation for items." }, { - "name": "prev", + "name": "number", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.NumberType" } ], - "doc": "Cursor pointing to previous page in the list of results." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteSubmissionRequest", - "members": [ + "doc": "Number type validation for items." + }, { - "name": "submissionId", + "name": "object", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.ObjectType" } ], - "doc": "ID of the submission to delete." + "doc": "Object type validation for items" + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.StringType" + } + ], + "doc": "String type validation for items." } ], "docs": { @@ -1215,147 +1719,11491 @@ } }, { - "name": "DeleteSubmissionResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DomainEvent", + "name": "ArrayType", "members": [ { - "name": "_id", + "name": "errorMessages", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.ArrayErrorMessages" } ], - "doc": "random GUID so clients can tell if event was already handled" + "doc": "Custom error message when validation fails." }, { - "name": "actionEvent", + "name": "items", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.ActionEvent" + "referenceType": "wix-forms-v2.Submissions.ArrayItems" } ], - "doc": "" + "doc": "Type of items allowed in array." }, { - "name": "createdEvent", + "name": "maxItems", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.EntityCreatedEvent" + "nativeType": "number" } ], - "doc": "" + "doc": "Maximum amount of array elements." }, { - "name": "deletedEvent", + "name": "minItems", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.EntityDeletedEvent" + "nativeType": "number" } ], - "doc": "" - }, + "doc": "Minimum amount of array elements." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ArrayTypeArrayItems", + "members": [ + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldIntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "itemType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of array items" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldNumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldStringType" + } + ], + "doc": "String type validation for items." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfArrayTypeArrayItemsItemTypeOptionsOneOf", + "members": [ + "booleanOptions", + "integerOptions", + "numberOptions", + "objectOptions", + "stringOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ArrayTypeArrayItemsItemTypeOptionsOneOf", + "members": [ + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for items." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldIntegerType" + } + ], + "doc": "Integer type validation for items." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldNumberType" + } + ], + "doc": "Number type validation for items." + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldObjectType" + } + ], + "doc": "Object type validation for items" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldStringType" + } + ], + "doc": "String type validation for items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AudioData", + "members": [ + { + "name": "audio", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "Audio file details." + }, + { + "name": "authorName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Author name." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the audio node's container." + }, + { + "name": "coverImage", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "Cover image." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the audio node's download button is disabled." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An HTML version of the audio node." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Track name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Background", + "members": [ + { + "name": "color", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexademical value." + }, + { + "name": "gradient", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Gradient" + } + ], + "doc": "Details for a gradient background." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "An image to use for the background." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Background type. For each option, include the relevant details." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBackgroundBackgroundOneOf", + "members": [ + "color", + "gradient", + "image" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BackgroundBackgroundOneOf", + "members": [ + { + "name": "color", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexademical value." + }, + { + "name": "gradient", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Gradient" + } + ], + "doc": "Details for a gradient background." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "An image to use for the background." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BlockquoteData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookingData", + "members": [ + { + "name": "durations", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booking duration in minutes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BooleanErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BooleanType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "boolean" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BooleanErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Border", + "members": [ + { + "name": "radius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BorderColors", + "members": [ + { + "name": "bottom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Bottom border color as a hexadecimal value." + }, + { + "name": "left", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Left border color as a hexadecimal value." + }, + { + "name": "right", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Right border color as a hexadecimal value." + }, + { + "name": "top", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Top border color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BreakPoint", + "members": [ + { + "name": "columns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of columns of layout grid." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.ItemLayout" + } + ] + } + } + ], + "doc": "Description of layouts for items." + }, + { + "name": "margin", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Margin" + } + ], + "doc": "Description of elements margins." + }, + { + "name": "padding", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Margin" + } + ], + "doc": "Description of elements paddings." + }, + { + "name": "rowHeight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Row height of layout grid." + }, + { + "name": "sections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Section" + } + ] + } + } + ], + "doc": "Sections of the layout, which allow manage fields" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkActionMetadata", + "members": [ + { + "name": "totalFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that couldn't be processed." + }, + { + "name": "totalSuccesses", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that were successfully processed." + }, + { + "name": "undetailedFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateSubmissionBySubmitterData", + "members": [ + { + "name": "repeatedCreation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "A flag indicating whether this operation is a repeated creation, such as restoring a previously manually reported as spam entity." + }, + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "Submissions to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateSubmissionBySubmitterOptions", + "members": [ + { + "name": "returnEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "When set, items will be returned on successful create." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ] + } + } + ], + "doc": "Submissions to create.\nDeprecated" + }, + { + "name": "submissionsV2", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.BulkCreateSubmissionBySubmitterData" + } + ] + } + } + ], + "doc": "Submissions data to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateSubmissionBySubmitterRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form id. Restricts submissions creation for a single form." + }, + { + "name": "returnEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "When set, items will be returned on successful create." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ] + } + } + ], + "doc": "Submissions to create.\nDeprecated" + }, + { + "name": "submissionsV2", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.BulkCreateSubmissionBySubmitterData" + } + ] + } + } + ], + "doc": "Submissions data to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateSubmissionBySubmitterResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BulkActionMetadata" + } + ], + "doc": "Metadata of request" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.BulkSubmissionResult" + } + ] + } + } + ], + "doc": "Created submissions with metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkDeleteSubmissionOptions", + "members": [ + { + "name": "permanent", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Delete submission bypassing trash-bin\nDefault: false" + }, + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkDeleteSubmissionRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "permanent", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Delete submission bypassing trash-bin\nDefault: false" + }, + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkDeleteSubmissionResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BulkActionMetadata" + } + ], + "doc": "Metadata of request" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.BulkDeleteSubmissionResult" + } + ] + } + } + ], + "doc": "Results of bulk submission delete" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkDeleteSubmissionResult", + "members": [ + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ItemMetadata" + } + ], + "doc": "Deleted item metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkMarkSubmissionsAsSeenRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the form which the submissions belong to." + }, + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission IDs to mark as seen." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkMarkSubmissionsAsSeenResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRemoveSubmissionFromTrashBinOptions", + "members": [ + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRemoveSubmissionFromTrashBinRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRemoveSubmissionFromTrashBinResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BulkActionMetadata" + } + ], + "doc": "Metadata of request" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.BulkRemoveSubmissionFromTrashBinResult" + } + ] + } + } + ], + "doc": "Results of bulk submission removal from trash" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRemoveSubmissionFromTrashBinResult", + "members": [ + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ItemMetadata" + } + ], + "doc": "Deleted item metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSubmissionResult", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "The created submission." + }, + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ItemMetadata" + } + ], + "doc": "Created submission metadata" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulletedListData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ButtonData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the button's container." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Link" + } + ], + "doc": "Button link details." + }, + { + "name": "styles", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Styles" + } + ], + "doc": "Styling for the button." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text to display on the button." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The button type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Cancel", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CellStyle", + "members": [ + { + "name": "backgroundColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cell background color as a hexadecimal value." + }, + { + "name": "verticalAlignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Vertical alignment for the cell's text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Checkbox", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Label of the field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CheckboxGroup", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Option" + } + ] + } + } + ], + "doc": "List of options to select from" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CodeBlockData", + "members": [ + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextStyle" + } + ], + "doc": "Styling for the code block's text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CollapsibleListData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the collapsible list's container." + }, + { + "name": "direction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The direction of the text in the list. Either left-to-right or right-to-left." + }, + { + "name": "expandOnlyOne", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If `true`, only one item can be expanded at a time." + }, + { + "name": "initialExpandedItems", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets which items are expanded when the page loads." + }, + { + "name": "isQapageData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If `true`, The collapsible item will appear in search results as an FAQ." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ColorData", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text's background color as a hexadecimal value." + }, + { + "name": "foreground", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text's foreground color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Colors", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexadecimal value." + }, + { + "name": "border", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The border color as a hexadecimal value." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text color as a hexadecimal value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Complete", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmSubmissionRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Submission ID to confirm." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "The confirmed submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountDeletedSubmissionsOptions", + "members": [ + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of statuses of submissions which should be taken into count\nDefault: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountDeletedSubmissionsRequest", + "members": [ + { + "name": "formIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Form IDs." + }, + { + "name": "namespace", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + }, + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of statuses of submissions which should be taken into count\nDefault: CONFIRMED, PAYMENT_WAITING, PAYMENT_CANCELED" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountDeletedSubmissionsResponse", + "members": [ + { + "name": "formsDeletedSubmissionsCount", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormDeletedSubmissionsCount" + } + ] + } + } + ], + "doc": "Forms submission count." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountSubmissionsOptions", + "members": [ + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Status of the submission.\n- `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.\n- `PAYMENT_WAITING`: A form submission requiring payment is created.\n- `PAYMENT_CANCELED`: An order of a form submission is canceled.\n- `CONFIRMED`: A submission is recorded in the Wix Forms collection." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountSubmissionsRequest", + "members": [ + { + "name": "formIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Form IDs which submissions should be counted." + }, + { + "name": "namespace", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `getSubmission()` to retrieve the namespace." + }, + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Status of the submission.\n- `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.\n- `PAYMENT_WAITING`: A form submission requiring payment is created.\n- `PAYMENT_CANCELED`: An order of a form submission is canceled.\n- `CONFIRMED`: A submission is recorded in the Wix Forms collection." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CountSubmissionsResponse", + "members": [ + { + "name": "formsSubmissionsCount", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmissionsCount" + } + ] + } + } + ], + "doc": "Forms submission count." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCheckoutFromSubmissionOptions", + "members": [ + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Form" + } + ], + "doc": "Submission's form." + }, + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "Submission to create checkout from." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCreateCheckoutFromSubmissionRequestFormSchemaIdentifierOneOf", + "members": [ + "form" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCheckoutFromSubmissionRequest", + "members": [ + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Form" + } + ], + "doc": "Submission's form." + }, + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "Submission to create checkout from." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCreateCheckoutFromSubmissionRequestFormSchemaIdentifierOneOf", + "members": [ + "form" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCheckoutFromSubmissionRequestFormSchemaIdentifierOneOf", + "members": [ + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Form" + } + ], + "doc": "Submission's form." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCheckoutFromSubmissionResponse", + "members": [ + { + "name": "checkoutId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Checkout ID (applicable for form involving payments)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateSubmissionBySubmitterOptions", + "members": [ + { + "name": "repeatedCreation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "A flag indicating whether this operation is a repeated creation, such as restoring a previously manually reported as spam entity." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateSubmissionBySubmitterRequest", + "members": [ + { + "name": "repeatedCreation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "A flag indicating whether this operation is a repeated creation, such as restoring a previously manually reported as spam entity." + }, + { + "name": "submission", + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "Submission to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateSubmissionBySubmitterResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "The created submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateSubmissionOptions", + "members": [ + { + "name": "captchaToken", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Captcha token." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateSubmissionRequest", + "members": [ + { + "name": "captchaToken", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Captcha token." + }, + { + "name": "submission", + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "Submission to create." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "The created submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Cursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorPaging" + } + ], + "doc": "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`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object.\n\nSee [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Sorting" + } + ] + } + } + ], + "doc": "Sort object." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCursorQueryPagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorPaging" + } + ], + "doc": "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`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Cursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CustomFieldInfo", + "members": [ + { + "name": "key", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom field key." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DataExtensionsDetails", + "members": [ + { + "name": "fqdns", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "FQDNS which can be extended with this field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DateOptions", + "members": [ + { + "name": "dateFormatParts", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Order of date picking component parts (e.g., YEAR, MONTH, DAY)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DateTimeConstraints", + "members": [ + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as \"$now\" to represent the current date and time.\nThe dynamic calculation supports expressions like \"$now+2d\" (2 days in the future), \"$now-1h\" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])" + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Support static constrains defined as ISO date/time format, as well as\ndynamic calculations can be performed using special keywords such as \"$now\" to represent the current date and time.\nThe dynamic calculation supports expressions like \"$now+2d\" (2 days in the future), \"$now-1h\" (1 hour in the past), etc.\nThe regex pattern for dynamic calculations is: \\$now([+-]\\d{1,2})([yMdmh])" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DateTimeInput", + "members": [ + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateOptions" + } + ], + "doc": "Options specific to the Date-only input type." + }, + { + "name": "dateTimeInputType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Date and/or time input component type" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeOptions" + } + ], + "doc": "Options specific to the combined Date and Time input type." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Description of the field. Additional information about the date/time input." + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field. Displayed text for the date/time input." + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying whether to show or hide the label.\nDefault: true" + }, + { + "name": "showPlaceholder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying whether to show or hide the placeholder.\nDefault: true" + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TimeOptions" + } + ], + "doc": "Options specific to the Time-only input type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDateTimeInputDateTimeInputTypeOptionsOneOf", + "members": [ + "dateOptions", + "dateTimeOptions", + "timeOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DateTimeInputDateTimeInputTypeOptionsOneOf", + "members": [ + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateOptions" + } + ], + "doc": "Options specific to the Date-only input type." + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeOptions" + } + ], + "doc": "Options specific to the combined Date and Time input type." + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TimeOptions" + } + ], + "doc": "Options specific to the Time-only input type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DateTimeOptions", + "members": [ + { + "name": "dateFormatParts", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Order of date picking component parts (e.g., YEAR, MONTH, DAY)." + }, + { + "name": "use24HourFormat", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag indicating whether to use the 24-hour time format.\nDefault: false." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Decoration", + "members": [ + { + "name": "anchorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.AnchorData" + } + ], + "doc": "Data for an anchor link decoration." + }, + { + "name": "colorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ColorData" + } + ], + "doc": "Data for a color decoration." + }, + { + "name": "fontSizeData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FontSizeData" + } + ], + "doc": "Data for a font size decoration." + }, + { + "name": "fontWeightValue", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font weight for a bold decoration." + }, + { + "name": "italicData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an italic decoration." + }, + { + "name": "linkData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.LinkData" + } + ], + "doc": "Data for an external link decoration." + }, + { + "name": "mentionData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.MentionData" + } + ], + "doc": "Data for a mention decoration." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of decoration to apply." + }, + { + "name": "underlineData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an underline decoration." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDecorationDataOneOf", + "members": [ + "anchorData", + "colorData", + "fontSizeData", + "fontWeightValue", + "italicData", + "linkData", + "mentionData", + "underlineData" + ] + } + ] + }, + "docs": { + "description": [ + "Adds appearence changes to text" + ] + } + }, + { + "name": "DecorationDataOneOf", + "members": [ + { + "name": "anchorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.AnchorData" + } + ], + "doc": "Data for an anchor link decoration." + }, + { + "name": "colorData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ColorData" + } + ], + "doc": "Data for a color decoration." + }, + { + "name": "fontSizeData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FontSizeData" + } + ], + "doc": "Data for a font size decoration." + }, + { + "name": "fontWeightValue", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font weight for a bold decoration." + }, + { + "name": "italicData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an italic decoration." + }, + { + "name": "linkData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.LinkData" + } + ], + "doc": "Data for an external link decoration." + }, + { + "name": "mentionData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.MentionData" + } + ], + "doc": "Data for a mention decoration." + }, + { + "name": "underlineData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Data for an underline decoration." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteSubmissionOptions", + "members": [ + { + "name": "permanent", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Delete the submission, bypassing the trash bin. This means that the submission is permanently delete and cannot be restored.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteSubmissionRequest", + "members": [ + { + "name": "permanent", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Delete the submission, bypassing the trash bin. This means that the submission is permanently deleted and cannot be restored.\n\nDefault: `false`\n" + }, + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the submission to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteSubmissionResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Design", + "members": [ + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.OptionDesign" + } + ], + "doc": "Styling for voting options." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PollDesign" + } + ], + "doc": "Styling for the poll." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Dimensions", + "members": [ + { + "name": "colsMinWidth", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing the minimum width of each column in pixels." + }, + { + "name": "colsWidthRatio", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing relative width of each column in relation to the other columns." + }, + { + "name": "rowsHeight", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "An array representing the height of each row in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DisplayField", + "members": [ + { + "name": "header", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Header" + } + ], + "doc": "Header field" + }, + { + "name": "richText", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichText" + } + ], + "doc": "Rich text field" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDisplayFieldComponentTypeOneOf", + "members": [ + "header", + "richText" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DisplayFieldComponentTypeOneOf", + "members": [ + { + "name": "header", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Header" + } + ], + "doc": "Header field" + }, + { + "name": "richText", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichText" + } + ], + "doc": "Rich text field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DividerData", + "members": [ + { + "name": "alignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider alignment." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the divider's container." + }, + { + "name": "lineStyle", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider line style." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Divider width." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DocumentStyle", + "members": [ + { + "name": "blockquote", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for block quote nodes." + }, + { + "name": "codeBlock", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for code block nodes." + }, + { + "name": "headerFive", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for H5 nodes." + }, + { + "name": "headerFour", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for H4 nodes." + }, + { + "name": "headerOne", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for H1 nodes." + }, + { + "name": "headerSix", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for H6 nodes." + }, + { + "name": "headerThree", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for H3 nodes." + }, + { + "name": "headerTwo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for H2 nodes." + }, + { + "name": "paragraph", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextNodeStyle" + } + ], + "doc": "Styling for paragraph nodes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Dropdown", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DropdownCustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.DropdownOption" + } + ] + } + } + ], + "doc": "List of options to select from" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of dropdown input" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DropdownCustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DropdownOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DynamicPriceOptions", + "members": [ + { + "name": "maxPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Maximal price monetary amount." + }, + { + "name": "minPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Minimal price monetary amount." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EmailInfo", + "members": [ + { + "name": "tag", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Email tag." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EmbedData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the oEmbed node's container." + }, + { + "name": "oembed", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Oembed" + } + ], + "doc": "An [oEmbed](https://www.oembed.com) object." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Origin asset source." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Empty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EventData", + "members": [ + { + "name": "location", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event location." + }, + { + "name": "scheduling", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event schedule." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ExtendedFields", + "members": [ + { + "name": "namespaces", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "Object" + } + ] + } + } + ], + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FileData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the file's container." + }, + { + "name": "mimeType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File MIME type." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File name." + }, + { + "name": "path", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File path." + }, + { + "name": "pdfSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PDFSettings" + } + ], + "doc": "Settings for PDF files." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "File size in KB." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FileSource" + } + ], + "doc": "The source for the file's data." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "File type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FileSource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An ID that's resolved to a URL by a resolver function." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom ID. Use `id` instead." + }, + { + "name": "private", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates whether the file's source is private." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the file's source." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFileSourceDataOneOf", + "members": [ + "_id", + "custom", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FileSourceDataOneOf", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "An ID that's resolved to a URL by a resolver function." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom ID. Use `id` instead." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the file's source." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FileUpload", + "members": [ + { + "name": "buttonText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text on upload button" + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "explanationText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom text which appears when file is uploaded, if missing file name will be shown" + }, + { + "name": "fileLimit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of files allowed to upload" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + }, + { + "name": "uploadFileFormats", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Supported file formats for upload" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FixedPriceOptions", + "members": [ + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fixed price monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FontSizeData", + "members": [ + { + "name": "unit", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The units used for the font size." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Font size value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Form", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date of creation." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date of last update." + }, + { + "name": "deletedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormField" + } + ] + } + } + ], + "doc": "Fields which were soft deleted." + }, + { + "name": "deletedFieldsV2", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormFieldV2" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ExtendedFields" + } + ], + "doc": "Data extensions ExtendedFields." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormField" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "fieldsV2", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormFieldV2" + } + ] + } + } + ], + "doc": "List of form fields that represent input elements." + }, + { + "name": "kind", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Regular forms can be freely modified.\nExtensions are copied from templates and might have restrictions." + }, + { + "name": "limitationRule", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.LimitationRule" + } + ], + "doc": "Rules that limit submissions on this form." + }, + { + "name": "mediaFolderId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media folder ID." + }, + { + "name": "namespace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the namespace that the form belongs to." + }, + { + "name": "postSubmissionTriggers", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PostSubmissionTriggers" + } + ], + "doc": "Defines triggers that will be executed after the submission, for the submissions based on this schema.\nForms provide a set of predefined triggers that allow it to assign specific business cases to created forms." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormProperties" + } + ], + "doc": "Properties of the form." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Represents the current state of an item. Each time the item is modified, its `revision` changes. For an update operation to succeed, you MUST pass the latest revision." + }, + { + "name": "rules", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormRule" + } + ] + } + } + ], + "doc": "Form rules, can be applied to layout and items properties." + }, + { + "name": "steps", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Step" + } + ] + } + } + ], + "doc": "Defines the layout for form fields in each submission step." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormDeletedSubmissionsCount", + "members": [ + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "totalCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormField", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID." + }, + { + "name": "dataExtensionsDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DataExtensionsDetails" + } + ], + "doc": "Details identifying field, which is extension of other entity" + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden." + }, + { + "name": "pii", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Mark the field as containing personal information. This will encrypt user data when storing it." + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Definition of a target where the value of field belongs." + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Validation" + } + ], + "doc": "Validation of field output value." + }, + { + "name": "view", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Field view properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormFieldContactInfo", + "members": [ + { + "name": "addressInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.AddressInfo" + } + ], + "doc": "Address info." + }, + { + "name": "contactField", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Field mapped to contacts." + }, + { + "name": "customFieldInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CustomFieldInfo" + } + ], + "doc": "Custom field info." + }, + { + "name": "emailInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EmailInfo" + } + ], + "doc": "Email info." + }, + { + "name": "phoneInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PhoneInfo" + } + ], + "doc": "Phone info." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFormFieldContactInfoAdditionalInfoOneOf", + "members": [ + "addressInfo", + "customFieldInfo", + "emailInfo", + "phoneInfo" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormFieldContactInfoAdditionalInfoOneOf", + "members": [ + { + "name": "addressInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.AddressInfo" + } + ], + "doc": "Address info." + }, + { + "name": "customFieldInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CustomFieldInfo" + } + ], + "doc": "Custom field info." + }, + { + "name": "emailInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EmailInfo" + } + ], + "doc": "Email info." + }, + { + "name": "phoneInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PhoneInfo" + } + ], + "doc": "Phone info." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormFieldV2", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Field id." + }, + { + "name": "displayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DisplayField" + } + ], + "doc": "Field for displaying information such as header or text paragraph" + }, + { + "name": "fieldType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of the field" + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden.\nDefault: false" + }, + { + "name": "identifier", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom identification of field, can be used to specify exceptional behaviour of client for specific field" + }, + { + "name": "inputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputField" + } + ], + "doc": "Field accept input of data" + }, + { + "name": "submitOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.SubmitButton" + } + ], + "doc": "Submit button of the form" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFormFieldV2FieldTypeOptionsOneOf", + "members": [ + "displayOptions", + "inputOptions", + "submitOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormFieldV2FieldTypeOptionsOneOf", + "members": [ + { + "name": "displayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DisplayField" + } + ], + "doc": "Field for displaying information such as header or text paragraph" + }, + { + "name": "inputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputField" + } + ], + "doc": "Field accept input of data" + }, + { + "name": "submitOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.SubmitButton" + } + ], + "doc": "Submit button of the form" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormLayout", + "members": [ + { + "name": "large", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BreakPoint" + } + ], + "doc": "Layout for large break point." + }, + { + "name": "medium", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BreakPoint" + } + ], + "doc": "Layout for medium break point." + }, + { + "name": "small", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BreakPoint" + } + ], + "doc": "Layout for small break point." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormOverride", + "members": [ + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Overridden entity id. Either fieldId, or \"{fieldIdWithNestedForm}/{nestedFormFieldId}\"" + }, + { + "name": "entityType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Override entity type." + }, + { + "name": "valueChanges", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Form entity properties path with new value, that will be changed on condition." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormProperties", + "members": [ + { + "name": "disabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Identifies if the form is disabled." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormRule", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the rule" + }, + { + "name": "condition", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Rule on which item properties or layouts will be changed." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the rule" + }, + { + "name": "overrides", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormOverride" + } + ] + } + } + ], + "doc": "Form items with defined properties that will be\nchanged when given condition is resolved to true." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormSubmission", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the form submission was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Submission ID." + }, + { + "name": "_updatedDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the form submission was updated." + }, + { + "name": "extendedFields", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ExtendedFields" + } + ], + "doc": "Data extension object that holds users' and apps' fields." + }, + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the form which the submission belongs to." + }, + { + "name": "namespace", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace." + }, + { + "name": "orderDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.OrderDetails" + } + ], + "doc": "Order details.
\nNote: This object is only applicable when submittng a form in the Wix Payments app." + }, + { + "name": "revision", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission." + }, + { + "name": "seen", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a site owner marked a submission as \"seen\"." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Status of the submission.\n- `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.\n- `PAYMENT_WAITING`: A form submission requiring payment is created.\n- `PAYMENT_CANCELED`: An order of a form submission is canceled.\n- `CONFIRMED`: A submission is recorded in the Wix Forms collection." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Submission values where `key` is the form field and `value` is the data submitted for the given field." + }, + { + "name": "submitter", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Submitter" + } + ], + "doc": "ID of the visitor that submitted the form." + } + ], + "docs": { + "description": [ + "Form submission that was created or retrieved." + ] + } + }, + { + "name": "FormSubmissionStatusUpdatedEvent", + "members": [ + { + "name": "previousStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Previous status of the submission." + }, + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "Updated submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FormSubmissionsCount", + "members": [ + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "totalCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of submissions." + }, + { + "name": "unseenCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of submissions that the site owner hasn't seen yet." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GIF", + "members": [ + { + "name": "gif", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "GIF format URL." + }, + { + "name": "mp4", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "MP4 format URL." + }, + { + "name": "still", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Thumbnail URL." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GIFData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the GIF's container." + }, + { + "name": "downsized", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.GIF" + } + ], + "doc": "The source of the downsized GIF." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Height in pixels." + }, + { + "name": "original", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.GIF" + } + ], + "doc": "The source of the full size GIF." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GalleryData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the gallery's container." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the gallery's download button is disabled." + }, + { + "name": "disableExpand", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the gallery's expand button is disabled." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Item" + } + ] + } + } + ], + "doc": "The items in the gallery." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.GalleryOptions" + } + ], + "doc": "Options for defining the gallery's appearance." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GalleryOptions", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ItemStyle" + } + ], + "doc": "Styling for gallery items." + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Layout" + } + ], + "doc": "Gallery layout." + }, + { + "name": "thumbnails", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Thumbnails" + } + ], + "doc": "Styling for gallery thumbnail images." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetDeletedSubmissionRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Submission id." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetDeletedSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "The retrieved Submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMediaUploadURLRequest", + "members": [ + { + "name": "filename", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of file to upload." + }, + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "mimeType", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "[Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#) of file to upload.\n\nFor example, `'image/png'`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMediaUploadURLResponse", + "members": [ + { + "name": "uploadUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Url to upload file." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetSubmissionByCheckoutIdRequest", + "members": [ + { + "name": "checkoutId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Checkout ID of the submission to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetSubmissionByCheckoutIdResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "The retrieved submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetSubmissionRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the submission to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetSubmissionResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "The retrieved submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Gradient", + "members": [ + { + "name": "angle", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The gradient angle in degrees." + }, + { + "name": "lastColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The end color as a hexademical value." + }, + { + "name": "startColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The start color as a hexademical value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "HTMLData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the HTML node's container." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The HTML code for the node." + }, + { + "name": "isAdsense", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this is an AdSense element. Use `source` instead." + }, + { + "name": "source", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of HTML code." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the HTML code for the node." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfHTMLDataDataOneOf", + "members": [ + "html", + "isAdsense", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "HTMLDataDataOneOf", + "members": [ + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The HTML code for the node." + }, + { + "name": "isAdsense", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this is an AdSense element. Use `source` instead." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the HTML code for the node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Header", + "members": [ + { + "name": "content", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Content of the header" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "HeadingData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level from 1-6." + }, + { + "name": "level", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Heading level from 1-6." + }, + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextStyle" + } + ], + "doc": "Styling for the heading text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Height", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom height value in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Image", + "members": [ + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Link" + } + ], + "doc": "Link details for images that are links." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "Image file details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ImageData", + "members": [ + { + "name": "altText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Image's alternative text." + }, + { + "name": "caption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Image caption." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the image's container." + }, + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the image's download button is disabled." + }, + { + "name": "disableExpand", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the image expands to full screen when clicked." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "Image file details." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Link" + } + ], + "doc": "Link details for images that are links." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputField", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._Array" + } + ], + "doc": "Input return array as value" + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._Boolean" + } + ], + "doc": "Input return boolean as value" + }, + { + "name": "inputType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of the input field" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._Number" + } + ], + "doc": "Input return number as value" + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._Object" + } + ], + "doc": "Input return object as value" + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Payment" + } + ], + "doc": "Input returns selected products as value." + }, + { + "name": "pii", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Mark the field as containing personal information. This will encrypt user data when storing it.\nDefault: false" + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is required.\nDefault: false" + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._String" + } + ], + "doc": "Input return string as value" + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Definition of a target where the value of field belongs." + }, + { + "name": "wixFileOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.WixFile" + } + ], + "doc": "Input return \"Wix file\" as value" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfInputFieldInputTypeOptionsOneOf", + "members": [ + "arrayOptions", + "booleanOptions", + "numberOptions", + "objectOptions", + "paymentOptions", + "stringOptions", + "wixFileOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldArrayErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldArrayType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldArrayErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ArrayTypeArrayItems" + } + ], + "doc": "Type of items allowed in array." + }, + { + "name": "maxItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum amount of array elements." + }, + { + "name": "minItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum amount of array elements." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldBooleanErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldBooleanType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "boolean" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldBooleanErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldInputTypeOptionsOneOf", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._Array" + } + ], + "doc": "Input return array as value" + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._Boolean" + } + ], + "doc": "Input return boolean as value" + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._Number" + } + ], + "doc": "Input return number as value" + }, + { + "name": "objectOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._Object" + } + ], + "doc": "Input return object as value" + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Payment" + } + ], + "doc": "Input returns selected products as value." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions._String" + } + ], + "doc": "Input return string as value" + }, + { + "name": "wixFileOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.WixFile" + } + ], + "doc": "Input return \"Wix file\" as value" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldIntegerType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldNumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldNumberErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldNumberType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldNumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldObjectErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldObjectType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldObjectErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Submissions.ObjectTypePropertiesType" + } + ] + } + } + ], + "doc": "Description of object properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldStringErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "InputFieldStringType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldStringErrorMessages" + } + ], + "doc": "Custom error messages when validation fails." + }, + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of a string." + }, + { + "name": "maxLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum length." + }, + { + "name": "minLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum length." + }, + { + "name": "pattern", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pattern for a regular expression match." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "IntegerType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.NumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "IsFormSubmittableRequest", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "IsFormSubmittableResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Item", + "members": [ + { + "name": "altText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item's alternative text." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Image" + } + ], + "doc": "An image item." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item title." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Video" + } + ], + "doc": "A video item." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfItemDataOneOf", + "members": [ + "image", + "video" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ItemDataOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Image" + } + ], + "doc": "An image item." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Video" + } + ], + "doc": "A video item." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ItemLayout", + "members": [ + { + "name": "column", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Vertical coordinate in the grid." + }, + { + "name": "fieldId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form field reference id." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Width." + }, + { + "name": "row", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Horizontal coordinate in the grid." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Height." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ItemMetadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + }, + { + "name": "error", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ApplicationError" + } + ], + "doc": "Details about the error in case of failure." + }, + { + "name": "originalIndex", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ItemStyle", + "members": [ + { + "name": "crop", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets how item images are cropped." + }, + { + "name": "ratio", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Item ratio" + }, + { + "name": "spacing", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The spacing between items in pixels." + }, + { + "name": "targetSize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Desirable dimension for each item in pixels (behvaior changes according to gallery type)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Layout", + "members": [ + { + "name": "horizontalScroll", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether horizontal scroll is enabled." + }, + { + "name": "mobileNumberOfColumns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of columns to display on mobile screens." + }, + { + "name": "numberOfColumns", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of columns to display on full size screens." + }, + { + "name": "orientation", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Gallery orientation." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Gallery layout type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "LimitationRule", + "members": [ + { + "name": "dateTimeDeadline", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Limitation by submission date, disables form when a set date and time is reached." + }, + { + "name": "maxAllowedSubmissions", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Limitation by submission count, disables form when a set amount of submissions is reached." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Link", + "members": [ + { + "name": "anchor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The target node's ID. Used for linking to another node in this object." + }, + { + "name": "customData", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A serialized object used for a custom or external link panel." + }, + { + "name": "rel", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Rel" + } + ], + "doc": "The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document." + }, + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "he HTML `target` attribute value for the link. This property defines where the linked document opens as follows:\n`SELF` - Default. Opens the linked document in the same frame as the link.\n`BLANK` - Opens the linked document in a new browser tab or window.\n`PARENT` - Opens the linked document in the link's parent frame.\n`TOP` - Opens the linked document in the full body of the link's browser tab or window." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the linked document." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfLinkDataOneOf", + "members": [ + "anchor", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "LinkData", + "members": [ + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Link" + } + ], + "doc": "Link details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "LinkDataOneOf", + "members": [ + { + "name": "anchor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The target node's ID. Used for linking to another node in this object." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The absolute URL for the linked document." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "LinkPreviewData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the link preview's container." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview description." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The preview content as HTML." + }, + { + "name": "link", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Link" + } + ], + "doc": "Link details." + }, + { + "name": "thumbnailUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview thumbnail URL." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Preview title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListDeletedSubmissionsOptions", + "members": [ + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorPaging" + } + ], + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`." + }, + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of statuses of submissions which should be returned\nDefault: CONFIRMED" + }, + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListDeletedSubmissionsRequest", + "members": [ + { + "name": "formId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form ID." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorPaging" + } + ], + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not filter or `order`." + }, + { + "name": "statuses", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of statuses of submissions which should be returned\nDefault: CONFIRMED" + }, + { + "name": "submissionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Submission ids." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListDeletedSubmissionsResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ] + } + } + ], + "doc": "The retrieved Submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListValue", + "members": [ + { + "name": "values", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "any" + } + ] + } + } + ], + "doc": "Repeated field of dynamically typed values." + } + ], + "docs": { + "description": [ + "`ListValue` is a wrapper around a repeated field of values." + ] + } + }, + { + "name": "MapData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the map's container." + }, + { + "name": "mapSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.MapSettings" + } + ], + "doc": "Map settings." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MapSettings", + "members": [ + { + "name": "address", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The address to display on the map." + }, + { + "name": "draggable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the map is draggable." + }, + { + "name": "initialZoom", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Initial zoom value." + }, + { + "name": "lat", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Location latitude." + }, + { + "name": "lng", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Location longitude." + }, + { + "name": "locationName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location name." + }, + { + "name": "mapType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Map type. `HYBRID` is a combination of the `ROADMAP` and `SATELLITE` map types." + }, + { + "name": "marker", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the location marker is visible." + }, + { + "name": "streetViewControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether street view control is enabled." + }, + { + "name": "viewModeControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether view mode control is enabled." + }, + { + "name": "zoomControl", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether zoom control is enabled." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Margin", + "members": [ + { + "name": "horizontal", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Horizontal value." + }, + { + "name": "vertical", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Vertical value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Media", + "members": [ + { + "name": "duration", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media duration in seconds. Only relevant for audio and video files." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media height in pixels." + }, + { + "name": "src", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FileSource" + } + ], + "doc": "The source for the media's data." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media width in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MediaItem", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "WixMedia image." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaItemMediaOneOf", + "members": [ + "image" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MediaItemMediaOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "WixMedia image." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MentionData", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Mentioned user's ID." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The mentioned user's name." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The version of the user's name that appears after the `@` character in the mention." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Metadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Object ID." + }, + { + "name": "createdTimestamp", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "When the object was created." + }, + { + "name": "updatedTimestamp", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "When the object was most recently updated." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Schema version." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NestedForm", + "members": [ + { + "name": "form", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Form" + } + ], + "doc": "Nested form." + }, + { + "name": "targets", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Targets which have this form." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NestedFormFieldOverrides", + "members": [ + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is hidden. Leave blank for no override." + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the field is required. Leave blank for no override." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NestedFormOverrides", + "members": [ + { + "name": "fieldOverrides", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Submissions.NestedFormFieldOverrides" + } + ] + } + } + ], + "doc": "Field overrides by field ID" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Node", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Node ID." + }, + { + "name": "appEmbedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.AppEmbedData" + } + ], + "doc": "Data for an app embed node." + }, + { + "name": "audioData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.AudioData" + } + ], + "doc": "Data for an audio node." + }, + { + "name": "blockquoteData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BlockquoteData" + } + ], + "doc": "Data for a block quote node." + }, + { + "name": "bulletedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BulletedListData" + } + ], + "doc": "Data for a bulleted list node." + }, + { + "name": "buttonData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ButtonData" + } + ], + "doc": "Data for a button node." + }, + { + "name": "codeBlockData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CodeBlockData" + } + ], + "doc": "Data for a code block node." + }, + { + "name": "collapsibleListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CollapsibleListData" + } + ], + "doc": "Data for a collapsible list node." + }, + { + "name": "dividerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DividerData" + } + ], + "doc": "Data for a divider node." + }, + { + "name": "embedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EmbedData" + } + ], + "doc": "Data for an oEmbed node." + }, + { + "name": "externalData", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data for a custon external node." + }, + { + "name": "fileData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FileData" + } + ], + "doc": "Data for a file node." + }, + { + "name": "galleryData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.GalleryData" + } + ], + "doc": "Data for a gallery node." + }, + { + "name": "gifData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.GIFData" + } + ], + "doc": "Data for a GIF node." + }, + { + "name": "headingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.HeadingData" + } + ], + "doc": "Data for a heading node." + }, + { + "name": "htmlData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.HTMLData" + } + ], + "doc": "Data for an embedded HTML node." + }, + { + "name": "imageData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ImageData" + } + ], + "doc": "Data for an image node." + }, + { + "name": "linkPreviewData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.LinkPreviewData" + } + ], + "doc": "Data for a link preview node." + }, + { + "name": "mapData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.MapData" + } + ], + "doc": "Data for a map node." + }, + { + "name": "nodes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Node" + } + ] + } + } + ], + "doc": "A list of child nodes." + }, + { + "name": "orderedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.OrderedListData" + } + ], + "doc": "Data for an ordered list node." + }, + { + "name": "paragraphData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ParagraphData" + } + ], + "doc": "Data for a paragraph node." + }, + { + "name": "pollData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PollData" + } + ], + "doc": "Data for a poll node." + }, + { + "name": "style", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.NodeStyle" + } + ], + "doc": "Padding and background color styling for the node." + }, + { + "name": "tableCellData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TableCellData" + } + ], + "doc": "Data for a table cell node." + }, + { + "name": "tableData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TableData" + } + ], + "doc": "Data for a table node." + }, + { + "name": "textData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextData" + } + ], + "doc": "Data for a text node. Used to apply decorations to text." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "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." + }, + { + "name": "videoData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.VideoData" + } + ], + "doc": "Data for a video node." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfNodeDataOneOf", + "members": [ + "appEmbedData", + "audioData", + "blockquoteData", + "bulletedListData", + "buttonData", + "codeBlockData", + "collapsibleListData", + "dividerData", + "embedData", + "externalData", + "fileData", + "galleryData", + "gifData", + "headingData", + "htmlData", + "imageData", + "linkPreviewData", + "mapData", + "orderedListData", + "paragraphData", + "pollData", + "tableCellData", + "tableData", + "textData", + "videoData" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NodeDataOneOf", + "members": [ + { + "name": "appEmbedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.AppEmbedData" + } + ], + "doc": "Data for an app embed node." + }, + { + "name": "audioData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.AudioData" + } + ], + "doc": "Data for an audio node." + }, + { + "name": "blockquoteData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BlockquoteData" + } + ], + "doc": "Data for a block quote node." + }, + { + "name": "bulletedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BulletedListData" + } + ], + "doc": "Data for a bulleted list node." + }, + { + "name": "buttonData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ButtonData" + } + ], + "doc": "Data for a button node." + }, + { + "name": "codeBlockData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CodeBlockData" + } + ], + "doc": "Data for a code block node." + }, + { + "name": "collapsibleListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CollapsibleListData" + } + ], + "doc": "Data for a collapsible list node." + }, + { + "name": "dividerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DividerData" + } + ], + "doc": "Data for a divider node." + }, + { + "name": "embedData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.EmbedData" + } + ], + "doc": "Data for an oEmbed node." + }, + { + "name": "externalData", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data for a custon external node." + }, + { + "name": "fileData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FileData" + } + ], + "doc": "Data for a file node." + }, + { + "name": "galleryData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.GalleryData" + } + ], + "doc": "Data for a gallery node." + }, + { + "name": "gifData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.GIFData" + } + ], + "doc": "Data for a GIF node." + }, + { + "name": "headingData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.HeadingData" + } + ], + "doc": "Data for a heading node." + }, + { + "name": "htmlData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.HTMLData" + } + ], + "doc": "Data for an embedded HTML node." + }, + { + "name": "imageData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ImageData" + } + ], + "doc": "Data for an image node." + }, + { + "name": "linkPreviewData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.LinkPreviewData" + } + ], + "doc": "Data for a link preview node." + }, + { + "name": "mapData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.MapData" + } + ], + "doc": "Data for a map node." + }, + { + "name": "orderedListData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.OrderedListData" + } + ], + "doc": "Data for an ordered list node." + }, + { + "name": "paragraphData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ParagraphData" + } + ], + "doc": "Data for a paragraph node." + }, + { + "name": "pollData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PollData" + } + ], + "doc": "Data for a poll node." + }, + { + "name": "tableCellData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TableCellData" + } + ], + "doc": "Data for a table cell node." + }, + { + "name": "tableData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TableData" + } + ], + "doc": "Data for a table node." + }, + { + "name": "textData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextData" + } + ], + "doc": "Data for a text node. Used to apply decorations to text." + }, + { + "name": "videoData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.VideoData" + } + ], + "doc": "Data for a video node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NodeStyle", + "members": [ + { + "name": "backgroundColor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The background color as a hexadecimal value." + }, + { + "name": "paddingBottom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The bottom padding value in pixels." + }, + { + "name": "paddingTop", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The top padding value in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NumberErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NumberInput", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder for the value input" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NumberType", + "members": [ + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.NumberErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive maximum value." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Inclusive minimum value." + }, + { + "name": "multipleOf", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Multiple of value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ObjectErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ObjectType", + "members": [ + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ObjectErrorMessages" + } + ], + "doc": "Custom error message when validation fails." + }, + { + "name": "properties", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Submissions.PropertiesType" + } + ] + } + } + ], + "doc": "Description of object properties." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ObjectTypePropertiesType", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldIntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldNumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "propertiesType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of object properties" + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the property is required." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldStringType" + } + ], + "doc": "String type validation for property." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfObjectTypePropertiesTypePropertiesTypeOptionsOneOf", + "members": [ + "arrayOptions", + "booleanOptions", + "integerOptions", + "numberOptions", + "stringOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ObjectTypePropertiesTypePropertiesTypeOptionsOneOf", + "members": [ + { + "name": "arrayOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "booleanOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldBooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integerOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldIntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "numberOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldNumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "stringOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldStringType" + } + ], + "doc": "String type validation for property." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Oembed", + "members": [ + { + "name": "authorName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the author or owner of the resource." + }, + { + "name": "authorUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the author or owner of the resource." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The height of the resource specified in the `url` property in pixels." + }, + { + "name": "html", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "HTML for embedding a video player. The HTML should have no padding or margins." + }, + { + "name": "providerName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The name of the resource provider." + }, + { + "name": "providerUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for the resource provider." + }, + { + "name": "thumbnailHeight", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined." + }, + { + "name": "thumbnailUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined." + }, + { + "name": "thumbnailWidth", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource title." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The resource type." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The source URL for the resource." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The oEmbed version number. This value must be `1.0`." + }, + { + "name": "videoUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The URL for an embedded viedo." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The width of the resource specified in the `url` property in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Option", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.MediaItem" + } + ], + "doc": "Media item. Media, associated with option, like image." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "OptionDesign", + "members": [ + { + "name": "borderRadius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "OptionLayout", + "members": [ + { + "name": "enableImage", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether to display option images." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "OrderDetails", + "members": [ + { + "name": "checkoutId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the checkout related to submission (only applicable if a form has payments)." + }, + { + "name": "currency", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Currency." + }, + { + "name": "itemSubtotal", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item subtotal." + }, + { + "name": "number", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Order number." + }, + { + "name": "orderId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the order related to submission (only applicable if a form has payments)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "OrderedListData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PDFSettings", + "members": [ + { + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the PDF download button is disabled." + }, + { + "name": "disablePrint", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the PDF print button is disabled." + }, + { + "name": "viewMode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "PDF view mode. One of the following:\n`NONE` : The PDF isn't displayed.\n`FULL` : A full page view of the PDF is displayed.\n`MINI` : A mini view of the PDF is displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ParagraphData", + "members": [ + { + "name": "indentation", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Indentation level from 1-6." + }, + { + "name": "textStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextStyle" + } + ], + "doc": "Styling for the paragraph text." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Payment", + "members": [ + { + "name": "checkboxGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ProductCheckboxGroup" + } + ], + "doc": "Checkbox group input field." + }, + { + "name": "componentType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Component type of the payment input field." + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PaymentType" + } + ], + "doc": "Validation of payment type." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPaymentComponentTypeOptionsOneOf", + "members": [ + "checkboxGroupOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PaymentComponentTypeOptionsOneOf", + "members": [ + { + "name": "checkboxGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ProductCheckboxGroup" + } + ], + "doc": "Checkbox group input field." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PaymentType", + "members": [ + { + "name": "maxItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum amount of different products." + }, + { + "name": "minItems", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum amount of different products." + }, + { + "name": "products", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Product" + } + ] + } + } + ], + "doc": "Field mapped to products." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Permissions", + "members": [ + { + "name": "allowMultipleVotes", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether one voter can vote multiple times." + }, + { + "name": "view", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets who can view the poll results." + }, + { + "name": "vote", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets who can vote." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PhoneInfo", + "members": [ + { + "name": "tag", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Phone tag." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PlaybackOptions", + "members": [ + { + "name": "autoPlay", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the media will automatically start playing." + }, + { + "name": "playInLoop", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether media's will be looped." + }, + { + "name": "showControls", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether media's controls will be shown." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PluginContainerData", + "members": [ + { + "name": "alignment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The node's alignment within its container." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Height" + } + ], + "doc": "The height of the node when it's displayed." + }, + { + "name": "spoiler", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Spoiler" + } + ], + "doc": "Spoiler cover settings for the node." + }, + { + "name": "textWrap", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerDataWidth" + } + ], + "doc": "The width of the node when it's displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PluginContainerDataWidth", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom width value in pixels." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "One of the following predefined width options:\n`CONTENT`: The width of the container matches the content width.\n`SMALL`: Small width.\n`ORIGINAL`: The width of the container matches the original asset width.\n`FULL_WIDTH`: Full width." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPluginContainerDataWidthDataOneOf", + "members": [ + "custom", + "size" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PluginContainerDataWidthDataOneOf", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A custom width value in pixels." + }, + { + "name": "size", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "One of the following predefined width options:\n`CONTENT`: The width of the container matches the content width.\n`SMALL`: Small width.\n`ORIGINAL`: The width of the container matches the original asset width.\n`FULL_WIDTH`: Full width." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Poll", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll ID." + }, + { + "name": "creatorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll creator ID." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "Main poll image." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.PollOption" + } + ] + } + } + ], + "doc": "Voting options." + }, + { + "name": "settings", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Settings" + } + ], + "doc": "The poll's permissions and display settings." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Poll title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PollData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the poll's container." + }, + { + "name": "design", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Design" + } + ], + "doc": "Styling for the poll and voting options." + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PollDataLayout" + } + ], + "doc": "Layout settings for the poll and voting options." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Poll" + } + ], + "doc": "Poll data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PollDataLayout", + "members": [ + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.OptionLayout" + } + ], + "doc": "Voting otpions layout settings." + }, + { + "name": "poll", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PollLayout" + } + ], + "doc": "Poll layout settings." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PollDesign", + "members": [ + { + "name": "background", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Background" + } + ], + "doc": "Background styling." + }, + { + "name": "borderRadius", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Border radius in pixels." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PollLayout", + "members": [ + { + "name": "direction", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The direction of the text displayed in the voting options. Text can be displayed either right-to-left or left-to-right." + }, + { + "name": "enableImage", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether to display the main poll image." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The layout for displaying the voting options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PollOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option ID." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "The image displayed with the option." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option title." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PostSubmissionTriggers", + "members": [ + { + "name": "upsertContact", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.UpsertContact" + } + ], + "doc": "Upserts a contact from the submission data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PredefinedValidation", + "members": [ + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of predefined validation." + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PaymentType" + } + ], + "doc": "Payment input field." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPredefinedValidationFormatOptionsOneOf", + "members": [ + "paymentOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PredefinedValidationFormatOptionsOneOf", + "members": [ + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PaymentType" + } + ], + "doc": "Payment input field." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Product", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "dynamicPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DynamicPriceOptions" + } + ], + "doc": "Dynamic price options." + }, + { + "name": "fixedPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FixedPriceOptions" + } + ], + "doc": "Fixed price options." + }, + { + "name": "priceType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Price type." + }, + { + "name": "productType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product type." + }, + { + "name": "quantityLimit", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.QuantityLimit" + } + ], + "doc": "Quantity limit." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfProductPriceOptionsOneOf", + "members": [ + "dynamicPriceOptions", + "fixedPriceOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ProductCheckboxGroup", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Description of the field." + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.ProductCheckboxGroupOption" + } + ] + } + } + ], + "doc": "List of options to select from." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ProductCheckboxGroupOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations." + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.MediaItem" + } + ], + "doc": "Media item. Media, associated with option, like image." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Selectable option value, which is saved to DB. Corresponds to product id, found in field's products list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ProductPriceOptionsOneOf", + "members": [ + { + "name": "dynamicPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DynamicPriceOptions" + } + ], + "doc": "Dynamic price options." + }, + { + "name": "fixedPriceOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FixedPriceOptions" + } + ], + "doc": "Fixed price options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PropertiesType", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.IntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.NumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "required", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the property is required." + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.StringType" + } + ], + "doc": "String type validation for property." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPropertiesTypePropertiesTypeOneOf", + "members": [ + "array", + "boolean", + "integer", + "number", + "string" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PropertiesTypePropertiesTypeOneOf", + "members": [ + { + "name": "array", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ArrayType" + } + ], + "doc": "Array type validation for property." + }, + { + "name": "boolean", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BooleanType" + } + ], + "doc": "Boolean type validation for property." + }, + { + "name": "integer", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.IntegerType" + } + ], + "doc": "Integer type validation for property." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.NumberType" + } + ], + "doc": "Number type validation for property." + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.StringType" + } + ], + "doc": "String type validation for property." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuantityLimit", + "members": [ + { + "name": "maximum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum quantity." + }, + { + "name": "minimum", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum quantity." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuerySubmissionOptions", + "members": [ + { + "name": "onlyYourOwn", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuerySubmissionRequest", + "members": [ + { + "name": "onlyYourOwn", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + }, + { + "name": "query", + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuerySubmissionResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ] + } + } + ], + "doc": "The retrieved submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuerySubmissionsByNamespaceForExportRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuerySubmissionsByNamespaceForExportResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ] + } + } + ], + "doc": "The retrieved Submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuerySubmissionsByNamespaceOptions", + "members": [ + { + "name": "onlyYourOwn", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuerySubmissionsByNamespaceRequest", + "members": [ + { + "name": "onlyYourOwn", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + }, + { + "name": "query", + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QuerySubmissionsByNamespaceResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CursorPagingMetadata" + } + ], + "doc": "Paging metadata." + }, + { + "name": "submissions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ] + } + } + ], + "doc": "The retrieved Submissions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RadioGroup", + "members": [ + { + "name": "customOption", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RadioGroupCustomOption" + } + ], + "doc": "Option which can be specified by UoU, enabled when this object is specified." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Description of the field" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of the field" + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.RadioGroupOption" + } + ] + } + } + ], + "doc": "Flag identifying to show option allowing input custom value\nList of options to select from" + }, + { + "name": "showLabel", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying to hide or not label\nDefault: true" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RadioGroupCustomOption", + "members": [ + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Label of custom option input" + }, + { + "name": "placeholder", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Placeholder of custom option input" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RadioGroupOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option id. Used as binding for translations" + }, + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag identifying that option should be selected by default" + }, + { + "name": "label", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option label" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Selectable option value, which is saved to DB." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Redirect", + "members": [ + { + "name": "target", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "How should url be opened" + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Url to which UoU should be redirected after successful submit of form" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Rel", + "members": [ + { + "name": "nofollow", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates to search engine crawlers not to follow the link." + }, + { + "name": "noreferrer", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates that this link protect referral information from being passed to the target website." + }, + { + "name": "sponsored", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement." + }, + { + "name": "ugc", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveSubmissionFromTrashBinRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the submission to restore." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveSubmissionFromTrashBinResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemovedSubmissionFromTrash", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "Removed submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Reschedule", + "members": [ + { + "name": "executeAt", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "" + }, + { + "name": "payload", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RestoreSubmissionFromTrashBinRequest", + "members": [ + { + "name": "submissionId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the submission to restore." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RestoreSubmissionFromTrashBinResponse", + "members": [ + { + "name": "submission", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormSubmission" + } + ], + "doc": "The restored submission." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RichContent", + "members": [ + { + "name": "documentStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DocumentStyle" + } + ], + "doc": "Global styling for header, paragraph, block quote, and code block nodes in the object." + }, + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Metadata" + } + ], + "doc": "Object metadata." + }, + { + "name": "nodes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Node" + } + ] + } + } + ], + "doc": "Node objects representing a rich content document." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RichText", + "members": [ + { + "name": "content", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Content of the rich text field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Section", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Id of the section" + }, + { + "name": "allowedFieldIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "A list of field identifiers that are permitted to be placed within a section.\nThe section will only accept fields with IDs specified in this list.\nIf the section encounters the $new key within the list,\nit allows the inclusion of fields not explicitly listed,\nenabling dynamic addition of new fields." + }, + { + "name": "row", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Horizontal coordinate in the grid." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Settings", + "members": [ + { + "name": "permissions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Permissions" + } + ], + "doc": "Permissions settings for voting." + }, + { + "name": "showVoters", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether voters are displayed in the vote results." + }, + { + "name": "showVotesCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the vote count is displayed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Sorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Spoiler", + "members": [ + { + "name": "buttonText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The text for the button used to remove the spoiler cover." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The description displayed on top of the spoiler cover." + }, + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the spoiler cover is enabled for this node." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Step", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Step ID." + }, + { + "name": "hidden", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Is step hidden" + }, + { + "name": "layout", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.FormLayout" + } + ], + "doc": "Form step properties" + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the step." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "StringErrorMessages", + "members": [ + { + "name": "default", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default error message on invalid validation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "StringType", + "members": [ + { + "name": "dateOptionalTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeConstraints" + } + ], + "doc": "DATE_OPTIONAL_TIME format options" + }, + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeConstraints" + } + ], + "doc": "DATE format options" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeConstraints" + } + ], + "doc": "DATE_TIME format options" + }, + { + "name": "enum", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of allowed values." + }, + { + "name": "errorMessages", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.StringErrorMessages" + } + ], + "doc": "Custom error messages when validation fails." + }, + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Format of a string." + }, + { + "name": "maxLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum length." + }, + { + "name": "minLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum length." + }, + { + "name": "pattern", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pattern for a regular expression match." + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeConstraints" + } + ], + "doc": "TIME format options" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfStringTypeFormatOptionsOneOf", + "members": [ + "dateOptionalTimeOptions", + "dateOptions", + "dateTimeOptions", + "timeOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "StringTypeFormatOptionsOneOf", + "members": [ + { + "name": "dateOptionalTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeConstraints" + } + ], + "doc": "DATE_OPTIONAL_TIME format options" + }, + { + "name": "dateOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeConstraints" + } + ], + "doc": "DATE format options" + }, + { + "name": "dateTimeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeConstraints" + } + ], + "doc": "DATE_TIME format options" + }, + { + "name": "timeOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.DateTimeConstraints" + } + ], + "doc": "TIME format options" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Styles", + "members": [ + { + "name": "border", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Border" + } + ], + "doc": "Border attributes." + }, + { + "name": "colors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Colors" + } + ], + "doc": "Color attributes." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SubmissionContactMapped", + "members": [ + { + "name": "contactId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Mapped upserted contact ID." + }, + { + "name": "emails", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Mapped contact emails." + }, + { + "name": "namespace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the namespace that the submission's form belongs to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SubmissionContactMappingSkipped", + "members": [ + { + "name": "formId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form Id." + }, + { + "name": "namespace", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifies the namespace that the submission's form belongs to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SubmitButton", + "members": [ + { + "name": "nextText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "When button is not on last page it behaves as switch between pages page, text of label to go to next page." + }, + { + "name": "previousText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "When button is not on last page it behaves as switch between pages page, text of label to go to previous page." + }, + { + "name": "redirect", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Redirect" + } + ], + "doc": "Submit action effect is to redirect to" + }, + { + "name": "submitText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text on the button when button is submitting a form" + }, + { + "name": "thankYouMessage", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.ThankYouMessage" + } + ], + "doc": "Submit action effect is to show message" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSubmitButtonSubmitActionOneOf", + "members": [ + "redirect", + "thankYouMessage" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SubmitButtonSubmitActionOneOf", + "members": [ + { + "name": "redirect", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Redirect" + } + ], + "doc": "Submit action effect is to redirect to" + }, { - "name": "entityEventSequence", + "name": "thankYouMessage", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.ThankYouMessage" } ], - "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." - }, + "doc": "Submit action effect is to show message" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SubmitContactResponse", + "members": [ { - "name": "entityFqdn", + "name": "contactId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + "doc": "ID of the contact that was found or created." }, { - "name": "entityId", + "name": "identityType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Assuming that all messages including Actions have id\nExample: The id of the specific order, the id of a specific campaign" + "doc": "Identity type of the returned contact.\n\n- `CONTACT`: The returned contact ID belongs to a new or existing contact.\n- `MEMBER`: The returned contact ID belongs to the currently logged-in site member.\n- `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.\n" }, { - "name": "eventTime", + "name": "newContact", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "boolean" } ], - "doc": "The time of the event. Useful if there was a delay in dispatching" - }, + "doc": "Indicates whether the contact was just created or already existed.\n\nIf the contact was just created, returns `true`.\nIf it already existed, returns `false`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Submitter", + "members": [ { - "name": "originatedFrom", + "name": "applicationId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "If present, indicates the action that triggered the event." + "doc": "Application ID." }, { - "name": "slug", + "name": "memberId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + "doc": "Member ID." }, { - "name": "triggeredByAnonymizeRequest", + "name": "userId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "A field that should be set if this event was triggered by an anonymize request.\nFor example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.\nNOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers." + "doc": "User ID." }, { - "name": "updatedEvent", + "name": "visitorId", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.EntityUpdatedEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "Visitor ID." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfDomainEventBodyOneOf", + "name": "oneOfSubmitterSubmitterOneOf", "members": [ - "actionEvent", - "createdEvent", - "deletedEvent", - "updatedEvent" + "applicationId", + "memberId", + "userId", + "visitorId" ] } ] @@ -1367,47 +13215,47 @@ } }, { - "name": "DomainEventBodyOneOf", + "name": "SubmitterSubmitterOneOf", "members": [ { - "name": "actionEvent", + "name": "applicationId", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.ActionEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "Application ID." }, { - "name": "createdEvent", + "name": "memberId", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.EntityCreatedEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "Member ID." }, { - "name": "deletedEvent", + "name": "userId", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.EntityDeletedEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "User ID." }, { - "name": "updatedEvent", + "name": "visitorId", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.EntityUpdatedEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "Visitor ID." } ], "docs": { @@ -1417,8 +13265,29 @@ } }, { - "name": "Empty", - "members": [], + "name": "TableCellData", + "members": [ + { + "name": "borderColors", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.BorderColors" + } + ], + "doc": "The cell's border colors." + }, + { + "name": "cellStyle", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.CellStyle" + } + ], + "doc": "Styling for the cell's background color and text alignment." + } + ], "docs": { "description": [ "" @@ -1426,10 +13295,90 @@ } }, { - "name": "EntityCreatedEvent", + "name": "TableData", "members": [ { - "name": "entityAsJson", + "name": "columnHeader", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the table's first column is a header." + }, + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the table's container." + }, + { + "name": "dimensions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Dimensions" + } + ], + "doc": "The table's dimensions." + }, + { + "name": "header", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Deprecated: Use `rowHeader` and `columnHeader` instead." + }, + { + "name": "rowHeader", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the table's first row is a header." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Task", + "members": [ + { + "name": "executeAt", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "" + }, + { + "name": "key", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TaskKey" + } + ], + "doc": "" + }, + { + "name": "payload", "optional": true, "type": [ { @@ -1446,8 +13395,51 @@ } }, { - "name": "EntityDeletedEvent", - "members": [], + "name": "TaskAction", + "members": [ + { + "name": "cancel", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Cancel" + } + ], + "doc": "" + }, + { + "name": "complete", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Complete" + } + ], + "doc": "" + }, + { + "name": "reschedule", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Reschedule" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfTaskActionActionOneOf", + "members": [ + "cancel", + "complete", + "reschedule" + ] + } + ] + }, "docs": { "description": [ "" @@ -1455,17 +13447,37 @@ } }, { - "name": "EntityUpdatedEvent", + "name": "TaskActionActionOneOf", "members": [ { - "name": "currentEntityAsJson", + "name": "cancel", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.Cancel" } ], - "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + "doc": "" + }, + { + "name": "complete", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Complete" + } + ], + "doc": "" + }, + { + "name": "reschedule", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Reschedule" + } + ], + "doc": "" } ], "docs": { @@ -1475,153 +13487,171 @@ } }, { - "name": "FormSubmission", + "name": "TaskKey", "members": [ { - "name": "_createdDate", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Date and time the form submission was created." - }, - { - "name": "_id", - "readOnly": true, + "name": "appId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Submission ID." + "doc": "" }, { - "name": "_updatedDate", - "readOnly": true, + "name": "instanceId", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "Date and time the form submission was updated." + "doc": "" }, { - "name": "formId", + "name": "subjectId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the form which submission belongs to." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TextData", + "members": [ { - "name": "namespace", - "readOnly": true, + "name": "decorations", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Decoration" + } + ] + } } ], - "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + "doc": "The decorations to apply." }, { - "name": "revision", - "readOnly": true, + "name": "text", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission." - }, + "doc": "The text to apply decorations to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TextInput", + "members": [ { - "name": "seen", + "name": "description", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-forms-v2.Submissions.RichContent" } ], - "doc": "Whether the submission was read by a site collaborator with permissions to manage submissions." + "doc": "Description of the field" }, { - "name": "status", + "name": "label", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Status of the submission.\n- `PENDING`: When a submission has been created, but has not yet been recorded in the submission table of the forms dashboard.\n- `CONFIRMED`: When a submission is recorded in the submissions table of the forms dashboard." + "doc": "Label of the field" }, { - "name": "submissions", + "name": "placeholder", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "Submission values where key is the form field and value is the data submitted for the given field." + "doc": "Placeholder for the value input" }, { - "name": "submitter", - "readOnly": true, + "name": "showLabel", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.Submitter" + "nativeType": "boolean" } ], - "doc": "ID of the creator of the form submission." + "doc": "Flag identifying to hide or not label\nDefault: true" } ], "docs": { "description": [ - "Form submission that was created or retrieved." + "" ] } }, { - "name": "FormSubmissionsCount", + "name": "TextNodeStyle", "members": [ { - "name": "formId", + "name": "decorations", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-forms-v2.Submissions.Decoration" + } + ] + } } ], - "doc": "Form ID." + "doc": "The decorations to apply to the node." }, { - "name": "totalCount", + "name": "lineHeight", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Total number of submissions." + "doc": "Line height for text in the node." }, { - "name": "unseenCount", + "name": "nodeStyle", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-forms-v2.Submissions.NodeStyle" } ], - "doc": "Number of submissions that haven't yet been seen by site collaborators with manage submission permissions." + "doc": "Padding and background color for the node." } ], "docs": { @@ -1631,34 +13661,27 @@ } }, { - "name": "GetMediaUploadURLRequest", + "name": "TextStyle", "members": [ { - "name": "filename", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Name of file to upload." - }, - { - "name": "formId", + "name": "lineHeight", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Form ID." + "doc": "A CSS `line-height` value for the text as a unitless ratio." }, { - "name": "mimeType", + "name": "textAlignment", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "[Mime type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#) of file to upload.\n\nFor example, `'image/png'`\n" + "doc": "Text alignment. Defaults to `AUTO`." } ], "docs": { @@ -1668,17 +13691,27 @@ } }, { - "name": "GetMediaUploadURLResponse", + "name": "ThankYouMessage", "members": [ { - "name": "uploadUrl", + "name": "duration", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Url to upload file." + "doc": "Duration after how much second it should disappear. If 0, will stay forever.\nDefault: false" + }, + { + "name": "text", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RichContent" + } + ], + "doc": "Message show after form submission" } ], "docs": { @@ -1688,16 +13721,27 @@ } }, { - "name": "GetSubmissionRequest", + "name": "Thumbnails", "members": [ { - "name": "submissionId", + "name": "placement", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the submission to retrieve." + "doc": "Thumbnail alignment." + }, + { + "name": "spacing", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Spacing between thumbnails in pixels." } ], "docs": { @@ -1707,17 +13751,17 @@ } }, { - "name": "GetSubmissionResponse", + "name": "TimeOptions", "members": [ { - "name": "submission", + "name": "use24HourFormat", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "nativeType": "boolean" } ], - "doc": "The retrieved submission." + "doc": "Flag indicating whether to use the 24-hour time format.\nDefault: false." } ], "docs": { @@ -1727,217 +13771,133 @@ } }, { - "name": "Owner", + "name": "UpdateSubmission", "members": [ { - "name": "externalAppId", + "name": "_createdDate", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "External app id" + "doc": "Date and time the form submission was created." }, { - "name": "memberId", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Member ID." + "doc": "Submission ID." }, { - "name": "serviceId", + "name": "_updatedDate", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Service ID." + "doc": "Date and time the form submission was updated." }, { - "name": "userId", + "name": "extendedFields", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.ExtendedFields" } ], - "doc": "User ID." + "doc": "Data extension object that holds users' and apps' fields." }, { - "name": "visitorId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Visitor ID." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfOwnerOwnerOneOf", - "members": [ - "externalAppId", - "memberId", - "serviceId", - "userId", - "visitorId" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "OwnerOwnerOneOf", - "members": [ - { - "name": "externalAppId", + "name": "formId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "External app id" + "doc": "ID of the form which the submission belongs to." }, { - "name": "memberId", + "name": "namespace", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Member ID." + "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms app is `wix.form_app.form`. Call `Get Submission` to retrieve the namespace." }, { - "name": "serviceId", + "name": "orderDetails", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.OrderDetails" } ], - "doc": "Service ID." + "doc": "Order details.
\nNote: This object is only applicable when submittng a form in the Wix Payments app." }, { - "name": "userId", + "name": "revision", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "User ID." + "doc": "Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission." }, { - "name": "visitorId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Visitor ID." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QuerySubmissionOptions", - "members": [ - { - "name": "onlyYourOwn", + "name": "seen", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QuerySubmissionRequest", - "members": [ + "doc": "Whether a site owner marked a submission as \"seen\"." + }, { - "name": "onlyYourOwn", + "name": "status", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + "doc": "Status of the submission.\n- `PENDING`: A submission is created, but has not yet been recorded in the Wix Forms collection.\n- `PAYMENT_WAITING`: A form submission requiring payment is created.\n- `PAYMENT_CANCELED`: An order of a form submission is canceled.\n- `CONFIRMED`: A submission is recorded in the Wix Forms collection." }, { - "name": "query", - "type": [ - { - "referenceType": "wix-forms-v2.Submissions.CursorQuery" - } - ], - "doc": "Query options." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QuerySubmissionResponse", - "members": [ - { - "name": "metadata", + "name": "submissions", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.CursorPagingMetadata" + "nativeType": "Object" } ], - "doc": "Paging metadata." + "doc": "Submission values where `key` is the form field and `value` is the data submitted for the given field." }, { - "name": "submissions", + "name": "submitter", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" - } - ] - } + "referenceType": "wix-forms-v2.Submissions.Submitter" } ], - "doc": "The retrieved submissions." + "doc": "ID of the visitor that submitted the form." } ], "docs": { @@ -1947,17 +13907,25 @@ } }, { - "name": "QuerySubmissionsByNamespaceOptions", + "name": "UpdateSubmissionOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateSubmissionRequest", "members": [ { - "name": "onlyYourOwn", - "optional": true, + "name": "submission", "type": [ { - "nativeType": "boolean" + "referenceType": "wix-forms-v2.Submissions.FormSubmission" } ], - "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." + "doc": "Submission to update." } ], "docs": { @@ -1967,26 +13935,17 @@ } }, { - "name": "QuerySubmissionsByNamespaceRequest", + "name": "UpdateSubmissionResponse", "members": [ { - "name": "onlyYourOwn", + "name": "submission", "optional": true, "type": [ { - "nativeType": "boolean" - } - ], - "doc": "Whether to return only your own submissions. If `false`, returns all submissions based on query filters." - }, - { - "name": "query", - "type": [ - { - "referenceType": "wix-forms-v2.Submissions.CursorQuery" + "referenceType": "wix-forms-v2.Submissions.FormSubmission" } ], - "doc": "Query options." + "doc": "The updated submission." } ], "docs": { @@ -1996,20 +13955,30 @@ } }, { - "name": "QuerySubmissionsByNamespaceResponse", + "name": "UpsertContact", "members": [ { - "name": "metadata", + "name": "fieldsMapping", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.CursorPagingMetadata" + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-forms-v2.Submissions.FormFieldContactInfo" + } + ] + } } ], - "doc": "Paging metadata." + "doc": "Fields mapping (target field mapped to corresponding contact field)." }, { - "name": "submissions", + "name": "labels", "optional": true, "type": [ { @@ -2017,13 +13986,13 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "nativeType": "string" } ] } } ], - "doc": "The retrieved Submissions." + "doc": "List of contact label keys.\n[Contact labels](https://support.wix.com/en/article/adding-labels-to-contacts-in-your-contact-list)\nhelp categorize contacts." } ], "docs": { @@ -2033,27 +14002,27 @@ } }, { - "name": "Reschedule", + "name": "UpsertContactFromSubmissionOptions", "members": [ { - "name": "executeAt", + "name": "contactId", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "" + "doc": "Optional contact id to which submission should be mapped." }, { - "name": "payload", + "name": "emailVerified", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Indicates contact has verified primary email." } ], "docs": { @@ -2063,27 +14032,36 @@ } }, { - "name": "Sorting", + "name": "UpsertContactFromSubmissionRequest", "members": [ { - "name": "fieldName", + "name": "contactId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Name of the field to sort by." + "doc": "Optional contact id to which submission should be mapped." }, { - "name": "order", + "name": "emailVerified", "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates contact has verified primary email." + }, + { + "name": "submissionId", "type": [ { "nativeType": "string" } ], - "doc": "Sort order." + "doc": "Submission from which contact needs to be upserted." } ], "docs": { @@ -2093,46 +14071,17 @@ } }, { - "name": "SubmissionContactMapped", + "name": "UpsertContactFromSubmissionResponse", "members": [ { - "name": "contactId", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Mapped upserted contact ID." - }, - { - "name": "emails", - "readOnly": true, - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Mapped contact emails." - }, - { - "name": "namespace", + "name": "submitContactResponse", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.SubmitContactResponse" } ], - "doc": "Identifies the namespace that the submission's form belongs to." + "doc": "Submit contact response." } ], "docs": { @@ -2142,109 +14091,101 @@ } }, { - "name": "SubmitContactResponse", + "name": "Validation", "members": [ { - "name": "contactId", + "name": "array", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.ArrayType" } ], - "doc": "ID of the contact that was found or created." + "doc": "Validation of array type." }, { - "name": "identityType", + "name": "boolean", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.BooleanType" } ], - "doc": "Identity type of the returned contact.\n\n- `CONTACT`: The returned contact ID belongs to a new or existing contact.\n- `MEMBER`: The returned contact ID belongs to the currently logged-in site member.\n- `NOT_AUTHENTICATED_MEMBER`: The returned contact ID belongs to a site member who is not currently logged in.\n" + "doc": "Validation of boolean type." }, { - "name": "newContact", + "name": "integer", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-forms-v2.Submissions.IntegerType" } ], - "doc": "Indicates whether the contact was just created or already existed.\n\nIf the contact was just created, returns `true`.\nIf it already existed, returns `false`.\n" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Submitter", - "members": [ + "doc": "Validation of integer type." + }, { - "name": "externalAppId", + "name": "number", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.NumberType" } ], - "doc": "App ID." + "doc": "Validation of number type." }, { - "name": "memberId", + "name": "object", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.ObjectType" } ], - "doc": "Member ID." + "doc": "Validation of object type." }, { - "name": "serviceId", + "name": "predefined", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.PredefinedValidation" } ], - "doc": "Service ID." + "doc": "Predefined validation of specific format" }, { - "name": "userId", + "name": "required", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "User ID." + "doc": "Whether the field is required." }, { - "name": "visitorId", + "name": "string", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.StringType" } ], - "doc": "Visitor ID." + "doc": "Validation of string type." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfSubmitterSubmitterOneOf", + "name": "oneOfValidationValidationOneOf", "members": [ - "externalAppId", - "memberId", - "serviceId", - "userId", - "visitorId" + "array", + "boolean", + "integer", + "number", + "object", + "predefined", + "string" ] } ] @@ -2256,57 +14197,77 @@ } }, { - "name": "SubmitterSubmitterOneOf", + "name": "ValidationValidationOneOf", "members": [ { - "name": "externalAppId", + "name": "array", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.ArrayType" } ], - "doc": "App ID." + "doc": "Validation of array type." }, { - "name": "memberId", + "name": "boolean", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.BooleanType" } ], - "doc": "Member ID." + "doc": "Validation of boolean type." }, { - "name": "serviceId", + "name": "integer", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.IntegerType" } ], - "doc": "Service ID." + "doc": "Validation of integer type." }, { - "name": "userId", + "name": "number", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.NumberType" } ], - "doc": "User ID." + "doc": "Validation of number type." }, { - "name": "visitorId", + "name": "object", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.ObjectType" } ], - "doc": "Visitor ID." + "doc": "Validation of object type." + }, + { + "name": "predefined", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PredefinedValidation" + } + ], + "doc": "Predefined validation of specific format" + }, + { + "name": "string", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.StringType" + } + ], + "doc": "Validation of string type." } ], "docs": { @@ -2316,37 +14277,97 @@ } }, { - "name": "Task", + "name": "Video", "members": [ { - "name": "executeAt", + "name": "media", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-forms-v2.Submissions.Media" } ], - "doc": "" + "doc": "Video file details." }, { - "name": "key", + "name": "thumbnail", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.TaskKey" + "referenceType": "wix-forms-v2.Submissions.Media" } ], - "doc": "" + "doc": "Video thumbnail file details." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "VideoData", + "members": [ + { + "name": "containerData", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PluginContainerData" + } + ], + "doc": "Styling for the video's container." }, { - "name": "payload", + "name": "disableDownload", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Sets whether the video's download button is disabled." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.PlaybackOptions" + } + ], + "doc": "Video options." + }, + { + "name": "thumbnail", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Media" + } + ], + "doc": "Video thumbnail details." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Video title." + }, + { + "name": "video", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.Media" } ], - "doc": "" + "doc": "Video details." } ], "docs": { @@ -2356,47 +14377,36 @@ } }, { - "name": "TaskAction", + "name": "WixFile", "members": [ { - "name": "cancel", - "optional": true, - "type": [ - { - "referenceType": "wix-forms-v2.Submissions.Cancel" - } - ], - "doc": "" - }, - { - "name": "complete", + "name": "componentType", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.Complete" + "nativeType": "string" } ], - "doc": "" + "doc": "Component type of the array input field" }, { - "name": "reschedule", + "name": "fileUploadOptions", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.Reschedule" + "referenceType": "wix-forms-v2.Submissions.FileUpload" } ], - "doc": "" + "doc": "File upload input field" } ], "extra": { "oneOfGroups": [ { - "name": "oneOfTaskActionActionOneOf", + "name": "oneOfWixFileComponentTypeOptionsOneOf", "members": [ - "cancel", - "complete", - "reschedule" + "fileUploadOptions" ] } ] @@ -2408,37 +14418,17 @@ } }, { - "name": "TaskActionActionOneOf", + "name": "WixFileComponentTypeOptionsOneOf", "members": [ { - "name": "cancel", - "optional": true, - "type": [ - { - "referenceType": "wix-forms-v2.Submissions.Cancel" - } - ], - "doc": "" - }, - { - "name": "complete", - "optional": true, - "type": [ - { - "referenceType": "wix-forms-v2.Submissions.Complete" - } - ], - "doc": "" - }, - { - "name": "reschedule", + "name": "fileUploadOptions", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.Reschedule" + "referenceType": "wix-forms-v2.Submissions.FileUpload" } ], - "doc": "" + "doc": "File upload input field" } ], "docs": { @@ -2448,39 +14438,50 @@ } }, { - "name": "TaskKey", + "name": "_Array", "members": [ { - "name": "appId", + "name": "checkboxGroupOptions", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.CheckboxGroup" } ], - "doc": "" + "doc": "Checkbox group input field" }, { - "name": "instanceId", + "name": "componentType", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Component type of the array input field" }, { - "name": "subjectId", + "name": "validation", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.InputFieldArrayType" } ], - "doc": "" + "doc": "Validation of array type." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOf_ArrayComponentTypeOptionsOneOf", + "members": [ + "checkboxGroupOptions" + ] + } + ] + }, "docs": { "description": [ "" @@ -2488,53 +14489,40 @@ } }, { - "name": "UpdateSubmission", + "name": "_ArrayComponentTypeOptionsOneOf", "members": [ { - "name": "_createdDate", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Date and time the form submission was created." - }, - { - "name": "_id", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Submission ID." - }, - { - "name": "_updatedDate", - "readOnly": true, + "name": "checkboxGroupOptions", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-forms-v2.Submissions.CheckboxGroup" } ], - "doc": "Date and time the form submission was updated." - }, + "doc": "Checkbox group input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "_Boolean", + "members": [ { - "name": "formId", + "name": "checkboxOptions", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.Checkbox" } ], - "doc": "ID of the form which submission belongs to." + "doc": "Checkbox input field" }, { - "name": "namespace", + "name": "componentType", "readOnly": true, "optional": true, "type": [ @@ -2542,61 +14530,100 @@ "nativeType": "string" } ], - "doc": "The app which the form submissions belong to. For example, the namespace for the Wix Forms App is `\"wix.form_app.form\"`. The namespace of a submission can be retrieved using the Get Submission endpoint." + "doc": "Component type of the boolean input field" }, { - "name": "revision", - "readOnly": true, + "name": "validation", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.InputFieldBooleanType" } ], - "doc": "Revision number, which increments by 1 each time the form submission is updated. To prevent conflicting changes, the existing revision must be used when updating a form submission." - }, + "doc": "Validation of field output value." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOf_BooleanComponentTypeOptionsOneOf", + "members": [ + "checkboxOptions" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "_BooleanComponentTypeOptionsOneOf", + "members": [ { - "name": "seen", + "name": "checkboxOptions", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-forms-v2.Submissions.Checkbox" } ], - "doc": "Whether the submission was read by a site collaborator with permissions to manage submissions." - }, + "doc": "Checkbox input field" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "_Number", + "members": [ { - "name": "status", + "name": "componentType", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Status of the submission.\n- `PENDING`: When a submission has been created, but has not yet been recorded in the submission table of the forms dashboard.\n- `CONFIRMED`: When a submission is recorded in the submissions table of the forms dashboard." + "doc": "Component type of the number input field" }, { - "name": "submissions", + "name": "numberInputOptions", "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-forms-v2.Submissions.NumberInput" } ], - "doc": "Submission values where key is the form field and value is the data submitted for the given field." + "doc": "Number value input field" }, { - "name": "submitter", - "readOnly": true, + "name": "validation", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.Submitter" + "referenceType": "wix-forms-v2.Submissions.InputFieldNumberType" } ], - "doc": "ID of the creator of the form submission." + "doc": "Validation of field output value." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOf_NumberComponentTypeOptionsOneOf", + "members": [ + "numberInputOptions" + ] + } + ] + }, "docs": { "description": [ "" @@ -2604,8 +14631,19 @@ } }, { - "name": "UpdateSubmissionOptions", - "members": [], + "name": "_NumberComponentTypeOptionsOneOf", + "members": [ + { + "name": "numberInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.NumberInput" + } + ], + "doc": "Number value input field" + } + ], "docs": { "description": [ "" @@ -2613,18 +14651,30 @@ } }, { - "name": "UpdateSubmissionRequest", + "name": "_Object", "members": [ { - "name": "submission", + "name": "object", + "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "referenceType": "wix-forms-v2.Submissions.InputFieldObjectType" } ], - "doc": "Submission to update." + "doc": "Validation of object type." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOf_ObjectValidationOneOf", + "members": [ + "nestedFormId", + "object" + ] + } + ] + }, "docs": { "description": [ "" @@ -2632,17 +14682,17 @@ } }, { - "name": "UpdateSubmissionResponse", + "name": "_ObjectValidationOneOf", "members": [ { - "name": "submission", + "name": "object", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.FormSubmission" + "referenceType": "wix-forms-v2.Submissions.InputFieldObjectType" } ], - "doc": "The updated submission." + "doc": "Validation of object type." } ], "docs": { @@ -2652,68 +14702,83 @@ } }, { - "name": "UpsertContactFromSubmissionOptions", + "name": "_String", "members": [ { - "name": "contactId", + "name": "componentType", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Optional contact id to which submission should be mapped." + "doc": "Component type of the string input field" }, { - "name": "emailVerified", + "name": "dateTimeOptions", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-forms-v2.Submissions.DateTimeInput" } ], - "doc": "Indicates contact has verified primary email." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "UpsertContactFromSubmissionRequest", - "members": [ + "doc": "Field for selecting date and/or time" + }, { - "name": "contactId", + "name": "dropdownOptions", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.Dropdown" } ], - "doc": "Optional contact id to which submission should be mapped." + "doc": "Selection field as drop down" }, { - "name": "emailVerified", + "name": "radioGroupOptions", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-forms-v2.Submissions.RadioGroup" } ], - "doc": "Indicates contact has verified primary email." + "doc": "Selection field as radio group" }, { - "name": "submissionId", + "name": "textInputOptions", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-forms-v2.Submissions.TextInput" } ], - "doc": "Submission from which contact needs to be upserted." + "doc": "Text input field" + }, + { + "name": "validation", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.InputFieldStringType" + } + ], + "doc": "Validation of field output value." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOf_StringComponentTypeOptionsOneOf", + "members": [ + "dateTimeOptions", + "dropdownOptions", + "radioGroupOptions", + "textInputOptions" + ] + } + ] + }, "docs": { "description": [ "" @@ -2721,17 +14786,47 @@ } }, { - "name": "UpsertContactFromSubmissionResponse", + "name": "_StringComponentTypeOptionsOneOf", "members": [ { - "name": "submitContactResponse", + "name": "dateTimeOptions", "optional": true, "type": [ { - "referenceType": "wix-forms-v2.Submissions.SubmitContactResponse" + "referenceType": "wix-forms-v2.Submissions.DateTimeInput" } ], - "doc": "Submit contact response." + "doc": "Field for selecting date and/or time" + }, + { + "name": "dropdownOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.Dropdown" + } + ], + "doc": "Selection field as drop down" + }, + { + "name": "radioGroupOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.RadioGroup" + } + ], + "doc": "Selection field as radio group" + }, + { + "name": "textInputOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.TextInput" + } + ], + "doc": "Text input field" } ], "docs": { diff --git a/wix-forms-v2/wix-forms-v2/Submissions/SubmissionsQueryBuilder.service.json b/wix-forms-v2/wix-forms-v2/Submissions/SubmissionsQueryBuilder.service.json index 87d2b206a6..34cfaf3cf0 100644 --- a/wix-forms-v2/wix-forms-v2/Submissions/SubmissionsQueryBuilder.service.json +++ b/wix-forms-v2/wix-forms-v2/Submissions/SubmissionsQueryBuilder.service.json @@ -89,11 +89,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "ascending" }, { @@ -176,11 +171,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "descending" }, { @@ -203,7 +193,7 @@ "nativeType": "any" } ], - "doc": "Value to compare against.", + "doc": "Value to compare against.\n", "required": false } ], @@ -262,11 +252,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "eq" }, { @@ -330,15 +315,10 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "find" }, { - "name": "gt", + "name": "ge", "params": [ { "name": "propertyName", @@ -357,7 +337,7 @@ "nativeType": "any" } ], - "doc": "Value to compare against.", + "doc": "Value to compare against.\n", "required": false } ], @@ -374,11 +354,45 @@ "description": [] }, "isVeloEvent": false, - "customLabels": [ + "syntaxName": "ge" + }, + { + "name": "gt", + "params": [ { - "id": "maturity-beta" + "name": "propertyName", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Property whose value is compared with `value`.", + "required": false + }, + { + "name": "value", + "type": [ + { + "nativeType": "any" + } + ], + "doc": "Value to compare against.\n", + "required": false } ], + "requiredFields": [], + "ret": { + "type": [ + { + "referenceType": "wix-forms-v2.Submissions.SubmissionsQueryBuilder" + } + ], + "doc": null + }, + "docs": { + "description": [] + }, + "isVeloEvent": false, "syntaxName": "gt" }, { @@ -415,58 +429,9 @@ "doc": null }, "docs": { - "summary": "Refines a query to only match items where the specified property conatins any of the values in the provided array of values.", - "description": [ - "The `in()` function refines a `SubmissionsQueryBuilder` to match only items where the specified `propertyName` is equal to any of the values in the provided array.", - "Matching strings with `in()` is case-sensitive, so `'text'` isn't equal to `'Text'`." - ], - "examples": [ - { - "title": "Add an `in` filter to a query", - "body": [ - "const query = submissions.querySubmissionsByNamespace.in(", - " ['labelIds', 'colors'],", - " ['red', 'blue', 'purple']", - ");", - "" - ] - }, - { - "title": "Create a query, add an `in` filter, and run it", - "body": [ - "import { submissions } from 'wix-forms.v2';", - "", - "export async function myQueryFunction() {", - " const results = await submissions", - " .querySubmissionsByNamespace()", - " .in(['labelIds', 'colors'], ['red', 'blue', 'purple'])", - " .find();", - "", - " if (results.items.length > 0) {", - " const items = results.items;", - " const firstItem = items[0];", - " const pageSize = results.pageSize;", - " const hasNext = results.hasNext();", - " const hasPrev = results.hasPrev();", - " const length = results.length;", - " const query = results.query;", - "", - " return items;", - " } else {", - " // Handle if no matching items found", - " }", - "}", - "" - ] - } - ] + "description": [] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "in" }, { @@ -489,7 +454,7 @@ "nativeType": "any" } ], - "doc": "Value to compare against.", + "doc": "Value to compare against.\n", "required": false } ], @@ -506,11 +471,6 @@ "description": [] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "le" }, { @@ -581,11 +541,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "limit" }, { @@ -608,7 +563,7 @@ "nativeType": "any" } ], - "doc": "Value to compare against.", + "doc": "Value to compare against.\n", "required": false } ], @@ -625,11 +580,6 @@ "description": [] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "lt" }, { @@ -652,7 +602,7 @@ "nativeType": "any" } ], - "doc": "Value to compare against.", + "doc": "Value to compare against.\n", "required": false } ], @@ -666,59 +616,9 @@ "doc": null }, "docs": { - "summary": "Refines a query to match items where the specified property doesn't equal the specified value.", - "description": [ - "The `ne()` function refines a `SubmissionsQueryBuilder` to match only items where the value of the specified `propertyName` doesn't equal the specified `value`.", - "`ne()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", - "Matching strings with `ne()` is case-sensitive, so `'text'` isn't equal to `'Text'`." - ], - "examples": [ - { - "title": "Add an `ne` filter to a query", - "body": [ - "const query = submissions.querySubmissionsByNamespace.ne(", - " '_id',", - " 'bb19b637-74ce-55d3-ae32-430b588051da'", - ");", - "" - ] - }, - { - "title": "Create a query, add an `ne` filter, and run it", - "body": [ - "import { submissions } from 'wix-forms.v2';", - "", - "export async function myQueryFunction() {", - " const results = await submissions", - " .querySubmissionsByNamespace()", - " .ne('_id', 'bb19b637-74ce-55d3-ae32-430b588051da')", - " .find();", - "", - " if (results.items.length > 0) {", - " const items = results.items;", - " const firstItem = items[0];", - " const pageSize = results.pageSize;", - " const hasNext = results.hasNext();", - " const hasPrev = results.hasPrev();", - " const length = results.length;", - " const query = results.query;", - "", - " return items;", - " } else {", - " // Handle if no matching items found", - " }", - "}", - "" - ] - } - ] + "description": [] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "ne" }, { @@ -783,11 +683,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "skipTo" } ], diff --git a/wix-forms-v2/wix-forms-v2/Submissions/guides/submissions-intro.md b/wix-forms-v2/wix-forms-v2/Submissions/guides/submissions-intro.md index bf885881ab..2aead1e894 100644 --- a/wix-forms-v2/wix-forms-v2/Submissions/guides/submissions-intro.md +++ b/wix-forms-v2/wix-forms-v2/Submissions/guides/submissions-intro.md @@ -4,40 +4,47 @@ title: Introduction # Introduction -  - -
- Developer Preview -
- APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.
-
- -  - -The Form Submissions API allows you to create and manage the submissions made on a form. +The Submissions API allows you to create and manage the submissions made on a form. -With the Form Submissions API, you can: +With the Submissions API, you can: - [Query](wix-forms-v2/submissions/querysubmissionsbynamespace) and [manage](wix-forms-v2/submissions/createsubmission) a submission. - [Retrieve](wix-forms-v2/submissions/countsubmission) the total number of submissions per form. - [Confirm](wix-forms-v2/submissions/confirmsubmission) a submission or [mark](wix-forms-v2/submissions/bulkmarksubmissionsasseen) submissions as seen. - Retrieve a [media upload file](wix-forms-v2/submissions/getmediauploadurl) URL to use in a submission for forms that include a field for uploading files. +## Submission lifecycle -To use the Form Submissions API, import `{ submissions }` from the `wix-forms.v2` module. - -```javascript -import { submissions } from 'wix-forms.v2'; -``` +When submitting a form: +1. Call the [`createSubmission()`](https://www.wix.com/velo/reference/wix-forms-v2/submissions/createsubmission) function and pass the form field values of a particular form. +1. `createSubmission()` forwards the form field values to the server. +1. The server proceeds to validate the submission: + If the validation is successful: + 1. `createSubmission()` submits the form. + 1. Records the submission into the WixForms collection. + If the validation fails: + 1. The server throws an error, which is then passed to the API. + 1. The submission process is aborted. + ## Before you begin It’s important to note the following points before starting to code: -- You must first have a form on your site in order to manage form submissions. +- The Submissions API is only available in Wix Studio and Editor X. +- There are several apps that use forms: + - Wix Forms: site visitors can submit their contact information to send message to a company, or to subscribe to a newsletter. + - Wix Pricing Plans: forms can be used for online orders, site visitors can submit their contact info and address during the checkout. + - Wix Online Programs: forms can be used as quizzes. +- You must first have a form on your site in order to manage Submissions. +- To use the Submissions API, import `{ submissions }` from the `wix-forms.v2` module. + +```javascript +import { submissions } from 'wix-forms.v2'; +``` ## Terminology diff --git a/wix-media-v2/wix-media-v2/Events.service.json b/wix-media-v2/wix-media-v2/Events.service.json index e31135963c..6887011187 100644 --- a/wix-media-v2/wix-media-v2/Events.service.json +++ b/wix-media-v2/wix-media-v2/Events.service.json @@ -98,7 +98,7 @@ "doc": null }, "docs": { - "summary": "Triggered when a file fails during essential post-upload processing.", + "summary": "Triggered when a file fails during post-upload processing.", "description": [], "examples": [ { @@ -117,14 +117,14 @@ " ", "/* Full event object:", " * {", + " * \"data\": {", + " * \"externalInfo\": {}", + " * },", " * \"metadata\": {", " * \"entityId\": \"d4dde1_f6660fb1274c41bf87514db2f5926ae0\",", " * \"eventTime\": \"2023-09-18T10:27:33.046Z\",", " * \"id\": \"8cf0189d-9f49-45c5-9f3c-bc7928a42e34\",", " * \"triggeredByAnonymizeRequest\": false", - " * },", - " * \"data\": {", - " * \"externalInfo\": {}", " * }", " * }", " */" @@ -171,18 +171,18 @@ ], "examples": [ { - "title": "An event that triggers when a file is ready to be used, after any post-upload processing", + "title": "An event that triggers when a file is ready to be used", "body": [ "// Place this code in the events.js file", "// of your site's Backend section.", "// Add the file if it doesn't exist.", "", "export function wixMediaSiteMedia_onFileDescriptorFileReady(event) {", - " const fileName = event.data.file.displayName;", + " const displayName = event.data.file.displayName;", " const parentFolderId = event.data.parentFolderId;", " const eventTime = event.metadata.eventTime;", "", - " console.log(`${fileName}, located in the parent folder with ID ${parentFolderId}, is ready to be used. Completion of post-upload processing was at ${eventTime}.`)", + " console.log(`${displayName}, located in the parent folder with ID ${parentFolderId}, is ready to be used. Completion of post-upload processing was at ${eventTime}.`)", "}", "", "/* Full event object:", @@ -359,20 +359,14 @@ "", "export function wixMediaSiteMedia_onFileDescriptorUpdated(event) {", " const eventTime = event.metadata.eventTime;", - " const fileName = event.entity.displayName;", + " const displayName = event.entity.displayName;", " const parentFolder = event.entity.parentFolderId;", " ", - " console.log(`${fileName}, currently located in the parent folder with ID ${parentFolder}, was updated at ${eventTime}.`)", + " console.log(`${displayName}, currently located in the parent folder with ID ${parentFolder}, was updated at ${eventTime}.`)", "}", "", "/* Full event object:", " * {", - " * \"metadata\": {", - " * \"id\": \"acfe4b7a-bc6a-41f5-8fb3-d0f1301fea51\",", - " * \"entityId\": \"d4dde1_e76448de45bf4deb912b373bc7c3ac6f~mv2.jpg\",", - " * \"eventTime\": \"2023-09-18T10:22:39.193Z\",", - " * \"triggeredByAnonymizeRequest\": false", - " * },", " * \"entity\": {", " * \"displayName\": \"image1\",", " * \"mediaType\": \"IMAGE\",", @@ -475,6 +469,12 @@ " * \"faces\": []", " * }", " * },", + " * \"metadata\": {", + " * \"entityId\": \"d4dde1_e76448de45bf4deb912b373bc7c3ac6f~mv2.jpg\",", + " * \"eventTime\": \"2023-09-18T10:22:39.193Z\",", + " * \"id\": \"acfe4b7a-bc6a-41f5-8fb3-d0f1301fea51\",", + " * \"triggeredByAnonymizeRequest\": false", + " * },", " * \"siteId\": \"c96bcd13-173a-4938-88e0-a126391adf49\",", " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/d4dde1_e76448de45bf4deb912b373bc7c3ac6f~mv2.jpg\",", " * \"parentFolderId\": \"b2bc72834460412494c93617d88b8c89\"", @@ -3275,6 +3275,26 @@ ] } }, + { + "name": "mediaSiteMediaV1FileDescriptorActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "mediaSiteMediaV1FileDescriptorApplicationError", "members": [ @@ -3907,7 +3927,7 @@ "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { "name": "limit", @@ -3917,7 +3937,7 @@ "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -3937,7 +3957,208 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FileDescriptorDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FileDescriptorActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FileDescriptorEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FileDescriptorEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FileDescriptorEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FileDescriptorDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FileDescriptorActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FileDescriptorEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FileDescriptorEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FileDescriptorEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" } ], "docs": { @@ -3976,6 +4197,66 @@ ] } }, + { + "name": "mediaSiteMediaV1FileDescriptorEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FileDescriptorEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FileDescriptorEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "mediaSiteMediaV1FileDescriptorExternalInfo", "members": [ @@ -5845,7 +6126,7 @@ "nativeType": "number" } ], - "doc": "Total number of items that match the query." + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." } ], "docs": { @@ -6131,7 +6412,7 @@ "nativeType": "string" } ], - "doc": "Video format\nPossible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'\n'720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm' ]" + "doc": "Video format\nPossible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'\n'720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ]" }, { "name": "height", @@ -6170,6 +6451,26 @@ ] } }, + { + "name": "mediaSiteMediaV1FolderActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "mediaSiteMediaV1FolderBackendEventMetadata", "members": [ @@ -6357,7 +6658,7 @@ "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { "name": "limit", @@ -6367,7 +6668,7 @@ "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -6387,7 +6688,268 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FolderDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FolderActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FolderEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FolderEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FolderEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FolderDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FolderActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FolderEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FolderEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Events.mediaSiteMediaV1FolderEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FolderEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FolderEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "mediaSiteMediaV1FolderEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], "docs": { @@ -6812,7 +7374,7 @@ "nativeType": "number" } ], - "doc": "Total number of items that match the query." + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." } ], "docs": { diff --git a/wix-media-v2/wix-media-v2/Files.service.json b/wix-media-v2/wix-media-v2/Files.service.json index 35646bfe6a..34bb45204d 100644 --- a/wix-media-v2/wix-media-v2/Files.service.json +++ b/wix-media-v2/wix-media-v2/Files.service.json @@ -65,10 +65,9 @@ ], "examples": [ { - "title": "Bulk delete files", + "title": "Bulk delete files (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample fileIds value: ", " * [", @@ -84,6 +83,41 @@ "", "async function myBulkDeleteFilesFunction(fileIds, options) {", " try {", + " await files.bulkDeleteFiles(fileIds, options);", + "", + " console.log('Permanently deleted files.');", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */", + "" + ] + }, + { + "title": "Bulk delete files (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample fileIds value: ", + " * [", + " * 'w8ide0_v12i2pi4549locqdfeb5yy5b8iyh39az.pdf',", + " * 'w8ide0_ye3x8yyf5izwe01ovn682pa76bzrrcyt.pdf'", + " * ]", + " * ", + " * Sample options value:", + " * {", + " * permanent: true", + " * }", + " */", + "", + "export const myBulkDeleteFilesFunction = webMethod(Permissions.Anyone, async (fileIds, options) => {", + " try {", " const elevatedBulkDeleteFiles = elevate(files.bulkDeleteFiles);", " await elevatedBulkDeleteFiles(fileIds, options);", "", @@ -93,7 +127,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to void */" ] @@ -101,52 +135,53 @@ { "title": "Bulk delete all files found in a chosen folder ", "body": [ - "/****************************************", - " * Backend code - bulk-delete-files.jsw *", - " ***************************************/", + "/*******************************************", + " * Backend code - bulk-delete-files.web.js *", + " ******************************************/", "", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-business-tools.v2';", "import { elevate } from 'wix-auth';", "", - "export async function deleteFiles (fileIds, options) {", + "export const deleteFiles = webMethod(Permissions.Anyone, async (fileIds, options) => {", " try {", - " const elevatedBulkDeleteFiles = elevate(files.bulkDeleteFiles) ", - " await elevatedBulkDeleteFiles(fileIds, options); ", + " const elevatedBulkDeleteFiles = elevate(files.bulkDeleteFiles);", + " await elevatedBulkDeleteFiles(fileIds, options);", "", " console.log(`Permanently deleted files with ids: ${fileIds.toString()}.`);", " return true;", " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", - "export async function searchFileIds (parentFolderId) {", + "export const searchFileIds = webMethod(Permissions.Anyone, async (parentFolderId) => {", " try {", - " const options = { parentFolder: parentFolderId}", - " const elevatedSearchFiles = elevate(files.searchFiles) ", - " const returnedFiles = await elevatedSearchFiles(options); ", + " const options = { parentFolder: parentFolderId };", + " const elevatedSearchFiles = elevate(files.searchFiles);", + " const returnedFiles = await elevatedSearchFiles(options);", "", " const fileIds = returnedFiles.map((file) => {", - " return file._id", + " return file._id;", " });", "", " return fileIds;", " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", "", "/*************", " * Page code *", " ************/", "", - "import { deleteFiles, searchFileIds } from 'backend/bulk-delete-files';", + "import { deleteFiles, searchFileIds } from 'backend/bulk-delete-files.web';", "", "$w.onReady(() => {", " $w('#delete').onClick(async () => {", " const isDeletePermanently = $w('#deletePermanently').checked;", - " const options = {permanent: isDeletePermanently};", + " const options = { permanent: isDeletePermanently };", "", " const parentFolder = $w('#parentFolder').value;", " const fileIds = await searchFileIds(parentFolder);", @@ -154,7 +189,8 @@ " await deleteFiles(fileIds, options);", " $w('#successMessage').show();", " });", - "});" + "});", + "" ], "extra": { "description": "This code shows a page where the visitor chooses a folder by typing the folder's name in an input box, and then all the files in the chosen folder are deleted. Only visitors with permission to manage the site's media would have access to this page." @@ -163,11 +199,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "bulkDeleteFiles", "isAdminMethod": true }, @@ -224,14 +255,13 @@ "docs": { "summary": "Imports a bulk of files to the Media Manager using external urls.", "description": [ - "The `bulkImportFile()` function returns a Promise that resolves to an object containing bulk import metadata and an array of imported files' descriptors and metadata.\n\nReturns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.\nIf no folder is specified, the file is imported to the `media-root` folder.\n\nTo import a file, you need to pass one of the following:\n- The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.\n- The file's name and extension. For example, `'my-image.png'`.\n- If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request." + "The `bulkImportFile()` function returns a Promise that resolves to an object containing bulk import metadata and an array of imported files' descriptors and metadata.\n\nReturns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.\nIf no folder is specified, the file is imported to the `media-root` folder.\n\nTo import files, you need to do one of the following for each file:\n- Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.\n- Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.\n- Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.\n > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`." ], "examples": [ { - "title": "Bulk import file ", + "title": "Bulk import file (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample importFileRequests value:", " * [", @@ -258,8 +288,7 @@ "", "async function mybulkImportFileFunction(importFileRequests) {", " try {", - " const elevatedbulkImportFile = elevate(files.bulkImportFile)", - " const importedFiles = await elevatedbulkImportFile(importFileRequests);", + " const importedFiles = await files.bulkImportFile(importFileRequests);", "", " console.log(\"Imported files:\", importedFiles);", " return importedFiles;", @@ -373,8 +402,9 @@ ] }, { - "title": "Bulk import file with options", + "title": "Bulk import file (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", @@ -399,16 +429,12 @@ " * url: 'https://cdn.pixabay.com/example-video.mp4'", " * }", " * ]", - " * Sample options value:", - " * {", - " * returnEntity: false", - " * }", " */", "", - "async function mybulkImportFileFunction(importFileRequests, options) {", + "export const mybulkImportFileFunction = webMethod(Permissions.Anyone, async (importFileRequests) => {", " try {", " const elevatedbulkImportFile = elevate(files.bulkImportFile)", - " const importedFiles = await elevatedbulkImportFile(importFileRequests, options);", + " const importedFiles = await elevatedbulkImportFile(importFileRequests);", "", " console.log(\"Imported files:\", importedFiles);", " return importedFiles;", @@ -416,33 +442,102 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", - "/* Promise resolves to:", + "/* Promise resolves to: ", " * {", " * \"bulkActionMetadata\": {", - " * \"totalSuccesses\": 3,", " * \"totalFailures\": 0,", + " * \"totalSuccesses\": 3,", " * \"undetailedFailures\": 0", " * },", " * \"results\": [", " * {", + " * \"item\": {", + " * \"_createdDate\": \"2023-12-26T10:22:31.000Z\",", + " * \"_id\": \"a8a52b_f8c86723942347488316f1ab35119411~mv2.jpg\",", + " * \"_updatedDate\": \"2023-12-26T10:22:31.000Z\",", + " * \"addedBy\": {", + " * \"identityId\": \"a8a52bb9-bac0-4bba-a55c-0611b5cdaa16\",", + " * \"identityType\": \"MEMBER\"", + " * },", + " * \"displayName\": \"image1.jpg\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"igje5u22nij3qkltzsnol37j3dnthvvh\",", + " * \"private\": false,", + " * \"siteId\": \"49dcb500-1081-47b0-b13b-368b9bed8fa9\",", + " * \"sizeInBytes\": \"-1\",", + " * \"sourceUrl\": \"https://www.site1.com/example.jpg\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/a8a52b_f8c86723942347488316f1ab35119411~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/a8a52b_f8c86723942347488316f1ab35119411~mv2.jpg\"", + " * },", " * \"itemMetadata\": {", - " * \"_id\": \"a8a52b_f8388ed2a42440c6a649e6b68194f18f~mv2.jpg\",", + " * \"_id\": \"a8a52b_f8c86723942347488316f1ab35119411~mv2.jpg\",", " * \"originalIndex\": 0,", " * \"success\": true", " * }", " * },", " * {", + " * \"item\": {", + " * \"_createdDate\": \"2023-12-26T10:22:32.000Z\",", + " * \"_id\": \"a8a52b_43eb6841371f4d738ddfcb7fa2bb62be-tmp.svg\",", + " * \"_updatedDate\": \"2023-12-26T10:22:32.000Z\",", + " * \"addedBy\": {", + " * \"identityId\": \"a8a52bb9-bac0-4bba-a55c-0611b5cdaa16\",", + " * \"identityType\": \"MEMBER\"", + " * },", + " * \"displayName\": \"vectorArt1.webp.svg\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [\"label1\", \"label2\"],", + " * \"mediaType\": \"VECTOR\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"49dcb500-1081-47b0-b13b-368b9bed8fa9\",", + " * \"sizeInBytes\": \"-1\",", + " * \"sourceUrl\": \"https://cdn.vectorstock.com/example-vector-art.webp\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/shapes/a8a52b_43eb6841371f4d738ddfcb7fa2bb62be-tmp.svg\",", + " * \"url\": \"https://static.wixstatic.com/shapes/a8a52b_43eb6841371f4d738ddfcb7fa2bb62be-tmp.svg\"", + " * },", " * \"itemMetadata\": {", - " * \"_id\": \"a8a52b_21186dbad3154343a379786e9b6cd6c4-tmp.svg\",", + " * \"_id\": \"a8a52b_43eb6841371f4d738ddfcb7fa2bb62be-tmp.svg\",", " * \"originalIndex\": 1,", " * \"success\": true", " * }", " * },", " * {", + " * \"item\": {", + " * \"_createdDate\": \"2023-12-26T10:22:32.000Z\",", + " * \"_id\": \"a8a52b_fec67a695b474a729e3a31010afbb0af\",", + " * \"_updatedDate\": \"2023-12-26T10:22:32.000Z\",", + " * \"addedBy\": {", + " * \"identityId\": \"a8a52bb9-bac0-4bba-a55c-0611b5cdaa16\",", + " * \"identityType\": \"MEMBER\"", + " * },", + " * \"displayName\": \"video1.mp4\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"mediaType\": \"VIDEO\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"49dcb500-1081-47b0-b13b-368b9bed8fa9\",", + " * \"sizeInBytes\": \"-1\",", + " * \"sourceUrl\": \"https://cdn.pixabay.com/example-video.mp4\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/54ece48fa04e492fa46bd79980105f0d.png\",", + " * \"url\": \"https://video.wixstatic.com/video/a8a52b_fec67a695b474a729e3a31010afbb0af/file\"", + " * },", " * \"itemMetadata\": {", - " * \"_id\": \"a8a52b_722acdc3e90c4d509a656ea93d531dc6\",", + " * \"_id\": \"a8a52b_fec67a695b474a729e3a31010afbb0af\",", " * \"originalIndex\": 2,", " * \"success\": true", " * }", @@ -454,135 +549,9 @@ ] }, { - "title": "Bulk import files from visitor input into a form ", - "body": [ - "/****************************************", - " * Backend code - bulk-import-files.jsw *", - " ***************************************/", - "", - "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "export async function importFiles(importFileRequests) {", - " try {", - " const elevatedBulkImportFile = elevate(files.bulkImportFile)", - " const importedFiles = await elevatedBulkImportFile(importFileRequests);", - "", - " console.log(\"Imported files:\", importedFiles);", - " return importedFiles;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - " ", - " ", - "/*************", - " * Page code *", - " ************/", - "", - "import { importFiles } from 'backend/bulk-import-files';", - "", - "$w.onReady(() => {", - " const newMedia = [];", - " ", - " $w('#addMedia').onClick( () => {", - " const newMediaFile = {", - " displayName: $w('#displayName').value,", - " mediaType: $w('#mediaType').value,", - " parentFolderId: $w('#parentFolderId').value,", - " url: $w('#url').value", - " }", - " newMedia.push(newMediaFile);", - "", - " // show message to remind user to submit media", - " // after adding all media files for 5 seconds", - " $w('#rememberToUploadMessage').show();", - " setTimeout(() => {", - " $w('#rememberToUploadMessage').hide();", - " }, 5000)", - " });", - "", - " $w('#uploadMedia').onClick(async () => {", - " if (newMedia.length === 0) {", - " // if no media has been added then", - " // show message to add media", - " $w('#addMediaMsg').show()", - " } else {", - " await importFiles(newMedia);", - "", - " $w('#successfulUploadMsg').show();", - " setTimeout(() => {", - " $w('#successfulUploadMsg').hide();", - " }, 10000);", - " }", - " });", - "});" - ], - "extra": { - "description": "This code shows a page where the visitor adds basic media file data to a form and then adds it to the `newMedia` array. When the visitor clicks the upload button, all added media files are uploaded using the `bulkImportFile()` function." - } - } - ] - }, - "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], - "syntaxName": "bulkImportFile", - "isAdminMethod": true - }, - { - "name": "bulkImportFiles", - "params": [ - { - "name": "importFileRequests", - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-media-v2.Files.ImportFileRequest" - } - ] - } - } - ], - "doc": "Information about the files to import.", - "required": true - } - ], - "requiredFields": [ - "importFileRequests", - "importFileRequests.url" - ], - "ret": { - "type": [ - { - "complexType": { - "nativeType": "Promise", - "typeParams": [ - { - "referenceType": "wix-media-v2.Files.BulkImportFilesResponse" - } - ] - } - } - ], - "doc": null - }, - "docs": { - "summary": "> **Deprecated.**\n> This function has been replaced with `bulkImportFile()`, and will be removed on March 31, 2024.", - "description": [ - "The `bulkImportFiles()` function returns a Promise that resolves to an array of the imported files' descriptors.\n\nImports a bulk of files to the Media Manager using external urls.\n\nReturns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.\nIf no folder is specified, the file is imported to the `media-root` folder.\n\nTo import a file, you need to pass one of the following:\n- The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.\n- The file's name and extension. For example, `'my-image.png'`.\n- If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request.\n\n>**Note:** The `media` property isn't returned in the `files` response object." - ], - "examples": [ - { - "title": "Bulk import files ", + "title": "Bulk import file (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", @@ -603,7 +572,276 @@ " * },", " * {", " * displayName: 'video1',", - " * mediaType: 'VIDEO'", + " * mediaType: 'VIDEO',", + " * url: 'https://cdn.pixabay.com/example-video.mp4'", + " * }", + " * ]", + " */", + "", + "export const mybulkImportFileFunction = webMethod(Permissions.Anyone, async (importFileRequests, options) => {", + " try {", + " const elevatedbulkImportFile = elevate(files.bulkImportFile)", + " const importedFiles = await elevatedbulkImportFile(importFileRequests, options);", + "", + " console.log(\"Imported files:\", importedFiles);", + " return importedFiles;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to: ", + " * {", + " * \"bulkActionMetadata\": {", + " * \"totalFailures\": 0,", + " * \"totalSuccesses\": 3,", + " * \"undetailedFailures\": 0", + " * },", + " * \"results\": [", + " * {", + " * \"item\": {", + " * \"_createdDate\": \"2023-12-26T10:22:31.000Z\",", + " * \"_id\": \"a8a52b_f8c86723942347488316f1ab35119411~mv2.jpg\",", + " * \"_updatedDate\": \"2023-12-26T10:22:31.000Z\",", + " * \"addedBy\": {", + " * \"identityId\": \"a8a52bb9-bac0-4bba-a55c-0611b5cdaa16\",", + " * \"identityType\": \"MEMBER\"", + " * },", + " * \"displayName\": \"image1.jpg\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"igje5u22nij3qkltzsnol37j3dnthvvh\",", + " * \"private\": false,", + " * \"siteId\": \"49dcb500-1081-47b0-b13b-368b9bed8fa9\",", + " * \"sizeInBytes\": \"-1\",", + " * \"sourceUrl\": \"https://www.site1.com/example.jpg\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/a8a52b_f8c86723942347488316f1ab35119411~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/a8a52b_f8c86723942347488316f1ab35119411~mv2.jpg\"", + " * },", + " * \"itemMetadata\": {", + " * \"_id\": \"a8a52b_f8c86723942347488316f1ab35119411~mv2.jpg\",", + " * \"originalIndex\": 0,", + " * \"success\": true", + " * }", + " * },", + " * {", + " * \"item\": {", + " * \"_createdDate\": \"2023-12-26T10:22:32.000Z\",", + " * \"_id\": \"a8a52b_43eb6841371f4d738ddfcb7fa2bb62be-tmp.svg\",", + " * \"_updatedDate\": \"2023-12-26T10:22:32.000Z\",", + " * \"addedBy\": {", + " * \"identityId\": \"a8a52bb9-bac0-4bba-a55c-0611b5cdaa16\",", + " * \"identityType\": \"MEMBER\"", + " * },", + " * \"displayName\": \"vectorArt1.webp.svg\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [\"label1\", \"label2\"],", + " * \"mediaType\": \"VECTOR\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"49dcb500-1081-47b0-b13b-368b9bed8fa9\",", + " * \"sizeInBytes\": \"-1\",", + " * \"sourceUrl\": \"https://cdn.vectorstock.com/example-vector-art.webp\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/shapes/a8a52b_43eb6841371f4d738ddfcb7fa2bb62be-tmp.svg\",", + " * \"url\": \"https://static.wixstatic.com/shapes/a8a52b_43eb6841371f4d738ddfcb7fa2bb62be-tmp.svg\"", + " * },", + " * \"itemMetadata\": {", + " * \"_id\": \"a8a52b_43eb6841371f4d738ddfcb7fa2bb62be-tmp.svg\",", + " * \"originalIndex\": 1,", + " * \"success\": true", + " * }", + " * },", + " * {", + " * \"item\": {", + " * \"_createdDate\": \"2023-12-26T10:22:32.000Z\",", + " * \"_id\": \"a8a52b_fec67a695b474a729e3a31010afbb0af\",", + " * \"_updatedDate\": \"2023-12-26T10:22:32.000Z\",", + " * \"addedBy\": {", + " * \"identityId\": \"a8a52bb9-bac0-4bba-a55c-0611b5cdaa16\",", + " * \"identityType\": \"MEMBER\"", + " * },", + " * \"displayName\": \"video1.mp4\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"mediaType\": \"VIDEO\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"49dcb500-1081-47b0-b13b-368b9bed8fa9\",", + " * \"sizeInBytes\": \"-1\",", + " * \"sourceUrl\": \"https://cdn.pixabay.com/example-video.mp4\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/54ece48fa04e492fa46bd79980105f0d.png\",", + " * \"url\": \"https://video.wixstatic.com/video/a8a52b_fec67a695b474a729e3a31010afbb0af/file\"", + " * },", + " * \"itemMetadata\": {", + " * \"_id\": \"a8a52b_fec67a695b474a729e3a31010afbb0af\",", + " * \"originalIndex\": 2,", + " * \"success\": true", + " * }", + " * }", + " * ]", + " * }", + " */", + "" + ] + }, + { + "title": "Bulk import files from visitor input into a form ", + "body": [ + "/****************************************", + " * Backend code - bulk-import-files.web.js *", + " ***************************************/", + "", + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "export const importFiles = webMethod(Permissions.Anyone, async (importFileRequests) => {", + " try {", + " const elevatedBulkImportFile = elevate(files.bulkImportFile)", + " const importedFiles = await elevatedBulkImportFile(importFileRequests);", + "", + " console.log(\"Imported files:\", importedFiles);", + " return importedFiles;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + " ", + " ", + "/*************", + " * Page code *", + " ************/", + "", + "import { importFiles } from 'backend/bulk-import-files.web';", + "", + "$w.onReady(() => {", + " const newMedia = [];", + " ", + " $w('#addMedia').onClick( () => {", + " const newMediaFile = {", + " displayName: $w('#displayName').value,", + " mediaType: $w('#mediaType').value,", + " parentFolderId: $w('#parentFolderId').value,", + " url: $w('#url').value", + " }", + " newMedia.push(newMediaFile);", + "", + " // show message to remind user to submit media", + " // after adding all media files for 5 seconds", + " $w('#rememberToUploadMessage').show();", + " setTimeout(() => {", + " $w('#rememberToUploadMessage').hide();", + " }, 5000)", + " });", + "", + " $w('#uploadMedia').onClick(async () => {", + " if (newMedia.length === 0) {", + " // if no media has been added then", + " // show message to add media", + " $w('#addMediaMsg').show()", + " } else {", + " await importFiles(newMedia);", + "", + " $w('#successfulUploadMsg').show();", + " setTimeout(() => {", + " $w('#successfulUploadMsg').hide();", + " }, 10000);", + " }", + " });", + "});", + "" + ], + "extra": { + "description": "This code shows a page where the visitor adds basic media file data to a form and then adds it to the `newMedia` array. When the visitor clicks the upload button, all added media files are uploaded using the `bulkImportFile()` function." + } + } + ] + }, + "isVeloEvent": false, + "syntaxName": "bulkImportFile", + "isAdminMethod": true + }, + { + "name": "bulkImportFiles", + "params": [ + { + "name": "importFileRequests", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-media-v2.Files.ImportFileRequest" + } + ] + } + } + ], + "doc": "Information about the files to import.", + "required": true + } + ], + "requiredFields": [ + "importFileRequests", + "importFileRequests.url" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-media-v2.Files.BulkImportFilesResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "> **Deprecated.**\n> This function has been replaced with `bulkImportFile()`, and will be removed on March 31, 2024.", + "description": [ + "The `bulkImportFiles()` function returns a Promise that resolves to an array of the imported files' descriptors.\n\nImports a bulk of files to the Media Manager using external urls.\n\nReturns information about the imported files. Use the `parentFolderId` parameter to specify in which folder you want each file to be imported.\nIf no folder is specified, the file is imported to the `media-root` folder.\n\n>**Note:** The `media` property isn't returned in the `files` response object.\n\nTo import files, you need to do one of the following for each file:\n- Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.\n- Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.\n- Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.\n > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`." + ], + "examples": [ + { + "title": "Bulk import files (dashboard page code)", + "body": [ + "import { files } from 'wix-media.v2';", + "", + "/* Sample importFileRequests value:", + " * [", + " * {", + " * displayName: 'image1',", + " * mediaType: 'IMAGE',", + " * mimeType: 'image/jpeg',", + " * parentFolderId: 'igje5u22nij3qkltzsnol37j3dnthvvh',", + " * url: 'https://www.site1.com/example.jpg'", + " * }, ", + " * {", + " * displayName: 'vectorArt1',", + " * mediaType: 'VECTOR',", + " * labels : ['label1', 'label2'],", + " * url: 'https://cdn.vectorstock.com/example-vector-art.webp'", + " * },", + " * {", + " * displayName: 'video1',", + " * mediaType: 'VIDEO'", " * url: 'https://cdn.pixabay.com/example-video.mp4',", " * }", " * ]", @@ -611,8 +849,7 @@ "", "async function myBulkImportFilesFunction(importFileRequests) {", " try {", - " const elevatedBulkImportFiles = elevate(files.bulkImportFiles)", - " const importedFiles = await elevatedBulkImportFiles(importFileRequests);", + " const importedFiles = await files.bulkImportFiles(importFileRequests);", "", " console.log(\"Imported files:\", importedFiles);", " return importedFiles;", @@ -690,17 +927,130 @@ " */" ] }, + { + "title": "Bulk import files (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample importFileRequests value:", + " * [", + " * {", + " * displayName: 'image1',", + " * mediaType: 'IMAGE',", + " * mimeType: 'image/jpeg',", + " * parentFolderId: 'igje5u22nij3qkltzsnol37j3dnthvvh',", + " * url: 'https://www.site1.com/example.jpg'", + " * }, ", + " * {", + " * displayName: 'vectorArt1',", + " * mediaType: 'VECTOR',", + " * labels : ['label1', 'label2'],", + " * url: 'https://cdn.vectorstock.com/example-vector-art.webp'", + " * },", + " * {", + " * displayName: 'video1',", + " * mediaType: 'VIDEO'", + " * url: 'https://cdn.pixabay.com/example-video.mp4',", + " * }", + " * ]", + " */", + "", + "export const myBulkImportFilesFunction = webMethod(Permissions.Anyone, async (importFileRequests) => {", + " try {", + " const elevatedBulkImportFiles = elevate(files.bulkImportFiles)", + " const importedFiles = await elevatedBulkImportFiles(importFileRequests);", + "", + " console.log(\"Imported files:\", importedFiles);", + " return importedFiles;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to: ", + " * {", + " * \"files\": [", + " * {", + " * \"_createdDate\": \"2023-07-23T12:15:49.000Z\",", + " * \"_id\": \"w8ide0_h8bpmhc3j3qhgncce0et1nnkghsfozl2~mv2.jpg\",", + " * \"_updatedDate\": \"2023-07-23T12:15:49.000Z\",", + " * \"displayName\": \"image1.jpg\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"igje5u22nij3qkltzsnol37j3dnthvvh\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"-1\",", + " * \"sourceUrl\": \"https://www.site1.com/example.jpg\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_h8bpmhc3j3qhgncce0et1nnkghsfozl2~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/w8ide0_h8bpmhc3j3qhgncce0et1nnkghsfozl2~mv2.jpg\"", + " * },", + " * {", + " * \"_createdDate\": \"2023-07-23T12:15:50.000Z\",", + " * \"_id\": \"w8ide0_e9xsr959r1ze5aavswj2978r6jt05bwl-tmp.svg\",", + " * \"_updatedDate\": \"2023-07-23T12:15:50.000Z\",", + " * \"displayName\": \"vectorArt1.webp.svg\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [", + " * \"label1\", ", + " * \"label2\"", + " * ],", + " * \"mediaType\": \"VECTOR\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"20532\",", + " * \"sourceUrl\": \"https://cdn.vectorstock.com/example-vector-art.webp\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/shapes/w8ide0_e9xsr959r1ze5aavswj2978r6jt05bwl-tmp.svg\",", + " * \"url\": \"https://static.wixstatic.com/shapes/w8ide0_e9xsr959r1ze5aavswj2978r6jt05bwl-tmp.svg\"", + " * },", + " * {", + " * \"_createdDate\": \"2023-07-23T12:15:50.000Z\",", + " * \"_id\": \"w8ide0_f6e8f09e5055432286db483917ba923e\",", + " * \"_updatedDate\": \"2023-07-23T12:15:50.000Z\",", + " * \"displayName\": \"video1.mp4\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"mediaType\": \"VIDEO\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"-1\",", + " * \"sourceUrl\": \"https://cdn.pixabay.com/example-video.mp4\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/yibv80byru0wei9ficri8fd8o1rghueu.png\",", + " * \"url\": \"https://video.wixstatic.com/video/w8ide0_f6e8f09e5055432286db483917ba923e/file\"", + " * }", + " * ]", + " * }", + " */", + "" + ] + }, { "title": "Bulk import files from visitor input into a form ", "body": [ "/****************************************", - " * Backend code - bulk-import-files.jsw *", + " * Backend code - bulk-import-files.web.js *", " ***************************************/", "", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "export async function importFiles(importFileRequests) {", + "export const importFiles = webMethod(Permissions.Anyone, async (importFileRequests) => {", " try {", " const elevatedBulkImportFiles = elevate(files.bulkImportFiles)", " const importedFiles = await elevatedBulkImportFiles(importFileRequests);", @@ -711,14 +1061,14 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", " ", " ", "/*************", " * Page code *", " ************/", "", - "import { importFiles } from 'backend/bulk-import-files';", + "import { importFiles } from 'backend/bulk-import-files.web';", "", "$w.onReady(() => {", " const newMedia = [];", @@ -754,7 +1104,8 @@ " }, 10000);", " }", " });", - "});" + "});", + "" ], "extra": { "description": "This code shows a page where the visitor adds basic media file data to a form and then adds it to the `newMedia` array. When the visitor clicks the upload button, all added media files are uploaded using the `bulkImportFiles()` function." @@ -763,11 +1114,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "bulkImportFiles", "isAdminMethod": true }, @@ -817,8 +1163,36 @@ ], "examples": [ { - "title": "Bulk restore deleted files by IDs", + "title": "Bulk restore deleted files by IDs (dashboard page code)", + "body": [ + "import { files } from 'wix-media.v2';", + "", + "/* Sample fileIds value:", + " * [", + " * 'd4dde1_dee18c9ada174a818ccf75c50e72c739~mv2.jpg',", + " * 'd4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png',", + " * 'd4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg'", + " * ]", + " */", + "", + "async function myBulkRestoreFilesFromTrashBinFunction(fileIds) {", + " try {", + " const restoredFiles = await files.bulkRestoreFilesFromTrashBin(fileIds);", + "", + " console.log('Restored Files:', restoredFiles);", + " return restoredFiles;", + " } catch (error) {", + " console.error(error);", + " }", + "}", + "", + "/* Promise resolves to void */" + ] + }, + { + "title": "Bulk restore deleted files by IDs (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", @@ -830,7 +1204,7 @@ " * ]", " */", "", - "async function myBulkRestoreFilesFromTrashBinFunction(fileIds) {", + "export const myBulkRestoreFilesFromTrashBinFunction = webMethod(Permissions.Anyone, async (fileIds) => {", " try {", " const elevatedBulkRestoreFilesFromTrashBin = elevate(files.bulkRestoreFilesFromTrashBin);", " const restoredFiles = await elevatedBulkRestoreFilesFromTrashBin(fileIds);", @@ -840,21 +1214,23 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", - "/* Promise resolves to void */" + "/* Promise resolves to void */", + "" ] }, { "title": "Bulk restores all non-permanently deleted files of chosen types ", "body": [ - "/*****************************************", - " * Backend code - bulk-restore-files.jsw *", - " ****************************************/", + "/********************************************", + " * Backend code - bulk-restore-files.web.js *", + " *******************************************/", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "async function restoreFiles(mediaTypes) {", + "export const restoreFiles = webMethod(Permissions.Anyone, async (mediaTypes) => {", " let idList = []", " try {", " const options = {", @@ -879,14 +1255,14 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", "", "/*************", " * Page code *", " ************/", "", - "import { restoreFiles } from 'backend/bulk-import-files';", + "import { restoreFiles } from 'backend/bulk-restore-files.web';", "", "$w.onReady(() => {", " $w('#restoreMedia').onClick(async () => {", @@ -928,11 +1304,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "bulkRestoreFilesFromTrashBin", "isAdminMethod": true }, @@ -981,21 +1352,19 @@ "docs": { "summary": "Generates one or more temporary URLs for downloading a specific file in the Media Manager.", "description": [ - "The `generateFileDownloadUrl()` function returns a Promise that resolves to an array containing download URLs for the assets specified in the options parameter.\n\nTo download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.\nIf no asset key is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.\n\nUse this endpoint to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect URL when the URL expires." + "The `generateFileDownloadUrl()` function returns a Promise that resolves to an array containing download URLs for the assets specified in the options parameter.\n\nTo download different assets of the file, use the `assetKeys` parameter which generates a download URL for each asset.\nIf no asset key is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.\n\nUse this function to grant external clients access to a private media file. Use the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect URL when the URL expires.\n\nTo generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, use the `generateFilesDownloadUrl()` function.\nSince this is a permanent URL, it is less secure. Therefore, to download private files, use the `generateFileDownloadUrl()` function for each private file that you want to generate a download URL for." ], "examples": [ { - "title": "Generate a file download URL ", + "title": "Generate a file download URL (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample fileId value: 'd4dde1_dee18c9ada174a818ccf75c50e72c739~mv2.jpg' */", "", "async function myGenerateFileDownloadUrlFunction(fileId) {", " try {", - " const elevatedGenerateFileDonwloadUrl = elevate(files.generateFileDownloadUrl)", - " const result = await elevatedGenerateFileDonwloadUrl(fileId);", + " const result = await files.generateFileDownloadUrl(fileId);", "", " return result;", " } catch (error) {", @@ -1016,9 +1385,44 @@ " */" ] }, + { + "title": "Generate a file download URL (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "// Sample fileId value: 'd4dde1_dee18c9ada174a818ccf75c50e72c739~mv2.jpg'", + "", + "export const myGenerateFileDownloadUrlFunction = webMethod(Permissions.Anyone, async (fileId) => {", + " try {", + " const elevatedGenerateFileDonwloadUrl = elevate(files.generateFileDownloadUrl)", + " const result = await elevatedGenerateFileDonwloadUrl(fileId);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"downloadUrls\": [", + " * {", + " * \"assetKey\": \"src\",", + " * \"url\": \"https://download-files.wixmp.com/media/d4dde1_dee18c9ada174a818ccf75c50e72c739~mv2.jpg?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ1cm46YXBwOmU2NjYzMGU3MTRmMDQ5MGFhZWExZjE0OWIzYjY5ZTMyIiwic3ViIjoidXJuOmFwcDplNjY2MzBlNzE0ZjA0OTBhYWVhMWYxNDliM2I2OWUzMiIsImF1ZCI6WyJ1cm46c2VydmljZTpmaWxlLmRvd25sb2FkIl0sImlhdCI6MTY5MjAyMTMxNSwiZXhwIjoxNjkyMDU3MzI1LCJqdGkiOiJjZTA1MzUxYy1jNDA4LTRlYmMtYWI0OC04MWM0NWJlZDlkM2IiLCJvYmoiOltbeyJwYXRoIjoiL21lZGlhL2Q0ZGRlMV9kZWUxOGM5YWRhMTc0YTgxOGNjZjc1YzUwZTcyYzczOX5tdjIuanBnIn1dXSwiZGlzIjp7ImZpbGVuYW1lIjoibmVvbS1BZGtKLUxncFRyRS11bnNwbGFzaC5qcGciLCJ0eXBlIjoiYXR0YWNobWVudCJ9fQ.HfZiuG7UFavOpgh2T0lVn56oZ9NpLoV3z9Gmnqptt8Y\"", + " * }", + " * ]", + " * }", + " */", + "" + ] + }, { "title": "Generate a file download URL with options ", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", @@ -1033,7 +1437,7 @@ " * }", " */", "", - "async function myGenerateFileDownloadUrlFunction(fileId, options) {", + "export const myGenerateFileDownloadUrlFunction = webMethod(Permissions.Anyone, async (fileId, options) => {", " try {", " const elevatedGenerateFileDonwloadUrl = elevate(files.generateFileDownloadUrl)", " const result = await elevatedGenerateFileDonwloadUrl(fileId, options);", @@ -1044,7 +1448,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to:", " * {", @@ -1113,10 +1517,9 @@ ], "examples": [ { - "title": "Generate a file resumable upload url ", + "title": "Generate a file resumable upload url (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample mimeType value: 'image/jpeg'", " *", @@ -1130,8 +1533,7 @@ "", "async function myGenerateFileResumableUploadUrlFunction(mimeType, options) {", " try {", - " const elevatedGenerateFileResumableUploadUrl = elevate(files.generateFileResumableUploadUrl);", - " const result = await elevatedGenerateFileResumableUploadUrl(mimeType, options);", + " const result = await files.generateFileResumableUploadUrl(mimeType, options);", " ", " return result;", " } catch (error) {", @@ -1149,6 +1551,45 @@ " */" ] }, + { + "title": "Generate a file resumable upload url (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample mimeType value: 'image/jpeg'", + " *", + " * Sample options value:", + " * {", + " * fileName: 'image1.jpeg',", + " * parentFolderId: '103601562ec94214bee61f470b403dd5',", + " * labels: ['nature', 'outdoors']", + " * }", + " */", + "", + "export const myGenerateFileResumableUploadUrlFunction = webMethod(Permissions.Anyone, async (mimeType, options) => {", + " try {", + " const elevatedGenerateFileResumableUploadUrl = elevate(files.generateFileResumableUploadUrl);", + " const result = await elevatedGenerateFileResumableUploadUrl(mimeType, options);", + " ", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"uploadProtocol\": \"TUS\",", + " * \"uploadToken\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlMWIwNTkxYi0wMTQyLTRkOTctYjg2My1lOTQwN2ZiZjdhMDEiLCJhdWQiOiJ1cm46c2VydmljZTp1cGxvYWQiLCJpc3MiOiJ1cm46c2VydmljZTp1cGxvYWQiLCJleHAiOjE3MDIzNjM0NTIsImlhdCI6MTcwMTc1ODY0MiwiYnVja2V0IjoidXBsb2FkLXRtcC13aXhtcC1jZGZjMzg0ZjE1ODQxYWFhNWVhYjE2YjEiLCJwYXRoIjoibWVkaWEvYThhNTJiXzFhYTNkZDQzMTY4OTQxYjhiMDE0M2M0ZTA5MDY1M2U1fm12Mi5qcGVnIiwiY2FsbGJhY2tVcmwiOiJodHRwczovL3dpeG1wLWNkZmMzODRmMTU4NDFhYWE1ZWFiMTZiMS5hcHBzcG90LmNvbS9fYXBpL3YzL3VwbG9hZC9jYWxsYmFjaz91cGxvYWRUb2tlbj1leUpoYkdjaU9pSklVekkxTmlJc0luUjVjQ0k2SWtwWFZDSjkuZXlKcGMzTWlPaUoxY200NmMyVnlkbWxqWlRwbWFXeGxMblZ3Ykc5aFpDSXNJbUYxWkNJNkluVnlianB6WlhKMmFXTmxPbVpwYkdVdWRYQnNiMkZrSWl3aWMzVmlJam9pZFhKdU9tRndjRHBsTmpZMk16QmxOekUwWmpBME9UQmhZV1ZoTVdZeE5EbGlNMkkyT1dVek1pSXNJbWxoZENJNk1UY3dNVGMxT0RZME1pd2laWGh3SWpveE56QXhPREF4T0RReUxDSnFkR2tpT2lJME5EbGxNakE0WkdZNE5XRWlMQ0ppYTNRaU9pSnpkR0YwYVdNdWQybDRjM1JoZEdsakxtTnZiU0lzSW5CMGFDSTZJaTl0WldScFlTOWhPR0UxTW1KZk1XRmhNMlJrTkRNeE5qZzVOREZpT0dJd01UUXpZelJsTURrd05qVXpaVFYtYlhZeUxtcHdaV2NpTENKaFkyd2lPaUp3ZFdKc2FXTWlMQ0pzWm1NaU9tNTFiR3dzSW1Oc1lpSTZleUoxY213aU9pSm9kSFJ3Y3pvdkwzZHBlSEJ5YVhaaGRHVnRaV1JwWVM1aGNIQnpjRzkwTG1OdmJTOTJNeTl0Y0M5bWFXeGxjeTkxY0d4dllXUXZiV1ZrYVdFdllUaGhOVEppWHpGaFlUTmtaRFF6TVRZNE9UUXhZamhpTURFME0yTTBaVEE1TURZMU0yVTFmbTEyTWk1cWNHVm5JaXdpWVhSMFlXTm9iV1Z1ZENJNmV5SndZWFJvSWpvaUwyMWxaR2xoTDJFNFlUVXlZbDh4WVdFelpHUTBNekUyT0RrME1XSTRZakF4TkROak5HVXdPVEEyTlRObE5YNXRkakl1YW5CbFp5SXNJblZ3Ykc5aFpGOTBiMnRsYmlJNklrSk1iRlp0U0MxMFZVNDNhV2hIUWpOUGJFZEtTbnBVVm1WeVZqQjBPWFp2YkhFM2MzcFZSbkZ5YWpCS1QyOWhaalJMTkZwUE9IbENNSGhrT1dka2EyZzFMWFYxZEUxalpWcFRTblZhZEVKTVYyOTJjMFpOVERSbk9IQnVPWFJwWVZCV2JrOW9MVEZvWmtVNGJqTjFPWEZZVWxKSVdVWXdSMFF5ZVVSS1RraDNlVWxUUzBkaVUydGpNVEl3WDFCTFl5MXFTV2xMT1daVFptZDZkRkpFZFhWemJubDNWa1JyZEdsalgxOHhkazVUWTJOYVFXcHBORmt5UTJaWFJ6Sm1VemxaT0cxTGVqZEZZakpHWmtaTGJVSlBYMlIzUzBweVgweGFaakJqYTIxS1pEZHZaVlIzYjJwR2JFa3dWemR6UzNoVVNFdDRWbVZoYzFKMlYySnljbEU0V0RkeU1IcDNUREYyV1c5MVNXdE1ielJRWlhFMU5VNVNSMEpRZG5OVFpXbFZWV2xFVUZRMldrbG1WMmRQZFZoUGRrcGFkVWhDVTA5Vk9EbEdjbEozU2taTVVqUk9UbTlJZDA1bGVsSlBTVnB2YmtWV2FUUlNaSE5OZDB0dVMzRTNOMUUwUW5GT1RUUnBaV1YwYWs1RFYzSmxjMnRRUXkwMVVsQllSbVp6YlVad1QwaGxRVlJXVW1NdFdqZFRZbTFIVTBGMFN6UlJRVFpSU1MxQk5IUTJVVm94T0dSWlRVbEJjMDlxTkZNdFgyZHhTakYzTmxCb2NYSmhUR1pGWDNabWFrZDROMDlKUjJWSVFuZzBYMU51T1UxeGNteExRMlJ1VWpCQlZGOTJjVnB5U2s5T1ZWbE1UM0JTVEU1bFExTlhjVzQzUzA1V2RuTjBVR2RyU3paMlZXa3pWMHMyY2xvdFNYbHhlRFZMU1ZFNFdFaDBjakkxYm1sU1p6VlNVMkYzUzFWS01FWlhNall4VDAxM1RWcGhWUzB4YUhoUk5HcFdWR2h2V1VJMU5GcEZTbUZPVFZSYVdHeHVSM2xxY2tkWWFFWTRiMVI0VTJjMFJUUlFlVFJSV1V4NVRrbGhaREkzY21zOUluMHNJbWhsWVdSbGNuTWlPbTUxYkd3c0luQmhjM04wYUhKdmRXZG9JanAwY25WbGZYMC5nN1FFMDduUk9CNTZ6MlljQ0ZLazdRUkZJaDJ6c0FnNUlXODlsSmJCejRnIiwiYWNsIjoicHVibGljIiwicHJvdG9jb2wiOiJ0dXMiLCJtaW1lVHlwZSI6ImltYWdlL2pwZWciLCJzZXNzaW9uVVJMIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vdXBsb2FkL3N0b3JhZ2UvdjEvYi91cGxvYWQtdG1wLXdpeG1wLWNkZmMzODRmMTU4NDFhYWE1ZWFiMTZiMS9vP3ByZWRlZmluZWRBY2w9cHVibGljUmVhZFx1MDAyNnByb2plY3Rpb249ZnVsbFx1MDAyNnVwbG9hZFR5cGU9cmVzdW1hYmxlXHUwMDI2dXBsb2FkX2lkPUFCUHRjUHJ6QkVoaHRaTm1yM0ViZG5pOXcwUy1DVmdZZnFmYVgyUXZPT29yNEt2bFBhVUtRdGlwMkNwXzdYTndxblRWSmRaWkxOYlE3TU90M1NlTmx6R3pLOGpZRXZMNHA5QUFtbi1RTE96LThxQWQifQ.hHvZwmkHImDu4khcqyWx44TgWT_d26wIhcAbRUH37oI\",", + " * \"uploadUrl\": \"https://upload.wixmp.com/upload/tus\"", + " * }", + " */", + "" + ] + }, { "title": "Use a file upload url in an external node.js application", "body": [ @@ -1180,11 +1621,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "generateFileResumableUploadUrl", "isAdminMethod": true }, @@ -1237,10 +1673,9 @@ ], "examples": [ { - "title": "Generate a file upload url ", + "title": "Generate a file upload url (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample mimeType value: 'image/jpeg'", " * Sample options value:", @@ -1253,8 +1688,7 @@ "", "async function myGenerateFileUploadUrlFunction(mimeType, options) {", " try {", - " const elevatedGenerateFileUploadUrl = elevate(files.generateFileUploadUrl);", - " const result = await elevatedGenerateFileUploadUrl(mimeType, options);", + " const result = await files.generateFileUploadUrl(mimeType, options);", " ", " const url = result.uploadUrl;", " return url;", @@ -1271,6 +1705,43 @@ " */" ] }, + { + "title": "Generate a file upload url (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample mimeType value: 'image/jpeg'", + " * Sample options value:", + " * {", + " * fileName: 'image1.jpeg',", + " * parentFolderId: '103601562ec94214bee61f470b403dd5',", + " * labels: ['nature', 'outdoors']", + " * }", + " */", + "", + "export const myGenerateFileUploadUrlFunction = webMethod(Permissions.Anyone, async (mimeType, options) => {", + " try {", + " const elevatedGenerateFileUploadUrl = elevate(files.generateFileUploadUrl);", + " const result = await elevatedGenerateFileUploadUrl(mimeType, options);", + " ", + " const url = result.uploadUrl;", + " return url;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + " ", + "/* Promise resolves to:", + " * {", + " * \"uploadUrl\": \"https://upload.wixmp.com/upload/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzYTk0N2E5Ni01ZmFiLTQ0NjAtODVkNS1hNTIxNWRjNzRiMjEiLCJhdWQiOiJ1cm46c2VydmljZTp1cGxvYWQiLCJpc3MiOiJ1cm46c2VydmljZTp1cGxvYWQiLCJleHAiOjE2OTM5MTk3MjksImlhdCI6MTY5MzgzMzMxOSwiYnVja2V0IjoidXBsb2FkLXRtcC13aXhtcC1jZGZjMzg0ZjE1ODQxYWFhNWVhYjE2YjEiLCJwYXRoIjoibWVkaWEvZDRkZGUxXzE4Nzk3M2ZhYWRmNjQ3MGM4OTRhN2JjNmMyNjA2Yjkzfm12Mi5qcGVnIiwiY2FsbGJhY2tVcmwiOiJodHRwczovL3dpeG1wLWNkZmMzODRmMTU4NDFhYWE1ZWFiMTZiMS5hcHBzcG90LmNvbS9fYXBpL3YzL3VwbG9hZC9jYWxsYmFjaz91cGxvYWRUb2tlbj1leUpoYkdjaU9pSklVekkxTmlJc0luUjVjQ0k2SWtwWFZDSjkuZXlKcGMzTWlPaUoxY200NmMyVnlkbWxqWlRwbWFXeGxMblZ3Ykc5aFpDSXNJbUYxWkNJNkluVnlianB6WlhKMmFXTmxPbVpwYkdVdWRYQnNiMkZrSWl3aWMzVmlJam9pZFhKdU9tRndjRHBsTmpZMk16QmxOekUwWmpBME9UQmhZV1ZoTVdZeE5EbGlNMkkyT1dVek1pSXNJbWxoZENJNk1UWTVNemd6TXpNeE9Td2laWGh3SWpveE5qa3pPRGMyTlRFNUxDSnFkR2tpT2lJeU9ERXpaR013T1dJNU9EQWlMQ0ppYTNRaU9pSnpkR0YwYVdNdWQybDRjM1JoZEdsakxtTnZiU0lzSW5CMGFDSTZJaTl0WldScFlTOWtOR1JrWlRGZk1UZzNPVGN6Wm1GaFpHWTJORGN3WXpnNU5HRTNZbU0yWXpJMk1EWmlPVE4tYlhZeUxtcHdaV2NpTENKaFkyd2lPaUp3ZFdKc2FXTWlMQ0pzWm1NaU9tNTFiR3dzSW1Oc1lpSTZleUoxY213aU9pSm9kSFJ3Y3pvdkwzZHBlSEJ5YVhaaGRHVnRaV1JwWVM1aGNIQnpjRzkwTG1OdmJTOTJNeTl0Y0M5bWFXeGxjeTkxY0d4dllXUXZiV1ZrYVdFdlpEUmtaR1V4WHpFNE56azNNMlpoWVdSbU5qUTNNR000T1RSaE4ySmpObU15TmpBMllqa3pmbTEyTWk1cWNHVm5JaXdpWVhSMFlXTm9iV1Z1ZENJNmV5SndZWFJvSWpvaUwyMWxaR2xoTDJRMFpHUmxNVjh4T0RjNU56Tm1ZV0ZrWmpZME56QmpPRGswWVRkaVl6WmpNall3Tm1JNU0zNXRkakl1YW5CbFp5SXNJblZ3Ykc5aFpGOTBiMnRsYmlJNklrSk1iRlp0U0MxMFZVNDNhV2hIUWpOUGJFZEtTbnBVVm1WeVZqQjBPWFp2YkhFM2MzcFZSbkZ5YWpCS1QyOWhaalJMTkZwUE9IbENNSGhrT1dka2EyZzFMWFYxZEUxalpWcFRTblZhZEVKTVYyOTJjMFpOVERSbk9IQnVPWFJwWVZCV2JrOW9MVEZvWmtVNGJqTjFPWEZZVWxKSVdVWXdSMFF5ZVVSS1RraDNlVWxUUzBkaVUydGpNVEl3WDFCTFl5MXFTV2xMT1daVFptZDZkRkpFZFhWemJubDNWa1JyZEdsalgxOHhkazVUWTJOYVFXcHBORmt5UTJaWFJ6Sm1VemxaT0cxTGVqZEZZakpHWmtaTGJVSlBYMlIzUzBweVgweGFaakJqYTIxS1pEZHZaVlIzYjJwR2JFa3dWemR6UzNoVVNFdDRWbVZoYzFKMlYySnljbEU0V0RkeU1IcDNUREYyV1c5MVNXdE1ielJRWlhFMU5VNVNSMEpRZG5OVFpXbFZWV2xFVUZRMldrbG1WMmRQZFZoUGRrcGFkVWhDVTA5Vk9EbEdjbEozTm14R00xcFNRVkZST0RKWVpXRktRMmRWU1U1bFNHeFlkVTlzZWtNelVtSTFUQzFoTWtKRlVsQlpSRlpXWVRReWJEWTBiMnhzZUVKMk5qZG9lRjloU2tad1QwaGxRVlJXVW1NdFdqZFRZbTFIVTBGMFN6ZG1ZWEV4VlhOaFpsSnZVRWx5UzBwVWEydE5NREZOUkMwNFUzVTFVR1l4WWpWTWVsRXhNV0ZpYWt4M1pVWXdVMnRmV2xKZldHSTVja3Q1U0hadWRVSkxRMlJ1VWpCQlZGOTJjVnB5U2s5T1ZWbE1UM0JTVEU1bFExTlhjVzQzUzA1V2RuTjBVR2RyU3paMllXTnVjbTlRWDA5MGFTMUdOamRrU2tWelpWZFJhM0I2VW5WUGNIQkpTa1ZUUTJkMVpERkZRa2xOYlUxM1RWcGhWUzB4YUhoUk5HcFdWR2h2V1VJMU5FRnFhSGRpWlZSemRVbEVSRGxFT1dWWGVtaG5VVGhQZUV3MWVHdElORXN3UTFOWE5qSkRRazlQUlVrOUluMHNJbWhsWVdSbGNuTWlPbTUxYkd3c0luQmhjM04wYUhKdmRXZG9JanAwY25WbGZYMC5iRWJSTzdnYkQxaXR0TW9Hb29QUTBsbDZrbW5jSEdfc05pRjRXZzFZWTc0IiwiYWNsIjoicHVibGljIiwibWltZVR5cGUiOiJpbWFnZS9qcGVnIn0.pd9ZssMw0NOTIxmNm0gm3r5WP6ySCy4vBxlT8ufU_Vw\"", + " * }", + " */", + "" + ] + }, { "title": "Use a file upload url in an external node.js application", "body": [ @@ -1302,11 +1773,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "generateFileUploadUrl", "isAdminMethod": true }, @@ -1352,14 +1818,13 @@ "docs": { "summary": "Generates a URL for downloading a compressed file containing specific files in the Media Manager.", "description": [ - "The `generateFilesDownloadUrl()` function returns a Promise that resolves to a download URL.\n\nThe compressed file can contain up to 1000 files." + "The `generateFilesDownloadUrl()` function returns a Promise that resolves to a download URL.\n\nThe compressed file can contain up to 1000 files.\n\nTo generate one or more temporary URLs for downloading a specific file in the Media Manager, use the `generateFileDownloadUrl()` function.\nYou can use the `expirationInMinutes` parameter to set the URL expiration time, making it more secure than the `generateFilesDownloadUrl()` function.\nTherefore, to download private files, use the `generateFileDownloadUrl` function for each private file that you want to generate a download URL for." ], "examples": [ { - "title": "Generate a download url for multiple files ", + "title": "Generate a download url for multiple files (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample fileIds value:", " * [", @@ -1371,6 +1836,41 @@ "", "async function myGenerateFilesDownloadUrlFunction(fileIds) {", " try {", + " const generatedUrl = await files.generateFilesDownloadUrl(fileIds);", + "", + " const url = generatedUrl.downloadUrl;", + " return url;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"downloadUrl\": \"https://archive.wixmp.com/archive/wix/38f69e35c283495187e85be0c8c06caf\"", + " * }", + " */", + "" + ] + }, + { + "title": "Generate a download url for multiple files (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample fileIds value:", + " * [", + " * 'd4dde1_dee18c9ada174a818ccf75c50e72c739~mv2.jpg',", + " * 'd4dde1_84a62b7aeb874f73a7b736cad663d6f2.pdf',", + " * 'd4dde1_e26da94b5cb440649ede0c433425449c~mv2.jpg'", + " * ]", + " */", + "", + "export const myGenerateFilesDownloadUrlFunction = webMethod(Permissions.Anyone, async (fileIds) => {", + " try {", " const elevatedGenerateFilesDownloadUrl = elevate(files.generateFilesDownloadUrl)", " const generatedUrl = await elevatedGenerateFilesDownloadUrl(fileIds);", "", @@ -1380,7 +1880,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to:", " * {", @@ -1392,14 +1892,15 @@ { "title": "Generate a download url for all images in media ", "body": [ - "/**************************************", - " * Backend code - download-files-url.jsw *", - " *************************************/", + "/********************************************", + " * Backend code - download-files-url.web.js *", + " *******************************************/", "", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "export async function generateDownloadUrl(fileIds) {", + "export const generateDownloadUrl = webMethod(Permissions.Anyone, async (fileIds) => {", " try {", " const elevatedGenerateFilesDownloadUrl = elevate(files.generateFilesDownloadUrl)", " const generatedUrl = await elevatedGenerateFilesDownloadUrl(fileIds);", @@ -1408,9 +1909,9 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", " ", - "export async function listImages() {", + "export const listImages = webMethod(Permissions.Anyone, async () => {", " const listOptions = {", " mediaTypes: [\"IMAGE\"]", " }", @@ -1423,14 +1924,14 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", "", "/*************", " * Page code *", " ************/", "", - "import { listImages, generateDownloadUrl } from 'backend/download-files-url';", + "import { listImages, generateDownloadUrl } from 'backend/download-files-url.web';", "", "$w.onReady(() => {", " $w('#downloadFiles').disable();", @@ -1456,11 +1957,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "generateFilesDownloadUrl", "isAdminMethod": true }, @@ -1513,10 +2009,9 @@ ], "examples": [ { - "title": "Generate a video streaming url ", + "title": "Generate a video streaming url (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample ID value: 'd4dde1_6ce66a7e99db49f5964ef9f3ef97eefc'", " * ", @@ -1528,8 +2023,7 @@ "", "async function myGenerateVideoStreamingUrlFunction(fileId, options) {", " try {", - " const elevatedGenerateVideoStreamingUrl = elevate(files.generateVideoStreamingUrl);", - " const streamingUrl = await elevatedGenerateVideoStreamingUrl(fileId, options);", + " const streamingUrl = await files.generateVideoStreamingUrl(fileId, options);", "", " return streamingUrl;", " } catch (error) {", @@ -1547,15 +2041,48 @@ " * }", " */" ] + }, + { + "title": "Generate a video streaming url (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample ID value: 'd4dde1_6ce66a7e99db49f5964ef9f3ef97eefc'", + " * ", + " * Sample options value:", + " * {", + " * format: 'HLS'", + " * }", + " */", + "", + "export const myGenerateVideoStreamingUrlFunction = webMethod(Permissions.Anyone, async (fileId, options) => {", + " try {", + " const elevatedGenerateVideoStreamingUrl = elevate(files.generateVideoStreamingUrl);", + " const streamingUrl = await elevatedGenerateVideoStreamingUrl(fileId, options);", + "", + " return streamingUrl;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"downloadUrl\": {", + " * \"assetKey\": \"HLS\",", + " * \"url\": \"https://repackager.wixmp.com/video.wixstatic.com/video/d4dde1_6ce66a7e99db49f5964ef9f3ef97eefc/,720p,360p,1080p,480p,/mp4/file.mp4.urlset/master.m3u8\"", + " * }", + " * }", + " */", + "" + ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "generateVideoStreamingUrl", "isAdminMethod": true }, @@ -1598,14 +2125,63 @@ ], "examples": [ { - "title": "Get a file descriptor ", + "title": "Get a file descriptor (dashboard page code)", + "body": [ + "import { files } from 'wix-media.v2';", + "", + "/* Sample fileId value: 'w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg' */", + "", + "async function myGetFileDescriptorFunction(fileId) {", + " try {", + " const descriptor = await files.getFileDescriptor(fileId);", + "", + " console.log('Retrieved descriptor:', descriptor);", + " return descriptor;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"_createdDate\": \"2023-07-23T10:33:00.000Z\",", + " * \"_id\": \"w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg\",", + " * \"_updatedDate\": \"2023-07-23T10:33:00.000Z\",", + " * \"displayName\": \"example.jpg\",", + " * \"hash\": \"x5bq2o4p8fj68xqt25v49wdnasys04xe\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"media\": {", + " * \"image\": {", + " * \"faces\": [],", + " * \"image\": \"wix:image://v1/w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg/example.jpg\"", + " * }", + " * },", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"igje5u22nij3qkltzsnol37j3dnthvvh\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"47177\",", + " * \"sourceUrl\": \"https://example.org/filename.jpg\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg\"", + " * }", + " */" + ] + }, + { + "title": "Get a file descriptor (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "/* Sample fileId value: 'w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg' */", + "// Sample fileId value: 'w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg'", "", - "async function myGetFileDescriptorFunction(fileId) {", + "export const myGetFileDescriptorFunction = webMethod(Permissions.Anyone, async (fileId) => {", " try {", " const elevatedGetFileDescriptor = elevate(files.getFileDescriptor);", " const descriptor = await elevatedGetFileDescriptor(fileId);", @@ -1616,7 +2192,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to:", " * {", @@ -1644,17 +2220,13 @@ " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg\",", " * \"url\": \"https://static.wixstatic.com/media/w8ide0_989yy3iic89mi8880kq9jkr9x7nxiz7l~mv2.jpg\"", " * }", - " */" + " */", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "getFileDescriptor", "isAdminMethod": true }, @@ -1704,10 +2276,9 @@ ], "examples": [ { - "title": "Get file descriptors ", + "title": "Get file descriptors (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample fileIds value:", " * [ ", @@ -1719,8 +2290,7 @@ "", "async function myGetFileDescriptorsFunction(fileIds) {", " try {", - " const elevatedGetFileDescriptors = elevate(files.getFileDescriptors);", - " const descriptors = await elevatedGetFileDescriptors(fileIds);", + " const descriptors = await files.getFileDescriptors(fileIds);", "", " console.log('Retrieved descriptors:', descriptors);", " return descriptors;", @@ -1812,15 +2382,122 @@ " * }", " */" ] + }, + { + "title": "Get file descriptors (export from backend code)", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample fileIds value:", + " * [ ", + " * 'w8ide0_87051wjiadg6qj2ywxb07vn5snqxxp2q', ", + " * 'w8ide0_mnk3lozhxu0w4f1g5wuusmwqedox2w1p~mv2.jpg', ", + " * 'w8ide0_578uul37zvr7b6d7ji3cbm91rlf5dvjy.zip'", + " * ]", + " */", + "", + "export const myGetFileDescriptorsFunction = webMethod(Permissions.Anyone, async (fileIds) => {", + " try {", + " const elevatedGetFileDescriptors = elevate(files.getFileDescriptors);", + " const descriptors = await elevatedGetFileDescriptors(fileIds);", + "", + " console.log('Retrieved descriptors:', descriptors);", + " return descriptors;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", + " * {", + " * \"files\": [", + " * {", + " * \"_createdDate\": \"2023-07-23T09:05:12.000Z\",", + " * \"_id\": \"w8ide0_mnk3lozhxu0w4f1g5wuusmwqedox2w1p~mv2.jpg\",", + " * \"_updatedDate\": \"2023-07-23T09:05:12.000Z\",", + " * \"displayName\": \"image1.jpg\",", + " * \"hash\": \"d7ltmbrrmdspiyrw3db29bpi1g8lsacz\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"media\": {", + " * \"image\": {", + " * \"faces\": [],", + " * \"image\": \"wix:image://v1/w8ide0_mnk3lozhxu0w4f1g5wuusmwqedox2w1p~mv2.jpg/image1.jpg#originWidth=1000&originHeight=714\"", + " * }", + " * },", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"112689\",", + " * \"sourceUrl\": \"https://website.org/image1.jpg\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_mnk3lozhxu0w4f1g5wuusmwqedox2w1p~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/w8ide0_mnk3lozhxu0w4f1g5wuusmwqedox2w1p~mv2.jpg\"", + " * },", + " * {", + " * \"_createdDate\": \"2023-07-16T08:56:10.000Z\",", + " * \"_id\": \"w8ide0_578uul37zvr7b6d7ji3cbm91rlf5dvjy.zip\",", + " * \"_updatedDate\": \"2023-07-20T07:16:55.000Z\",", + " * \"displayName\": \"pics\",", + " * \"hash\": \"tmk0uafvzzgkddrgwgl6od1h9jsp1j9e\",", + " * \"internalTags\": [", + " * \"_fileOrigin_uploaded\"", + " * ],", + " * \"labels\": [],", + " * \"media\": {", + " * \"archive\": {", + " * \"_id\": \"w8ide0_578uul37zvr7b6d7ji3cbm91rlf5dvjy.zip\",", + " * \"filename\": \"riverpics\",", + " * \"sizeInBytes\": \"49546083\",", + " * \"url\": \"https://3ecba886-4267-11ee-be56-0242ac120002.usrfiles.com/archives/w8ide0_578uul37zvr7b6d7ji3cbm91rlf5dvjy.zip\"", + " * }", + " * },", + " * \"mediaType\": \"ARCHIVE\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"49546083\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/48c4fbc47d7298cd4406936294b4c532.png\",", + " * \"url\": \"https://3ecba886-4267-11ee-be56-0242ac120002.usrfiles.com/archives/w8ide0_578uul37zvr7b6d7ji3cbm91rlf5dvjy.zip\"", + " * },", + " * {", + " * \"_createdDate\": \"2023-07-23T12:15:55.000Z\",", + " * \"_id\": \"w8ide0_87051wjiadg6qj2ywxb07vn5snqxxp2q\",", + " * \"_updatedDate\": \"2023-07-23T12:16:14.000Z\",", + " * \"displayName\": \"video1.mp4\",", + " * \"hash\": \"pdrepnjy3cdjq8bt2lzmpdvuc47mm921\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"media\": {", + " * \"video\": \"wix:video://v1/w8ide0_87051wjiadg6qj2ywxb07vn5snqxxp2q/video1.mp4#posterUri=w8ide0_87051wjiadg6qj2ywxb07vn5snqxxp2qf001.jpg&posterWidth=1280&posterHeight=720\"", + " * },", + " * \"mediaType\": \"VIDEO\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"4384468\",", + " * \"sourceUrl\": \"https://cdn.pixabay.com/example.mp4\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_87051wjiadg6qj2ywxb07vn5snqxxp2qf002.jpg\",", + " * \"url\": \"https://video.wixstatic.com/video/w8ide0_87051wjiadg6qj2ywxb07vn5snqxxp2q/file\"", + " * }", + " * ]", + " * }", + " */", + "" + ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "getFileDescriptors", "isAdminMethod": true }, @@ -1869,21 +2546,19 @@ "docs": { "summary": "Imports a file to the Media Manager using an external URL.", "description": [ - "The `importFile()` function returns a Promise that resolves to the imported file's descriptor.\n\nThis function returns information about the imported file. Importing a file is the method through which you can add files to the Media Manager.\nUse the `parentFolderId` parameter to specify which folder you want the file to be imported to.\nIf no folder is specified, the file is imported to the `media-root` folder.\n\nTo import a file, you need to pass one of the following:\n- The file's [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` parameter of the request. For example, `'image/png'`.\n- The file's name and extension. For example, `'my-image.png'`.\n- If you don't know the file's extension or MIME type, its [media type](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes) in the `mediaType` parameter of the request. For example, `'IMAGE'`. Note that this option only works if the server hosting the media allows a 'HEAD' request." + "The `importFile()` function returns a Promise that resolves to the imported file's descriptor.\n\nThis function returns information about the imported file. Importing a file is the method through which you can add files to the Media Manager.\nUse the `parentFolderId` parameter to specify which folder you want the file to be imported to.\nIf no folder is specified, the file is imported to the `media-root` folder.\n\nTo import a file, you need to do one of the following:\n- Pass its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.\n- Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.\n- Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.\n > **Note:** If you want to validate the media type, pass the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`." ], "examples": [ { - "title": "Import a file ", + "title": "Import a file (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "/* Sample url value: 'https://example.org/filename.jpg' */", "", "async function myImportFileFunction(url) {", " try {", - " const elevatedImportFile = elevate(files.importFile);", - " const importedFile = await elevatedImportFile(url);", + " const importedFile = await files.importFile(url);", "", " console.log('Imported file successfully:', importedFile);", " return importedFile;", @@ -1920,23 +2595,63 @@ ] }, { - "title": "Import a file with options", + "title": "Import a file (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "/* Sample url value: 'https://example.org/myfilename.jpg'", - " * ", - " * Sample importOptions value:", + "// Sample url value: 'https://example.org/filename.jpg'", + "", + "export const myImportFileFunction = webMethod(Permissions.Anyone, async (url) => {", + " try {", + " const elevatedImportFile = elevate(files.importFile);", + " const importedFile = await elevatedImportFile(url);", + "", + " console.log('Imported file successfully:', importedFile);", + " return importedFile;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "});", + "", + "/* Promise resolves to:", " * {", - " * displayName: 'example',", - " * mediaType: 'IMAGE',", - " * mimeType: 'image/jpeg',", - " * parentFolderId: 'igje5u22nij3qkltzsnol37j3dnthvvh'", + " * \"file\": {", + " * \"_createdDate\": \"2023-07-23T09:19:05.000Z\",", + " * \"_id\": \"w8ide0_leac4pwk8o11v8725j9ugcbe70x3alc0~mv2.jpg\",", + " * \"_updatedDate\": \"2023-07-23T09:19:05.000Z\",", + " * \"displayName\": \"image1.jpg\",", + " * \"hash\": \"\",", + " * \"internalTags\": [],", + " * \"labels\": [],", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"PENDING\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"sizeInBytes\": \"20167\",", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sourceUrl\": \"https://example.org/filename.jpg\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_leac4pwk8o11v8725j9ugcbe70x3alc0~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/w8ide0_leac4pwk8o11v8725j9ugcbe70x3alc0~mv2.jpg\"", + " * }", " * }", " */", + "" + ] + }, + { + "title": "Import a file with options", + "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "// Sample url value: 'https://example.org/filename.jpg'", "", - "async function myImportFileFunction(url, importOptions) {", + "export const myImportFileFunction = webMethod(Permissions.Anyone, async (url, importOptions) => {", " try {", " const elevatedImportFile = elevate(files.importFile);", " const importedFile = await elevatedImportFile(url, importOptions);", @@ -1947,41 +2662,37 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", - "/* Promise resolves to: ", + "/* Promise resolves to:", " * {", " * \"file\": {", - " * \"_createdDate\": \"2023-07-23T10:32:58.000Z\",", - " * \"_id\": \"w8ide0_dvddpfvztq1dkhjqn4xz6e429vpk3oc1~mv2.jpg\",", - " * \"_updatedDate\": \"2023-07-23T10:32:58.000Z\",", - " * \"displayName\": \"example.jpg\",", + " * \"_createdDate\": \"2023-07-23T09:19:05.000Z\",", + " * \"_id\": \"w8ide0_leac4pwk8o11v8725j9ugcbe70x3alc0~mv2.jpg\",", + " * \"_updatedDate\": \"2023-07-23T09:19:05.000Z\",", + " * \"displayName\": \"image1.jpg\",", " * \"hash\": \"\",", " * \"internalTags\": [],", " * \"labels\": [],", " * \"mediaType\": \"IMAGE\",", " * \"operationStatus\": \"PENDING\",", - " * \"parentFolderId\": \"igje5u22nij3qkltzsnol37j3dnthvvh\",", + " * \"parentFolderId\": \"media-root\",", " * \"private\": false,", - " * \"sizeInBytes\": \"47177\",", + " * \"sizeInBytes\": \"20167\",", " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", - " * \"sourceUrl\": \"https://example.org/myfilename.jpg\",", + " * \"sourceUrl\": \"https://example.org/filename.jpg\",", " * \"state\": \"OK\",", - " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_dvddpfvztq1dkhjqn4xz6e429vpk3oc1~mv2.jpg\",", - " * \"url\": \"https://static.wixstatic.com/media/w8ide0_dvddpfvztq1dkhjqn4xz6e429vpk3oc1~mv2.jpg\"", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_leac4pwk8o11v8725j9ugcbe70x3alc0~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/w8ide0_leac4pwk8o11v8725j9ugcbe70x3alc0~mv2.jpg\"", " * }", " * }", - " */" + " */", + "" ] } ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "importFile", "isAdminMethod": true }, @@ -2022,15 +2733,13 @@ ], "examples": [ { - "title": "List deleted files ", + "title": "List deleted files (dashboard page code)", "body": [ "import { files } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", "", "async function myListDeletedFilesFunction() {", " try {", - " const elevatedListDeletedFiles = elevate(files.listDeletedFiles)", - " const deletedFiles = await elevatedListDeletedFiles();", + " const deletedFiles = await files.listDeletedFiles();", "", " console.log('Files in trash:', deletedFiles)", " return deletedFiles;", @@ -2188,26 +2897,16 @@ ] }, { - "title": "List deleted files with options ", + "title": "List deleted files (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "/* Sample options value:", - " * {", - " * paging: {", - " * limit: 2", - " * },", - " * sort: {", - " * order: 'ASC'", - " * }", - " * }", - " */", - "", - "async function listDeletedFiles(options) {", + "export const myListDeletedFilesFunction = webMethod(Permissions.Anyone, async () => {", " try {", " const elevatedListDeletedFiles = elevate(files.listDeletedFiles)", - " const deletedFiles = await elevatedListDeletedFiles(options);", + " const deletedFiles = await elevatedListDeletedFiles();", "", " console.log('Files in trash:', deletedFiles)", " return deletedFiles;", @@ -2215,7 +2914,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to:", " * {", @@ -2224,7 +2923,7 @@ " * \"_createdDate\": \"2023-08-09T08:45:42.000Z\",", " * \"_id\": \"d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png\",", " * \"_updatedDate\": \"2023-08-09T08:45:42.000Z\",", - " * \"displayName\": \"IMG1.png\",", + " * \"displayName\": \"image1.png\",", " * \"hash\": \"864d607a1ea270efbac32def181f039f\",", " * \"internalTags\": [", " * \"_fileOrigin_uploaded\"", @@ -2314,7 +3013,7 @@ " * }", " * },", " * \"faces\": [],", - " * \"image\": \"wix:image://v1/d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png/IMG1.png#originWidth=1170&originHeight=2532\"", + " * \"image\": \"wix:image://v1/d4dde1_32288e20a5aa4213a52b15426fb27c9f~mv2.png/image1.png#originWidth=1170&originHeight=2532\"", " * }", " * },", " * \"mediaType\": \"IMAGE\",", @@ -2331,7 +3030,7 @@ " * \"_createdDate\": \"2023-08-09T08:45:37.000Z\",", " * \"_id\": \"d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg\",", " * \"_updatedDate\": \"2023-08-09T08:45:37.000Z\",", - " * \"displayName\": \"vectorArt1c.svg\",", + " * \"displayName\": \"vectorArt1.svg\",", " * \"hash\": \"e379083c3675d7f7891da00c0708539c\",", " * \"internalTags\": [", " * \"_fileOrigin_uploaded\"", @@ -2340,7 +3039,7 @@ " * \"media\": {", " * \"image\": {", " * \"faces\": [],", - " * \"image\": \"wix:image://v1/d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg/vectorArt1c.svg#originWidth=1177&originHeight=2501\"", + " * \"image\": \"wix:image://v1/d4dde1_8dd2bfe6121f43b29ebeaa63988abf54.svg/vectorArt1.svg#originWidth=1177&originHeight=2501\"", " * }", " * },", " * \"mediaType\": \"VECTOR\",", @@ -2368,13 +3067,14 @@ { "title": "Bulk restores all non-permanently deleted files of chosen types ", "body": [ - "/*****************************************", - " * Backend code - bulk-restore-files.jsw *", - " ****************************************/", + "/********************************************", + " * Backend code - bulk-restore-files.web.js *", + " *******************************************/", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "async function restoreFiles(mediaTypes) {", + "export const restoreFiles = webMethod(Permissions.Anyone, async (mediaTypes) => {", " let idList = []", " try {", " const options = {", @@ -2399,14 +3099,14 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", "", "/*************", " * Page code *", " ************/", "", - "import { restoreFiles } from 'backend/bulk-import-files';", + "import { restoreFiles } from 'backend/bulk-restore-files.web';", "", "$w.onReady(() => {", " $w('#restoreMedia').onClick(async () => {", @@ -2448,11 +3148,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "listDeletedFiles", "isAdminMethod": true }, @@ -2489,12 +3184,98 @@ "docs": { "summary": "Retrieves a list of files in the Media Manager.", "description": [ - "The `listFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.\n\nTo retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the `parentFolderId` parameter. If no folder is specified, the endpoint retrieves only the list of files in the root folder of the Media Manager.\n\nTo retrieve a list of (non-permanently) deleted files, use the `listDeletedFiles()` function." + "The `listFiles()` function returns a Promise that resolves to an array of the specified files' descriptors and cursor information.\n\nTo retrieve a list of files within a specific folder in the Media Manager, pass the folder's ID in the `parentFolderId` parameter. If no folder is specified, the function retrieves only the list of files in the root folder of the Media Manager.\n\nTo retrieve a list of (non-permanently) deleted files, use the `listDeletedFiles()` function." ], "examples": [ { - "title": "List files in a specific folder ", + "title": "List files in a specific folder (backend page code)", + "body": [ + "import { files } from 'wix-media.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample listOptions value:", + " * {", + " * parentFolderId : 'igje5u22nij3qkltzsnol37j3dnthvvh'", + " * }", + " */", + "", + "async function myListFilesFunction(listOptions) {", + " try {", + " const elevatedListFiles = elevate(files.listFiles);", + " const fileList = await elevatedListFiles(listOptions);", + "", + " console.log('Files in folder:', fileList);", + " return fileList;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"files\": [", + " * {", + " * \"_createdDate\": \"2023-07-16T08:56:07.000Z\",", + " * \"_id\": \"w8ide0_f4dRFF610cKd7zkjVbaNddXgb181lXfg.pdf\",", + " * \"_updatedDate\": \"2023-07-16T08:56:07.000Z\",", + " * \"displayName\": \"file1.pdf\",", + " * \"hash\": \"z3bxokp79p04ok6iiu9ao8srx5lrynfh\",", + " * \"internalTags\": [", + " * \"_fileOrigin_uploaded\"", + " * ],", + " * \"labels\": [],", + " * \"media\": {", + " * \"document\": \"wix:document://v1/w8ide0_f4dRFF610cKd7zkjVbaNddXgb181lXfg.pdf/file1.pdf\"", + " * },", + " * \"mediaType\": \"DOCUMENT\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"igje5u22nij3qkltzsnol37j3dnthvvh\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"187199\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/it7ucst133nc8d9e0ff4d0nay1ucksc6.png\",", + " * \"url\": \"https://3ecba886-4267-11ee-be56-0242ac120002.usrfiles.com/ugd/w8ide0_f4dRFF610cKd7zkjVbaNddXgb181lXfg.pdf\"", + " * },", + " * {", + " * \"_createdDate\": \"2023-07-16T08:56:07.000Z\",", + " * \"_id\": \"w8ide0_170y03n3akmstnpt5jmsju89wvgs9tg4.pdf\",", + " * \"_updatedDate\": \"2023-07-16T08:56:07.000Z\",", + " * \"displayName\": \"file2.pdf\",", + " * \"hash\": \"g6x41coggaystn596ndb09q1ecg036gk\",", + " * \"internalTags\": [", + " * \"_fileOrigin_uploaded\"", + " * ],", + " * \"labels\": [],", + " * \"media\": {", + " * \"document\": \"wix:document://v1/w8ide0_170y03n3akmstnpt5jmsju89wvgs9tg4.pdf/file2.pdf\"", + " * },", + " * \"mediaType\": \"DOCUMENT\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"igje5u22nij3qkltzsnol37j3dnthvvh\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"81624\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/it7ucst133nc8d9e0ff4d0nay1ucksc6.png\",", + " * \"url\": \"https://3ecba886-4267-11ee-be56-0242ac120002.usrfiles.com/ugd/w8ide0_170y03n3akmstnpt5jmsju89wvgs9tg4.pdf\"", + " * }", + " * ],", + " * \"nextCursor\": {", + " * \"cursors\": {", + " * \"next\": \"\"", + " * },", + " * \"hasNext\": false", + " * }", + " * }", + " */" + ] + }, + { + "title": "List files in a specific folder (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", @@ -2504,7 +3285,7 @@ " * }", " */", "", - "async function myListFilesFunction(listOptions) {", + "export const myListFilesFunction = webMethod(Permissions.Anyone, async (listOptions) => {", " try {", " const elevatedListFiles = elevate(files.listFiles);", " const fileList = await elevatedListFiles(listOptions);", @@ -2515,7 +3296,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to:", " * {", @@ -2580,14 +3361,15 @@ { "title": "Generate a download url for all images in media ", "body": [ - "/**************************************", - " * Backend code - download-files-url.jsw *", - " *************************************/", + "/********************************************", + " * Backend code - download-files-url.web.js *", + " *******************************************/", "", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "export async function generateDownloadUrl(fileIds) {", + "export const generateDownloadUrl = webMethod(Permissions.Anyone, async (fileIds) => {", " try {", " const elevatedGenerateFilesDownloadUrl = elevate(files.generateFilesDownloadUrl)", " const generatedUrl = await elevatedGenerateFilesDownloadUrl(fileIds);", @@ -2596,9 +3378,9 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", " ", - "export async function listImages() {", + "export const listImages = webMethod(Permissions.Anyone, async () => {", " const listOptions = {", " mediaTypes: [\"IMAGE\"]", " }", @@ -2611,14 +3393,14 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", "", "/*************", " * Page code *", " ************/", "", - "import { listImages, generateDownloadUrl } from 'backend/download-files-url';", + "import { listImages, generateDownloadUrl } from 'backend/download-files-url.web';", "", "$w.onReady(() => {", " $w('#downloadFiles').disable();", @@ -2644,14 +3426,15 @@ { "title": "Update a file's display name from visitor input ", "body": [ - "/**********************************", - " * Backend code - update-file.jsw *", - " *********************************/", + "/*************************************", + " * Backend code - update-file.web.js *", + " ************************************/", "", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "export async function updateFile(fileId, file) {", + "export const updateFile = webMethod(Permissions.Anyone, async (fileId, file) => {", " try {", " const elevatedUpdateFileDescriptor = elevate(files.updateFileDescriptor);", " const updatedDescriptor = await elevatedUpdateFileDescriptor(fileId, file);", @@ -2660,9 +3443,9 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", - "export async function listImages() {", + "export const listImages = webMethod(Permissions.Anyone, async () => {", " const listOptions = {", " mediaTypes: [\"IMAGE\"]", " }", @@ -2675,14 +3458,14 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", "", "/*************", " * Page code *", " ************/", "", - "import { updateFile, listImages } from 'backend/update-file';", + "import { updateFile, listImages } from 'backend/update-file.web';", "", "$w.onReady(async () => {", " await populateImagesDropdown();", @@ -2710,8 +3493,7 @@ " });", "", " $w('#imagesDropdown').options = dropdownOptions;", - "};", - "" + "};" ], "extra": { "description": "This code uses the visitor's input on the page to update the display name of an image which they choose from a dropdown list on the page." @@ -2720,11 +3502,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "listFiles", "isAdminMethod": true }, @@ -2765,12 +3542,293 @@ ], "examples": [ { - "title": "Search files ", + "title": "Search files (dashboard page code)", + "body": [ + "import { files } from 'wix-media.v2';", + "", + "async function mySearchFilesFunction() {", + " try {", + " const rootFiles = await files.searchFiles();", + "", + " console.log('Files in MEDIA_ROOT', rootFiles);", + " return rootFiles;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"files\": [", + " * {", + " * \"_createdDate\": \"2023-07-16T08:54:05.000Z\",", + " * \"_id\": \"w8ide0_ouulk5w0mdr9omjkwsfyn71g4mb1olcf~mv2.jpg\",", + " * \"_updatedDate\": \"2023-07-16T08:54:05.000Z\",", + " * \"displayName\": \"image2.jpg\",", + " * \"hash\": \"800fae3e0cb7908518a391c25864436c\",", + " * \"internalTags\": [", + " * \"_fileOrigin_uploaded\"", + " * ],", + " * \"labels\": [", + " * \"label1\",", + " * \"label2\",", + " * \"label3\",", + " * \"label4\"", + " * ],", + " * \"media\": {", + " * \"image\": {", + " * \"colors\": {", + " * \"palette\": [", + " * {", + " * \"rgb\": {", + " * \"b\": 47,", + " * \"g\": 36,", + " * \"r\": 31", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 155,", + " * \"g\": 153,", + " * \"r\": 195", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 141,", + " * \"g\": 123,", + " * \"r\": 138", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 177,", + " * \"g\": 161,", + " * \"r\": 190", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 179,", + " * \"g\": 178,", + " * \"r\": 217", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 160,", + " * \"g\": 176,", + " * \"r\": 229", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 176,", + " * \"g\": 151,", + " * \"r\": 162", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 93,", + " * \"g\": 78,", + " * \"r\": 71", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 45,", + " * \"g\": 63,", + " * \"r\": 107", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 104,", + " * \"g\": 88,", + " * \"r\": 82", + " * }", + " * }", + " * ],", + " * \"prominent\": {", + " * \"rgb\": {", + " * \"b\": 26,", + " * \"g\": 36,", + " * \"r\": 39", + " * }", + " * }", + " * },", + " * \"faces\": [],", + " * \"image\": \"wix:image://v1/w8ide0_ouulk5w0mdr9omjkwsfyn71g4mb1olcf~mv2.jpg/image2.jpg#originWidth=5833&originHeight=3894\"", + " * }", + " * },", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"3013886\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_ouulk5w0mdr9omjkwsfyn71g4mb1olcf~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/w8ide0_ouulk5w0mdr9omjkwsfyn71g4mb1olcf~mv2.jpg\"", + " * },", + " * {", + " * \"_createdDate\": \"2023-07-16T08:56:07.000Z\",", + " * \"_id\": \"w8ide0_suuti24j47vesffndm8hkd651u72vp3f~mv2.jpg\",", + " * \"_updatedDate\": \"2023-07-16T08:56:07.000Z\",", + " * \"displayName\": \"image1.jpg\",", + " * \"hash\": \"fef0ylitxcnlyzxf0nahu8rh3k0i5t85\",", + " * \"internalTags\": [", + " * \"_fileOrigin_uploaded\"", + " * ],", + " * \"labels\": [", + " * \"label1\"", + " * ],", + " * \"media\": {", + " * \"image\": {", + " * \"colors\": {", + " * \"palette\": [", + " * {", + " * \"rgb\": {", + " * \"b\": 26,", + " * \"g\": 36,", + " * \"r\": 39", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 135,", + " * \"g\": 125,", + " * \"r\": 119", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 208,", + " * \"g\": 209,", + " * \"r\": 208", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 40,", + " * \"g\": 108,", + " * \"r\": 130", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 133,", + " * \"g\": 101,", + " * \"r\": 75", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 36,", + " * \"g\": 78,", + " * \"r\": 94", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 178,", + " * \"g\": 161,", + " * \"r\": 148", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 192,", + " * \"g\": 177,", + " * \"r\": 163", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 159,", + " * \"g\": 184,", + " * \"r\": 208", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 137,", + " * \"g\": 159,", + " * \"r\": 183", + " * }", + " * }", + " * ],", + " * \"prominent\": {", + " * \"rgb\": {", + " * \"b\": 26,", + " * \"g\": 36,", + " * \"r\": 39", + " * }", + " * }", + " * },", + " * \"faces\": [],", + " * \"image\": \"wix:image://v1/w8ide0_suuti24j47vesffndm8hkd651u72vp3f~mv2.jpg/image1.jpg#originWidth=5616&originHeight=3744\"", + " * }", + " * },", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"6312959\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/w8ide0_suuti24j47vesffndm8hkd651u72vp3f~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/w8ide0_suuti24j47vesffndm8hkd651u72vp3f~mv2.jpg\"", + " * },", + " * {", + " * \"_createdDate\": \"2023-07-16T08:56:10.000Z\",", + " * \"_id\": \"w8ide0_9yvsg5vv40flojo0120h0rz6ki4g0tur.zip\",", + " * \"_updatedDate\": \"2023-07-16T08:56:10.000Z\",", + " * \"displayName\": \"file1.zip\",", + " * \"hash\": \"urm9iak1w39pk381ucb9kqjphya8loro\",", + " * \"internalTags\": [", + " * \"_fileOrigin_uploaded\"", + " * ],", + " * \"labels\": [],", + " * \"media\": {", + " * \"archive\": {", + " * \"_id\": \"w8ide0_9yvsg5vv40flojo0120h0rz6ki4g0tur.zip\",", + " * \"filename\": \"file1.zip\",", + " * \"sizeInBytes\": \"49546083\",", + " * \"url\": \"https://3ecba886-4267-11ee-be56-0242ac120002.usrfiles.com/archives/w8ide0_9yvsg5vv40flojo0120h0rz6ki4g0tur.zip\"", + " * }", + " * },", + " * \"mediaType\": \"ARCHIVE\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"media-root\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"49546083\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/48c4fbc47d7298cd4406936294b4c532.png\",", + " * \"url\": \"https://3ecba886-4267-11ee-be56-0242ac120002.usrfiles.com/archives/w8ide0_9yvsg5vv40flojo0120h0rz6ki4g0tur.zip\"", + " * }", + " * ],", + " * \"nextCursor\": {", + " * \"cursors\": {", + " * \"next\": \"\"", + " * },", + " * \"hasNext\": false", + " * }", + " * }", + " */" + ] + }, + { + "title": "Search files (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "async function mySearchFilesFunction() {", + "export const mySearchFilesFunction = webMethod(Permissions.Anyone, async () => {", " try {", " const elevatedSearchFiles = elevate(files.searchFiles);", " const rootFiles = await elevatedSearchFiles();", @@ -2781,7 +3839,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to:", " * {", @@ -3044,10 +4102,7 @@ " * }", " * }", " */" - ], - "extra": { - "description": "When no `rootFolder` is specified in the options parameter, the search returns results from the root folder." - } + ] }, { "title": "Search files with options ", @@ -3229,58 +4284,59 @@ " */" ], "extra": { - "description": "When no `rootFolder` is specified in the options parameter, the search returns results from the root folder." + "description": "When no `rootFolder` is specified in the options parameter, the search returns results from the 'MEDIA_ROOT' folder." } }, { "title": "Bulk delete all files found in a chosen folder ", "body": [ - "/****************************************", - " * Backend code - bulk-delete-files.jsw *", - " ***************************************/", + "/*******************************************", + " * Backend code - bulk-delete-files.web.js *", + " ******************************************/", "", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-business-tools.v2';", "import { elevate } from 'wix-auth';", "", - "export async function deleteFiles (fileIds, options) {", + "export const deleteFiles = webMethod(Permissions.Anyone, async (fileIds, options) => {", " try {", - " const elevatedBulkDeleteFiles = elevate(files.bulkDeleteFiles) ", - " await elevatedBulkDeleteFiles(fileIds, options); ", + " const elevatedBulkDeleteFiles = elevate(files.bulkDeleteFiles);", + " await elevatedBulkDeleteFiles(fileIds, options);", "", " console.log(`Permanently deleted files with ids: ${fileIds.toString()}.`);", " return true;", " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", - "export async function searchFileIds (parentFolderId) {", + "export const searchFileIds = webMethod(Permissions.Anyone, async (parentFolderId) => {", " try {", - " const options = { parentFolder: parentFolderId}", - " const elevatedSearchFiles = elevate(files.searchFiles) ", - " const returnedFiles = await elevatedSearchFiles(options); ", + " const options = { parentFolder: parentFolderId };", + " const elevatedSearchFiles = elevate(files.searchFiles);", + " const returnedFiles = await elevatedSearchFiles(options);", "", " const fileIds = returnedFiles.map((file) => {", - " return file._id", + " return file._id;", " });", "", " return fileIds;", " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", "", "/*************", " * Page code *", " ************/", "", - "import { deleteFiles, searchFileIds } from 'backend/bulk-delete-files';", + "import { deleteFiles, searchFileIds } from 'backend/bulk-delete-files.web';", "", "$w.onReady(() => {", " $w('#delete').onClick(async () => {", " const isDeletePermanently = $w('#deletePermanently').checked;", - " const options = {permanent: isDeletePermanently};", + " const options = { permanent: isDeletePermanently };", "", " const parentFolder = $w('#parentFolder').value;", " const fileIds = await searchFileIds(parentFolder);", @@ -3288,7 +4344,8 @@ " await deleteFiles(fileIds, options);", " $w('#successMessage').show();", " });", - "});" + "});", + "" ], "extra": { "description": "This code shows a page where the visitor chooses a folder by typing the folder's name in an input box, and then all the files in the chosen folder are deleted. Only visitors with permission to manage the site's media would have access to this page." @@ -3297,11 +4354,6 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "searchFiles", "isAdminMethod": true }, @@ -3355,8 +4407,166 @@ ], "examples": [ { - "title": "Update a file's location", + "title": "Update a file's location (dashboard page code)", + "body": [ + "import { files } from 'wix-media.v2';", + "", + "/* Sample id value: 'd4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg'", + " *", + " * Sample file value:", + " * {", + " * parentFolderId: 'b2bc72834460412494c93617d88b8c89'", + " * }", + " */", + "", + "async function myUpdateFileDescriptorFunction(id, file) {", + " try {", + " const updatedDescriptor = await files.updateFileDescriptor(id, file);", + "", + " console.log(\"Updated:\", updatedDescriptor);", + " return updatedDescriptor;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"_createdDate\": \"2023-08-09T08:45:50.000Z\",", + " * \"_id\": \"d4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg\",", + " * \"_updatedDate\": \"2023-09-10T09:53:50.000Z\",", + " * \"displayName\": \"river.jpg\",", + " * \"hash\": \"2f2a61275002b90e6e8fa1be4674c4a7\",", + " * \"internalTags\": [", + " * \"_fileOrigin_uploaded\"", + " * ],", + " * \"labels\": [", + " * \"mountain stream\",", + " * \"clear stream\",", + " * \"flowing water\",", + " * \"mountain torrent\",", + " * \"free-flowing\",", + " * \"streams\",", + " * \"running water\",", + " * \"downstream\",", + " * \"watercourse\",", + " * \"stream\",", + " * \"riverbed\",", + " * \"freshwater\",", + " * \"landscape photograph\",", + " * \"motion blur\",", + " * \"fresh water\",", + " * \"river bank\",", + " * \"torrent\",", + " * \"flow into\",", + " * \"landscape photography\",", + " * \"natural scenery\"", + " * ],", + " * \"media\": {", + " * \"image\": {", + " * \"colors\": {", + " * \"palette\": [", + " * {", + " * \"rgb\": {", + " * \"b\": 41,", + " * \"g\": 41,", + " * \"r\": 24", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 135,", + " * \"g\": 105,", + " * \"r\": 62", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 195,", + " * \"g\": 154,", + " * \"r\": 105", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 230,", + " * \"g\": 190,", + " * \"r\": 141", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 96,", + " * \"g\": 77,", + " * \"r\": 44", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 144,", + " * \"g\": 135,", + " * \"r\": 99", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 64,", + " * \"g\": 106,", + " * \"r\": 64", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 178,", + " * \"g\": 131,", + " * \"r\": 80", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 247,", + " * \"g\": 230,", + " * \"r\": 185", + " * }", + " * },", + " * {", + " * \"rgb\": {", + " * \"b\": 75,", + " * \"g\": 145,", + " * \"r\": 97", + " * }", + " * }", + " * ],", + " * \"prominent\": {", + " * \"rgb\": {", + " * \"b\": 41,", + " * \"g\": 41,", + " * \"r\": 24", + " * }", + " * }", + " * },", + " * \"faces\": [],", + " * \"image\": \"wix:image://v1/d4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg/river.jpg#originWidth=5760&originHeight=3840\"", + " * }", + " * },", + " * \"mediaType\": \"IMAGE\",", + " * \"operationStatus\": \"READY\",", + " * \"parentFolderId\": \"b2bc72834460412494c93617d88b8c89\",", + " * \"private\": false,", + " * \"siteId\": \"3ecba886-4267-11ee-be56-0242ac120002\",", + " * \"sizeInBytes\": \"3677628\",", + " * \"state\": \"OK\",", + " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/d4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg\",", + " * \"url\": \"https://static.wixstatic.com/media/d4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg\"", + " * }", + " */" + ] + }, + { + "title": "Update a file's location (export from backend code)", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", @@ -3368,7 +4578,7 @@ " * }", " */", "", - "async function myUpdateFileDescriptorFunction(id, file) {", + "export const myUpdateFileDescriptorFunction = webMethod(Permissions.Anyone, async (id, file) => {", " try {", " const elevatedUpdateFileDescriptor = elevate(files.updateFileDescriptor);", " const updatedDescriptor = await elevatedUpdateFileDescriptor(id, file);", @@ -3379,7 +4589,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to:", " * {", @@ -3510,12 +4720,14 @@ " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/d4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg\",", " * \"url\": \"https://static.wixstatic.com/media/d4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg\"", " * }", - " */" + " */", + "" ] }, { - "title": "Update a file's display name and labels ", + "title": "Update a file's display name and labels", "body": [ + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", @@ -3528,7 +4740,7 @@ " * }", " */", "", - "async function myUpdateFileDescriptorFunction(id, file) {", + "export const myUpdateFileDescriptorFunction = webMethod(Permissions.Anyone, async (id, file) => {", " try {", " const elevatedUpdateFileDescriptor = elevate(files.updateFileDescriptor);", " const updatedDescriptor = await elevatedUpdateFileDescriptor(id, file);", @@ -3539,7 +4751,7 @@ " console.error(error);", " // Handle the error", " }", - "}", + "});", "", "/* Promise resolves to:", " * {", @@ -3653,21 +4865,21 @@ " * \"thumbnailUrl\": \"https://static.wixstatic.com/media/d4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg\",", " * \"url\": \"https://static.wixstatic.com/media/d4dde1_0c8b26126ba94f3daee16d9e9be04f0c~mv2.jpg\"", " * }", - " */", - "" + " */" ] }, { "title": "Update a file's display name from visitor input ", "body": [ - "/**********************************", - " * Backend code - update-file.jsw *", - " *********************************/", + "/*************************************", + " * Backend code - update-file.web.js *", + " ************************************/", "", + "import { Permissions, webMethod } from 'wix-web-module';", "import { files } from 'wix-media.v2';", "import { elevate } from 'wix-auth';", "", - "export async function updateFile(fileId, file) {", + "export const updateFile = webMethod(Permissions.Anyone, async (fileId, file) => {", " try {", " const elevatedUpdateFileDescriptor = elevate(files.updateFileDescriptor);", " const updatedDescriptor = await elevatedUpdateFileDescriptor(fileId, file);", @@ -3676,9 +4888,9 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", - "export async function listImages() {", + "export const listImages = webMethod(Permissions.Anyone, async () => {", " const listOptions = {", " mediaTypes: [\"IMAGE\"]", " }", @@ -3691,14 +4903,14 @@ " } catch (error) {", " console.error(error);", " }", - "}", + "});", "", "", "/*************", " * Page code *", " ************/", "", - "import { updateFile, listImages } from 'backend/update-file';", + "import { updateFile, listImages } from 'backend/update-file.web';", "", "$w.onReady(async () => {", " await populateImagesDropdown();", @@ -3726,8 +4938,7 @@ " });", "", " $w('#imagesDropdown').options = dropdownOptions;", - "};", - "" + "};" ], "extra": { "description": "This code uses the visitor's input on the page to update the display name of an image which they choose from a dropdown list on the page." @@ -3736,16 +4947,31 @@ ] }, "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ], "syntaxName": "updateFileDescriptor", "isAdminMethod": true } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ApplicationError", "members": [ @@ -4362,7 +5588,7 @@ "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { "name": "limit", @@ -4372,7 +5598,7 @@ "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -4392,7 +5618,200 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Files.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Files.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Files.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Files.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Files.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Files.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Files.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-media-v2.Files.EntityUpdatedEvent" + } + ], + "doc": "" } ], "docs": { @@ -4431,6 +5850,66 @@ ] } }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ExternalInfo", "members": [ @@ -6641,7 +8120,7 @@ "nativeType": "number" } ], - "doc": "Total number of items that match the query." + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." } ], "docs": { @@ -7254,7 +8733,7 @@ "nativeType": "string" } ], - "doc": "Video format\nPossible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'\n'720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm' ]" + "doc": "Video format\nPossible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'\n'720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ]" }, { "name": "height", diff --git a/wix-media-v2/wix-media-v2/Files/guides/file-id.md b/wix-media-v2/wix-media-v2/Files/guides/file-id.md deleted file mode 100644 index ff4a3a39b1..0000000000 --- a/wix-media-v2/wix-media-v2/Files/guides/file-id.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: File ID ---- - -# File ID -A file's ID is its unique identifier. It is a read-only property. - -It's good practice to save all of a file's properties in your code when you retrieve them. - -A file's ID must be retrieved programmatically. It can't be retrieved through the editor or media manager. There are several functions that include `fileId` in their response: -* [`bulkImportFiles()`](https://www.wix.com/velo/reference/wix-media-v2/files/bulkimportfiles) -* [`importFile()`](https://www.wix.com/velo/reference/wix-media-v2/files/importfile) -* [`listDeletedFiles`](https://www.wix.com/velo/reference/wix-media-v2/files/listdeletedfiles) -* [`listFiles()`](https://www.wix.com/velo/reference/wix-media-v2/files/listfiles) -* [`searchFiles()`](https://www.wix.com/velo/reference/wix-media-v2/files/searchfiles) \ No newline at end of file diff --git a/wix-media-v2/wix-media-v2/Files/guides/files-intro.md b/wix-media-v2/wix-media-v2/Files/guides/files-intro.md index 8a6586ff74..291f560f6b 100644 --- a/wix-media-v2/wix-media-v2/Files/guides/files-intro.md +++ b/wix-media-v2/wix-media-v2/Files/guides/files-intro.md @@ -4,7 +4,7 @@ title: Introduction # Introduction -  + @@ -33,27 +33,4 @@ To use the Folders API, import `{ folders }` from the `wix-media.v2` module: ```javascript import { folders } from 'wix-media.v2'; -``` - -## Terminology - -* **System folders:** Folders in the Media Manager's file system directory. - There are 3 types of system folders: - * **Root Folders:** Main categories of folders in the Media Manager. - * `MEDIA_ROOT`: Contains all files and folders in the Media Manager's 'Site Files' tab in the Media Manager. - - >**Note:** The `MEDIA_ROOT` system folder is different from the `media-root` folder of the Media Manager. - >The `MEDIA_ROOT` system folder contains all media in all levels of the **Site Files** tab in the Media Manager, while the `media-root` folder of the Media Manager contains only the media in the root level of the 'Site Files' tab in the Media Manager. - - * `TRASH_ROOT`: Contains all files and folders in the Media Manager's **Trash** tab in the Media Manager. - * `VISITOR_UPLOADS_ROOT`: Contains all files and folders created by site visitors or members. - - >**Note:** The `VISITOR_UPLOADS_ROOT` folder is located in the 'Site Files' tab in the UI. However, it is its own root folder and doesn't return when searching in the `MEDIA_ROOT` folder. - - * **Virtual Folders:** Special categories of folders in the Media Manager that are hidden from the UI and can't be deleted. - * `MOBILE_UPLOADS`: Contains all media uploaded using mobile devices. - * `PURCHASED_ITEMS`: Contains all media imported using a purchase flow. - - - * **Other Folders:** - * `VIDEO_MAKER`: Contains all videos created using Wix Video Maker. Located in the 'Site Files' tab in the UI. \ No newline at end of file +``` \ No newline at end of file diff --git a/wix-media-v2/wix-media-v2/guides/file-and-folder-ids.md b/wix-media-v2/wix-media-v2/guides/file-and-folder-ids.md new file mode 100644 index 0000000000..ad0ebcaf26 --- /dev/null +++ b/wix-media-v2/wix-media-v2/guides/file-and-folder-ids.md @@ -0,0 +1,32 @@ +--- +title: File and Folder IDs +--- + +# File ID +A file's ID is its unique identifier. It is a read-only property. + +It's good practice to save all of a file's properties in your code when you retrieve them. + +A file's ID must be retrieved programmatically. It can't be retrieved through the editor or media manager. There are several functions that include `fileId` in their response: +* [`bulkImportFiles()`](/files/bulkimportfiles) +* [`importFile()`](/files/importfile) +* [`listDeletedFiles`](/files/listdeletedfiles) +* [`listFiles()`](/files/listfiles) +* [`searchFiles()`](/files/searchfiles) + +# Folder ID +A folder's ID is its unique identifier. It is a read-only property. + +A folder's ID must be retrieved programmatically. It can't be retrieved through the editor or media manager. There are several functions that include `folderId` in their response: +* [`createFolder()`](/folders/createfolder) +* [`getFolder()`](/folders/getfolder) +* [`listDeletedFolders`](/folders/listdeletedfolders) +* [`listFolders()`](/folders/listfolders) +* [`searchFolders()`](/folders/searchfolders) +* [`updateFolder()`](/folders/updatefolder) + +## Parent Folder ID +A file's or folder's parent folder ID tells us in which folder it is located. Usually, a parent folder ID will be a string of random letters and number, for example `'7984b3c5454e4371aqbd4f4eedde96bc'`. However, there are 3 parent folders whose IDs look different (these are their IDs): +* `'media-root'` - this folder contains all files and folders in the root level of the **Site Files** tab in the media manager. +* `'visitor-uploads'` - this folder contains all files and folders in the root level of the **Visitor Uploads** tab in the media manager. +* `'trash-root'` - this folder contains all files and folders in the root level of the **Trash** tab in the media manager. \ No newline at end of file diff --git a/wix-media-v2/wix-media-v2/guides/media-intro.md b/wix-media-v2/wix-media-v2/guides/media-intro.md index c34fcb3c02..f65db92928 100644 --- a/wix-media-v2/wix-media-v2/guides/media-intro.md +++ b/wix-media-v2/wix-media-v2/guides/media-intro.md @@ -4,7 +4,7 @@ title: Introduction # Introduction -  + @@ -42,11 +42,21 @@ import wixMedia from 'wix-media.v2'; - Bulk restore all non-permanently deleted images. ## Terminology +**System folders:** Folders in the Media Manager's file system directory. +There are 3 types of system folders: +* **Root Folders:** Main categories of folders the Media Manager. + * `MEDIA_ROOT`: Contains all files and folders in the Media Manager's 'Site Files' tab in the UI. + * `TRASH_ROOT`: Contains all files and folders in the Media Manager's 'Trash' tab in the UI. + * `VISITOR_UPLOADS_ROOT`: Contains all files and folders created by site visitors or members. + + >**Notes:** + >- The `MEDIA_ROOT` system folder is different from the `media-root` folder of the Media Manager. The `MEDIA_ROOT` system folder contains all media in all levels of the 'Site Files' tab in the UI, while the `media-root` folder of the Media Manager contains only the media in the root level of the 'Site Files' tab in the UI. Similar relationships exist between `TRASH_ROOT` and `trash-root`, and `VISITOR_UPLOADS_ROOT` and `visitor-uploads`. + >- The `VISITOR_UPLOADS_ROOT` folder is located in the 'Site Files' tab in the UI. However, it is its own root folder and isn't returned when searching in the `MEDIA_ROOT` folder. + +* **Virtual Folders:** Special categories of folders in the Media Manager that are hidden from the UI and can't be deleted. + * `MOBILE_UPLOADS`: Contains all media uploaded using mobile devices. + * `PURCHASED_ITEMS`: Contains all media imported using a purchase flow. + +* **Other Folders:** + * `VIDEO_MAKER`: Contains all videos created using Wix Video Maker. Located in the 'Site Files' tab in the UI. -* **Root Folders:** - * `MEDIA_ROOT`: Contains all files and folders in the Media Manager's 'Site Files' tab in the Media Manager. - - >**Note:** The `MEDIA_ROOT` system folder is different from the `media-root` folder of the Media Manager. - >The `MEDIA_ROOT` system folder contains all media in all levels of the **Site Files** tab in the Media Manager, while the `media-root` folder of the Media Manager contains only the media in the root level of the 'Site Files' tab in the Media Manager. - - * `TRASH_ROOT`: Contains all files and folders in the Media Manager's **Trash** tab in the Media Manager. diff --git a/wix-members-backend/wix-members-backend.service.json b/wix-members-backend/wix-members-backend.service.json index 1b8283742c..45db5cda28 100644 --- a/wix-members-backend/wix-members-backend.service.json +++ b/wix-members-backend/wix-members-backend.service.json @@ -18,69 +18,7 @@ "import { authentication, authorization, badges, currentMember, members } from 'wix-members-backend';", "```", "", - "> **Note:** Functions in the Authentication, Authorization, Badges, and Members APIs can only be triggered by site collaborators with Manage Site Members [permissions](https://support.wix.com/en/article/roles-permissions-overview).", - "", - "## Custom fields", - "", - "Member profiles can contain custom data,", - "located in the member object at `contactDetails.customFields`.", - "The member object is returned when calling these functions:", - "", - "- [`currentMember.getMember()`](wix-members-backend/currentmember/getmember)", - "- [`members.getMember()`](wix-members-backend/members/getmember)", - "- [`members.updateMember()`](wix-members-backend/members/updatemember)", - "", - "The Members API works with custom fields that are", - "[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).", - "Custom fields that haven't been added to the member profile", - "aren't available through the Members API.", - "When retrieving members, empty fields are not returned.", - "You can query, create, rename, and delete custom field definitions with the Contacts", - "[Extended Fields API](wix-crm-backend/contacts/introduction#about-extended-fields).", - "", - "### Data structure", - "", - "The member's `customFields` object contains key:object pairs.", - "The key is defined in the Contacts Extended Fields API.", - "The paired object is structured as follows:", - "", - "```js", - "{", - " // ...", - " customFields: {", - " : {", - " name: 'Field 1 Display Name',", - " value: 'string' // Value stored for the member", - " },", - " : {", - " name: 'Field 2 Display Name',", - " value: 12345 // Value stored for the member", - " }", - " }", - "}", - "```", - "", - "The paired object contains these properties:", - "", - "- `name`: Display name. Read only.", - "- `value`: Value stored for the member.", - "", - "### Retrieve custom field IDs", - "", - "For a list of your site's custom field IDs,", - "use this function in your backend code:", - "", - "```js", - "import { contacts } from 'wix-crm-backend';", - "", - "export async function listCustomFieldKeys() {", - " const queryResults = await contacts.queryExtendedFields().find();", - " // Filters for custom fields (where fieldType is USER_DEFINED), then converts to an array of keys", - " return queryResults.items", - " .filter(field => field.fieldType === 'USER_DEFINED')", - " .map(field => field.key);", - "}", - "```" ], + "> **Note:** Functions in the Authentication, Authorization, Badges, and Members APIs can only be triggered by site collaborators with Manage Site Members [permissions](https://support.wix.com/en/article/roles-permissions-overview)." ], "links": [], "examples": [], "extra": @@ -92,7 +30,7 @@ "set": false, "type": "wix-members-backend.Authentication", "locations": - [ { "lineno": 156, + [ { "lineno": 95, "filename": "index.js" } ], "docs": { "summary": "The Authentication API contains functionality for authenticating users from backend code.", @@ -114,7 +52,7 @@ "set": false, "type": "wix-members-backend.Authorization", "locations": - [ { "lineno": 213, + [ { "lineno": 152, "filename": "index.js" } ], "docs": { "summary": "The Authorization API contains functionality for working with\n[member roles](https://support.wix.com/en/site-members/setting-your-members-permissions)\nfrom backend code.", @@ -136,7 +74,7 @@ "set": false, "type": "wix-members-backend.Badges", "locations": - [ { "lineno": 187, + [ { "lineno": 126, "filename": "index.js" } ], "docs": { "summary": "The Badges API contains functionality for working with [member badges](https://support.wix.com/en/article/about-member-badges) from backend code.", @@ -158,7 +96,7 @@ "set": false, "type": "wix-members-backend.CurrentMember", "locations": - [ { "lineno": 99, + [ { "lineno": 38, "filename": "index.js" } ], "docs": { "summary": "The CurrentMember API contains functionality for viewing and managing site members from backend code.", @@ -180,7 +118,7 @@ "set": false, "type": "wix-members-backend.Members", "locations": - [ { "lineno": 130, + [ { "lineno": 69, "filename": "index.js" } ], "docs": { "summary": "The Members API contains functionality for viewing and managing site members from backend code.", diff --git a/wix-members-backend/wix-members-backend/Authentication.service.json b/wix-members-backend/wix-members-backend/Authentication.service.json index 8ba6d71475..ef723f04ad 100644 --- a/wix-members-backend/wix-members-backend/Authentication.service.json +++ b/wix-members-backend/wix-members-backend/Authentication.service.json @@ -1,9 +1,10 @@ { "name": "Authentication", "memberOf": "wix-members-backend", "mixes": [], - "labels": [], + "labels": + [ "changed" ], "location": - { "lineno": 145, + { "lineno": 84, "filename": "index.js" }, "docs": { "summary": "The Authentication API contains functionality for authenticating users from backend code.", @@ -89,7 +90,8 @@ "extra": { } }, { "name": "approveByToken", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "token", @@ -111,8 +113,6 @@ "The `approveByToken()` function returns a Promise that resolves to a session token", "when the specified member is approved. Tokens must be approved within 30 hours of token creation.", "", - "> **Note:** This function replaces the deprecated `wix-users-backend.approveByToken()`. The deprecated function will continue to work, but it will not receive updates. To keep any existing code compatible with future changes, see the [migration instructions](wix-users-backend/approvebytoken#migration-instructions).", - "", "A new member's status is `\"PENDING\"`", "when the site's membership policy is set to manual approval.", "To learn more about setting your site's membership approval policy, see", @@ -812,7 +812,8 @@ "extra": { } }, { "name": "register", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "email", @@ -832,7 +833,7 @@ [ "wix-members-backend.Authentication.RegistrationResult" ] }, "doc": "Fulfilled - When the member is registered.\nRejected - Error message." }, "locations": - [ { "lineno": 68, + [ { "lineno": 65, "filename": "register.js" } ], "docs": { "summary": "Registers a new site member.", @@ -840,6 +841,8 @@ [ "The `register()` function returns a Promise that resolves to a `RegistrationResult`", " object when the member is either registered or pending registration.", "", + "> **Note:** The member data in the resolved promise will only include custom fields from your site's contacts if [they are added to your site Members in your site's dashboard](https://support.wix.com/en/article/customizing-your-member-profile-fields).", + "", " The specified `password` must be between 4 and 100 ASCII characters.", "", "#### Automatic vs. Manual Approval", @@ -862,17 +865,11 @@ "allows you to build more secure approval flows", "by keeping tokens hidden from the frontend.", "", - "> **Notes:**", - ">", - "> - Registering a member in the backend always creates a new contact,", + "> **Note:** Registering a member in the backend always creates a new contact,", "> even if a contact with the specified `email` already exists.", "> To avoid this behavior,", "> use [`register()`](wix-members-frontend/authentication/register)", - "> from the frontend `wix-members-frontend` module.", - "> - This function replaces the deprecated `wix-users-backend.register()`.", - "> The deprecated function will continue to work, but it will not receive updates.", - "> To keep any existing code compatible with future changes,", - "> see the [migration instructions](wix-users-backend/register#migration-instructions)." ], + "> from the frontend `wix-members-frontend` module." ], "links": [], "examples": [ { "title": "Register a member", @@ -883,7 +880,9 @@ " * {", " * contactInfo: {", " * firstName: 'Javier',", - " * lastName: 'Doe'", + " * lastName: 'Doe',", + " * hobby: 'Basketball,", + " * \"favorite-meal\": 'Pasta'", " * },", " * privacyStatus: 'PUBLIC'", " * }", @@ -917,9 +916,10 @@ " * \"status\": \"PENDING\",", " * \"approvalToken\": \"JWS.eyJraWQiOiJSc012MmV3MiIsImFsZyI6IkhTMjU2In0.eyJkYXRhIjoie1wiaWRcIjpcImVmYWFmMTNmLTkzNGUtNDQ0OS1iMGMyLTMwNDAzMDc2NzY3MVwiLFwiY29sbGVjdGlvbklkXCI6XCI5YmVjNThlNi02NDExLTQ5OTEtOGU1ZC0wYWRhOTE4MmI5NWVcIn0iLCJpYXQiOjE2Mjc4MjA5MjEsImV4cCI6MTYyNzkyODkyMX0.zOuE8ZXRBQT4tPPFqvseE8xKm6kHrmHG3Lrndz7l7Ng\"", " * }", - " */" ], + " */", + "" ], "extra": - { } }, + { "description": "This example contains custom fields: \"Hobby\" and \"Favorite Meal\"." } }, { "title": "Register a member using a 3rd party for approval", "body": [ "/*******************************", @@ -1211,11 +1211,12 @@ [ "string", "number", "Date" ], - "doc": "Any\n number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)\n are used to store additional information about your site's contacts. When\n 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) \n returned by [queryExtendedFields()](/wix-crm-backend/contacts/queryextendedfields) with the `custom.` prefix removed.\n You can only set values for custom fields that already exist in the Contacts\n application.", + "doc": "Any number of custom fields. [Custom fields](https://www.wix.com/velo/reference/wix-members-backend/custom-fields)\n are used to store additional information about your site's contacts.\n\n >**Note:** `customFields` is not the name of a field in the `contactInfo` object. Here, it represents any custom fields that you've chosen to implement.", "optional": true } ], "extra": { }, - "labels": [] }, + "labels": + [ "changed" ] }, { "name": "RegistrationOptions", "locations": [ { "lineno": 1, @@ -1241,7 +1242,7 @@ "labels": [] }, { "name": "RegistrationResult", "locations": - [ { "lineno": 43, + [ { "lineno": 40, "filename": "register.js" } ], "docs": { "links": [], diff --git a/wix-members-backend/wix-members-backend/Authorization.service.json b/wix-members-backend/wix-members-backend/Authorization.service.json index 49f775c4ee..a72ee9735d 100644 --- a/wix-members-backend/wix-members-backend/Authorization.service.json +++ b/wix-members-backend/wix-members-backend/Authorization.service.json @@ -3,7 +3,7 @@ "mixes": [], "labels": [], "location": - { "lineno": 200, + { "lineno": 139, "filename": "index.js" }, "docs": { "summary": "The Authorization API contains functionality for working with\n[member roles](https://support.wix.com/en/site-members/setting-your-members-permissions)\nfrom backend code.", diff --git a/wix-members-backend/wix-members-backend/Badges.service.json b/wix-members-backend/wix-members-backend/Badges.service.json index 707f10059d..d38ca0158e 100644 --- a/wix-members-backend/wix-members-backend/Badges.service.json +++ b/wix-members-backend/wix-members-backend/Badges.service.json @@ -3,7 +3,7 @@ "mixes": [], "labels": [], "location": - { "lineno": 171, + { "lineno": 110, "filename": "index.js" }, "docs": { "summary": "The Badges API contains functionality for working with [member badges](https://support.wix.com/en/article/about-member-badges) from backend code.", diff --git a/wix-members-backend/wix-members-backend/CurrentMember.service.json b/wix-members-backend/wix-members-backend/CurrentMember.service.json index 1566c261a2..173a2357b7 100644 --- a/wix-members-backend/wix-members-backend/CurrentMember.service.json +++ b/wix-members-backend/wix-members-backend/CurrentMember.service.json @@ -1,9 +1,10 @@ { "name": "CurrentMember", "memberOf": "wix-members-backend", "mixes": [], - "labels": [], + "labels": + [ "changed" ], "location": - { "lineno": 81, + { "lineno": 20, "filename": "index.js" }, "docs": { "summary": "The CurrentMember API contains functionality for viewing and managing site members from backend code.", @@ -27,7 +28,8 @@ "properties": [], "operations": [ { "name": "getMember", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "options", @@ -53,7 +55,6 @@ "> **Notes:**", "> - Currently, this function throws an error if a member isn't logged in. However, the frontend [`currentMember.getMember()`](wix-members-frontend/currentmember/getmember) resolves to `undefined` if a member isn't logged in. This function may change in the future to align with the frontend `currentMember.getMember()`.", "> - The APIs in `CurrentMember` are only partially functional when previewing your site. View a published version of your site to see their complete functionality.", - "> - This function replaces the deprecated `wix-users-backend.currentUser`. The deprecated object and its methods will continue to work, but they will not receive updates. To keep any existing code compatible with future changes, see the [migration instructions](wix-users-backend/currentuser#migration-instructions).", "" ], "links": [], "examples": @@ -153,7 +154,8 @@ "extra": { } }, { "name": "getRoles", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [], "ret": @@ -175,9 +177,7 @@ "of the currently logged-in member.", "If no member is currently logged in, the Promise is rejected.", "", - "> **Notes:**", - "> - The APIs in `CurrentMember` are only partially functional when previewing your site. View a published version of your site to see their complete functionality.", - "> - This function replaces the deprecated `wix-users-backend.currentUser.getRoles()`. The deprecated function will continue to work, but it will not receive updates. To keep any existing code compatible with future changes, see the [migration instructions](wix-users-backend/user/role#migration-instructions).", + "> **Note:** The APIs in `CurrentMember` are only partially functional when previewing your site. View a published version of your site to see their complete functionality.", "", "The following results are returned depending on the session identity:", "", diff --git a/wix-members-backend/wix-members-backend/Members.service.json b/wix-members-backend/wix-members-backend/Members.service.json index de1cdf6117..9f765b474c 100644 --- a/wix-members-backend/wix-members-backend/Members.service.json +++ b/wix-members-backend/wix-members-backend/Members.service.json @@ -4,7 +4,7 @@ "labels": [ "changed" ], "location": - { "lineno": 114, + { "lineno": 53, "filename": "index.js" }, "docs": { "summary": "The Members API contains functionality for viewing and managing site members from backend code.", @@ -347,7 +347,8 @@ "extra": { } }, { "name": "getMember", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "id", @@ -372,9 +373,7 @@ [ "", "This function returns a Promise that resolves to a member object.", "", - "> **Notes:**", - "> - This function replaces the deprecated `wix-users-backend.getUser()`. The deprecated function will continue to work, but it will not receive updates. To keep any existing code compatible with future changes, see the [migration instructions](wix-users-backend/getuser#migration-instructions).", - "> - The resolved Member object contains only the fields that were explicity added to the Member object. Custom Contact fields are **not** automatically added to the Member object. They must be [added to the Member object by the site owner](https://support.wix.com/en/article/customizing-your-member-profile-fields).", + "> **Note:** The resolved Member object contains only the fields that were explicity added to the Member object. Custom Contact fields are **not** automatically added to the Member object. They must be [added to the Member object by the site owner](https://support.wix.com/en/article/customizing-your-member-profile-fields).", "" ], "links": [], "examples": @@ -449,7 +448,8 @@ "extra": { } }, { "name": "updateMember", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "id", @@ -465,7 +465,7 @@ [ "wix-members-backend.Members.Member" ] }, "doc": "Fulfilled - Updated member.\nRejected - Error message." }, "locations": - [ { "lineno": 106, + [ { "lineno": 108, "filename": "updateMember.js" } ], "docs": { "summary": "Updates a member's properties.", @@ -485,9 +485,7 @@ "The `updateMember()` function returns a Promise that resolves to a member object", "when the specified member is updated.", "", - "> **Notes:**", - "> - This function replaces the deprecated `wix-users-backend.updateUserFields()`. The deprecated function will continue to work, but it will not receive updates. To keep any existing code compatible with future changes, see the [migration instructions](wix-users-backend/updateuserfields#migration-instructions).", - "> - The updated Member object contains only the fields that were explicity added to the Member object. Custom Contact fields are **not** automatically added to the Member object. They must be [added to the Member object by the site owner](https://support.wix.com/en/article/customizing-your-member-profile-fields).", + "> **Note:** The updated Member object contains only the fields that were explicity added to the Member object. Custom Contact fields are **not** automatically added to the Member object. They must be [added to the Member object by the site owner](https://support.wix.com/en/article/customizing-your-member-profile-fields).", "", "Only the requested fields are updated.", "", @@ -738,8 +736,7 @@ "doc": "Custom fields,\n[structured as key:object pairs](wix-members-backend/introduction#data-structure).\nCustom field IDs are defined in the\n[Contacts Extended Fields API](wix-crm-backend/contacts).\nThe paired object contains the `name` and `value` properties,\nwhere `name` is the display name and `value` is the value stored for the member.\n\nOnly custom fields\n[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)\nare available through the Members API.\nEmpty fields are not returned.\n\nWhen updating a member, `name` is ignored." } ], "extra": { }, - "labels": - [ "changed" ] }, + "labels": [] }, { "name": "ContactInfo", "locations": [ { "lineno": 17, @@ -794,7 +791,7 @@ "optional": true }, { "name": "customFields", "type": "Object", - "doc": "Custom fields,\n[structured as key:object pairs](wix-members-backend/introduction#data-structure).\nCustom field IDs are defined in the\n[Contacts Extended Fields API](wix-crm-backend/contacts), where each key is the field ID,\nand each value is the field's value for the member.\n\nOnly custom fields\n[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)\nare available through the Members API.\nEmpty fields are not returned.\n\nWhen updating a member, `name` is ignored.", + "doc": "Custom fields,\n[structured as key:object pairs](wix-members-frontend/introduction#data-structure).\nCustom field IDs are defined in the\n[Contacts Extended Fields API](wix-crm-backend/contacts).\nThe paired object contains the `name` and `value` properties,\nwhere `name` is the display name and `value` is the value stored for the member.\n\nOnly custom fields\n[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)\nare available through the Members API.\nEmpty fields are not returned.\n\nWhen updating a member, `name` is ignored.", "optional": true } ], "extra": { }, @@ -925,7 +922,7 @@ "labels": [] }, { "name": "MemberInfo", "locations": - [ { "lineno": 51, + [ { "lineno": 53, "filename": "updateMember.js" } ], "docs": { "summary": "Member details to update.", @@ -979,7 +976,7 @@ "labels": [] }, { "name": "ProfileImageInfo", "locations": - [ { "lineno": 89, + [ { "lineno": 91, "filename": "updateMember.js" } ], "docs": { "summary": "Member's profile photo.", @@ -1017,7 +1014,7 @@ "labels": [] }, { "name": "ProfileInfo", "locations": - [ { "lineno": 65, + [ { "lineno": 67, "filename": "updateMember.js" } ], "docs": { "summary": "Profile display info.", @@ -1067,7 +1064,7 @@ "labels": [] }, { "name": "StreetAddressInfo", "locations": - [ { "lineno": 81, + [ { "lineno": 83, "filename": "updateMember.js" } ], "docs": { "summary": "Street address object, with number and name in separate fields.", diff --git "a/wix-members-backend/wix-members-backend/guides/\"FullData\" Collection Fields.md" "b/wix-members-backend/wix-members-backend/guides/\"FullData\" Collection Fields.md" index 3aab5b6a4d..d451ad4be6 100644 --- "a/wix-members-backend/wix-members-backend/guides/\"FullData\" Collection Fields.md" +++ "b/wix-members-backend/wix-members-backend/guides/\"FullData\" Collection Fields.md" @@ -36,7 +36,7 @@ This document describes the permissions and fields in your FullData collection. The FullData collection has the following [permissions](https://support.wix.com/en/article/about-collection-permissions): -- **Read:** Anyone +- **Read:** Admin - **Create:** None - **Update:** None - **Delete:** None diff --git a/wix-members-backend/wix-members-backend/guides/Custom Fields.md b/wix-members-backend/wix-members-backend/guides/Custom Fields.md new file mode 100644 index 0000000000..ebb585317d --- /dev/null +++ b/wix-members-backend/wix-members-backend/guides/Custom Fields.md @@ -0,0 +1,71 @@ +# Custom fields +Member profiles can contain custom data, +located in the member object at `contactDetails.customFields`. +The member object is returned when calling these functions: + +- [`currentMember.getMember()`](wix-members-backend/currentmember/getmember) +- [`members.getMember()`](wix-members-backend/members/getmember) +- [`members.updateMember()`](wix-members-backend/members/updatemember) + +The Members API works with [custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) that are +[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). +Custom fields that haven't been added to the member profile +aren't available through the Members API. +When retrieving members, empty fields are not returned. +You can query, create, rename, and delete custom field definitions with the Contacts +[Extended Fields API](wix-crm-backend/contacts/introduction#about-extended-fields). + +## Data structure +The member's `customFields` object contains key:object pairs. +The key is defined in the Contacts Extended Fields API. +The paired object is structured as follows: + +```js +{ + // ... + customFields: { + : { + name: 'Field 1 Display Name', + value: 'string' // Value stored for the member + }, + : { + name: 'Field 2 Display Name', + value: 12345 // Value stored for the member + } + } +} +``` + +The paired object contains these properties: + +- `name`: Display name. Read only. +- `value`: Value stored for the member. + +## Retrieve custom field keys +For a list of your site's custom field keys, use this function in your backend code: + +```js +import { contacts } from 'wix-crm-backend'; + +export async function listCustomFieldKeys() { + const queryResults = await contacts.queryExtendedFields().find(); + // Filters for custom fields (where fieldType is USER_DEFINED), then converts to an array of keys + return queryResults.items + .filter(field => field.fieldType === 'USER_DEFINED') + .map(field => field.key); +} +``` + +## Set a custom field for a new site member +You can set the value of a custom field for a new site member in the `contactInfo` object +using the [`authentication.register()`](https://www.wix.com/velo/reference/wix-members-backend/authentication/register) function. +Use a key:value pair in the top level level of the `contactInfo` object, like this: + +```js +{options: + contactInfo: { + 'my-custom-field-key': 'my-custom-field-value', + 'my-custom-field-key-2': 'my-custom-field-value-2' + } +} +``` diff --git a/wix-members-frontend/wix-members-frontend.service.json b/wix-members-frontend/wix-members-frontend.service.json index 2aa0e78926..77aac0ee8d 100644 --- a/wix-members-frontend/wix-members-frontend.service.json +++ b/wix-members-frontend/wix-members-frontend.service.json @@ -16,65 +16,6 @@ "", "```js", "import { authentication, currentMember } from 'wix-members-frontend';", - "```", - "", - "## Custom fields", - "", - "Member profiles can contain custom data,", - "located in the member object at `contactDetails.customFields`.", - "The member object is returned when calling", - "[`currentMember.getMember()`](currentmember/getmember).", - "", - "The Members API works with custom fields that are", - "[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).", - "Custom fields that haven't been added to the member profile", - "aren't available through the Members API.", - "When retrieving members, empty fields are not returned.", - "You can query, create, rename, and delete custom field definitions with the Contacts", - "[Extended Fields API](wix-crm-backend/contacts/introduction#about-extended-fields).", - "", - "### Data structure", - "", - "The member's `customFields` object contains key:object pairs.", - "The key is defined in the Contacts Extended Fields API.", - "The paired object is structured as follows:", - "", - "```js", - "{", - " // ...", - " customFields: {", - " : {", - " name: 'Field 1 Display Name',", - " value: 'string' // Value stored for the member", - " },", - " : {", - " name: 'Field 2 Display Name',", - " value: 12345 // Value stored for the member", - " }", - " }", - "}", - "```", - "", - "The paired object contains these properties:", - "", - "- `name`: Display name. Read only.", - "- `value`: Value stored for the member.", - "", - "### Retrieve custom field IDs", - "", - "For a list of your site's custom field IDs,", - "use this function in your backend code:", - "", - "```js", - "import { contacts } from 'wix-crm-backend';", - "", - "export async function listCustomFieldKeys() {", - " const queryResults = await contacts.queryExtendedFields().find();", - " // Filters for custom fields (where fieldType is USER_DEFINED), then converts to an array of keys", - " return queryResults.items", - " .filter(field => field.fieldType === 'USER_DEFINED')", - " .map(field => field.key);", - "}", "```" ], "links": [], "examples": [], @@ -87,7 +28,7 @@ "set": false, "type": "wix-members-frontend.Authentication", "locations": - [ { "lineno": 116, + [ { "lineno": 58, "filename": "index.js" } ], "docs": { "summary": "The Authentication API contains functionality for authenticating members from frontend code.", @@ -109,7 +50,7 @@ "set": false, "type": "wix-members-frontend.CurrentMember", "locations": - [ { "lineno": 90, + [ { "lineno": 32, "filename": "index.js" } ], "docs": { "summary": "The CurrentMember API contains functionality for viewing and managing site members from frontend code.", diff --git a/wix-members-frontend/wix-members-frontend/Authentication.service.json b/wix-members-frontend/wix-members-frontend/Authentication.service.json index 498bd35b90..ddf26cb36e 100644 --- a/wix-members-frontend/wix-members-frontend/Authentication.service.json +++ b/wix-members-frontend/wix-members-frontend/Authentication.service.json @@ -1,9 +1,10 @@ { "name": "Authentication", "memberOf": "wix-members-frontend", "mixes": [], - "labels": [], + "labels": + [ "changed" ], "location": - { "lineno": 105, + { "lineno": 47, "filename": "index.js" }, "docs": { "summary": "The Authentication API contains functionality for authenticating members from frontend code.", @@ -722,7 +723,8 @@ "extra": { } }, { "name": "register", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "email", @@ -742,7 +744,7 @@ [ "wix-members-frontend.Authentication.RegistrationResult" ] }, "doc": "Fulfilled - When the member is registered.\nRejected - Error message." }, "locations": - [ { "lineno": 63, + [ { "lineno": 57, "filename": "register.js" } ], "docs": { "summary": "Registers a new site member.", @@ -750,8 +752,7 @@ [ "The `register()` function returns a Promise that resolves to a `RegistrationResult`", " object when the member is registered or pending registration.", "", - "> **Note:**", - "> - The member data in the resolved promise will only include custom fields from your site's contacts if [they are added to your site Members in your site's dashboard](https://support.wix.com/en/article/customizing-your-member-profile-fields).", + "> **Note:** The member data in the resolved promise will only include custom fields from your site's contacts if [they are added to your site Members in your site's dashboard](https://support.wix.com/en/article/customizing-your-member-profile-fields).", "", "The specified `password` must be between 4 and 100 ASCII characters.", "", @@ -801,6 +802,7 @@ " * firstName: 'Juan',", " * lastName: 'Doe',", " * picture: 'https://static.parastorage.com/unpkg-semver/communities-blog-statics/assets/wix-logo.png',", + " * hobby: 'Football'", " * },", " * privacyStatus: \"PRIVATE\"", " * }", @@ -819,7 +821,7 @@ " // When the site is configured for automatic approval,", " // status is \"ACTIVE\" and the member is approved and logged in.", " // To prevent logging in the member automatically,", - " // use the backendend function: wix-members-backend.authentication.register()", + " // use the backend function: wix-members-backend.authentication.register()", " console.log('Member registered and logged in:', registrationResult);", " }", " })", @@ -827,7 +829,7 @@ " console.error(error);", " });" ], "extra": - { } } ], + { "description": "This example contains a custom field, \"Hobby\"." } } ], "extra": { } }, "extra": @@ -968,13 +970,6 @@ [ "string" ] }, "doc": "List of contact's phone numbers.\n When creating a contact, if no email is\n provided, at least 1 phone number must be provided.", "optional": true }, - { "name": "labels", - "type": - { "name": "Array", - "typeParams": - [ "string" ] }, - "doc": "List of contact's labels. [Labels](https://support.wix.com/en/article/creating-contact-labels)\n are used to organize contacts. When setting the `labels` property, you can\n only list labels that already exist in your site's [Contact List](https://support.wix.com/en/article/accessing-your-contact-list).", - "optional": true }, { "name": "language", "type": "string", "doc": "Contact's language.", @@ -984,11 +979,12 @@ [ "string", "number", "Date" ], - "doc": "Any\n number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)\n are used to store additional information about your site's contacts. When\n 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) \n returned by [queryExtendedFields()](/wix-crm-backend/contacts/queryextendedfields) with the `custom.` prefix removed.\n You can only set values for custom fields that already exist in the Contacts\n application.", + "doc": "Any number of custom fields. [Custom fields](https://www.wix.com/velo/reference/wix-members-frontend/custom-fields)\n are used to store additional information about your site's contacts.\n\n >**Note:** `customFields` is not the name of a field in the `contactInfo` object. Here, it represents any custom fields that you've chosen to implement.", "optional": true } ], "extra": { }, - "labels": [] }, + "labels": + [ "changed" ] }, { "name": "LoginOptions", "locations": [ { "lineno": 1, @@ -1056,7 +1052,7 @@ "labels": [] }, { "name": "RegistrationResult", "locations": - [ { "lineno": 43, + [ { "lineno": 37, "filename": "register.js" } ], "docs": { "links": [], diff --git a/wix-members-frontend/wix-members-frontend/CurrentMember.service.json b/wix-members-frontend/wix-members-frontend/CurrentMember.service.json index 22c905c9cb..86c1e867a0 100644 --- a/wix-members-frontend/wix-members-frontend/CurrentMember.service.json +++ b/wix-members-frontend/wix-members-frontend/CurrentMember.service.json @@ -1,10 +1,9 @@ { "name": "CurrentMember", "memberOf": "wix-members-frontend", "mixes": [], - "labels": - [ "changed" ], + "labels": [], "location": - { "lineno": 76, + { "lineno": 18, "filename": "index.js" }, "docs": { "summary": "The CurrentMember API contains functionality for viewing and managing site members from frontend code.", @@ -522,8 +521,7 @@ "doc": "Custom fields,\n[structured as key:object pairs](wix-members-frontend/introduction#data-structure).\nCustom field IDs are defined in the\n[Contacts Extended Fields API](wix-crm-backend/contacts).\nThe paired object contains the `name` and `value` properties,\nwhere `name` is the display name and `value` is the value stored for the member.\n\nOnly custom fields\n[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)\nare available through the Members API.\nEmpty fields are not returned.\n\nWhen updating a member, `name` is ignored." } ], "extra": { }, - "labels": - [ "changed" ] }, + "labels": [] }, { "name": "FieldsetOptions", "locations": [ { "lineno": 1, diff --git a/wix-members-frontend/wix-members-frontend/guides/Custom Fields.md b/wix-members-frontend/wix-members-frontend/guides/Custom Fields.md new file mode 100644 index 0000000000..caa427d9ff --- /dev/null +++ b/wix-members-frontend/wix-members-frontend/guides/Custom Fields.md @@ -0,0 +1,71 @@ +# Custom fields +Member profiles can contain custom data, +located in the member object at `contactDetails.customFields`. +The member object is returned when calling these functions: + +- [`currentMember.getMember()`](wix-members-backend/currentmember/getmember) +- [`members.getMember()`](wix-members-backend/members/getmember) +- [`members.updateMember()`](wix-members-backend/members/updatemember) + +The Members API works with [custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) that are +[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). +Custom fields that haven't been added to the member profile +aren't available through the Members API. +When retrieving members, empty fields are not returned. +You can query, create, rename, and delete custom field definitions with the Contacts +[Extended Fields API](wix-crm-backend/contacts/introduction#about-extended-fields). + +## Data structure +The member's `customFields` object contains key:object pairs. +The key is defined in the Contacts Extended Fields API. +The paired object is structured as follows: + +```js +{ + // ... + customFields: { + : { + name: 'Field 1 Display Name', + value: 'string' // Value stored for the member + }, + : { + name: 'Field 2 Display Name', + value: 12345 // Value stored for the member + } + } +} +``` + +The paired object contains these properties: + +- `name`: Display name. Read only. +- `value`: Value stored for the member. + +## Retrieve custom field keys +For a list of your site's custom field keys, use this function in your backend code: + +```js +import { contacts } from 'wix-crm-backend'; + +export async function listCustomFieldKeys() { + const queryResults = await contacts.queryExtendedFields().find(); + // Filters for custom fields (where fieldType is USER_DEFINED), then converts to an array of keys + return queryResults.items + .filter(field => field.fieldType === 'USER_DEFINED') + .map(field => field.key); +} +``` + +## Set a custom field for a new site member +You can set the value of a custom field for a new site member in the `contactInfo` +object using the [`authentication.register()`](https://www.wix.com/velo/reference/wix-members-backend/authentication/register) function. +Use a key:value pair in the top level level of the `contactInfo` object, like this: + +```js +{options: + contactInfo: { + 'my-custom-field-key': 'my-custom-field-value', + 'my-custom-field-key-2': 'my-custom-field-value-2' + } +} +``` diff --git a/wix-members-v2/wix-members-v2/Badges.service.json b/wix-members-v2/wix-members-v2/Badges.service.json index ba0d56dc70..e4c5e4364c 100644 --- a/wix-members-v2/wix-members-v2/Badges.service.json +++ b/wix-members-v2/wix-members-v2/Badges.service.json @@ -62,13 +62,12 @@ "docs": { "summary": "Assigns a badge to site members.", "description": [ - "The `assignBadge()` function returns a Promise that resolves when the specified badge is assigned to the specified members.\n\nThe `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.\n\nThis function is not a universal function and runs only on the backend" + "The `assignBadge()` function returns a Promise that resolves when the specified badge is assigned to the specified members.\n\nThe `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset." ], "examples": [ { "title": "Assign a badge.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -146,13 +145,12 @@ "docs": { "summary": "Creates a badge.", "description": [ - "The `createBadge()` function returns a Promise that resolves to the newly created badge.\n\nNew badges do not have any badge permissions by default. You can set [badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge) from the Badges page in the Dashboard.\n\nIf `backgroundColor` or `textColor` are not specified, they default to `\"#796EFF\"` (purple) and `\"#FFFFFF\"` (white) respectively.\n\nThis function is not a universal function and runs only on the backend" + "The `createBadge()` function returns a Promise that resolves to the newly created badge.\n\nNew badges do not have any badge permissions by default. You can set [badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge) from the Badges page in the Dashboard.\n\nIf `backgroundColor` or `textColor` are not specified, they default to `\"#796EFF\"` (purple) and `\"#FFFFFF\"` (white) respectively." ], "examples": [ { "title": "Create a new badge.", "body": [ - "", "import { badges } from 'wix-members-backend';", "import { elevate } from 'wix-auth';", "", @@ -183,7 +181,7 @@ "/* Promise resolves to:", " * {", " * \"_createdDate\": \"2024-01-18T13:08:22.116Z\",", - " * \"_id\": \"8416dce6-4dbf-4415-bc03-109412742b4b\",", + " * \"_id\": \"b025f7a8-9c3e-4f5d-a2e7-8dc1bf3ca0f1\",", " * \"_updatedDate\": \"2024-01-18T13:08:22.116Z\",", " * \"backgroundColor\": \"#796EFF\",", " * \"description\": \"Recognized Contributor\",", @@ -195,6 +193,81 @@ " * }", " */" ] + }, + { + "title": "Create an expert contributor badge. ", + "body": [ + "import { badges } from 'wix-members-backend';", + "import { elevate } from 'wix-auth';", + "import wixData from 'wix-data';", + "", + "/* Sample badge value:", + " * {", + " * backgroundColor: \"#42A5F5\",", + " * description: \"Expert Contributor Badge\",", + " * icon: \"http://example.com/expert-badge-icon.svg\",", + " * permissionsEnabled: true,", + " * textColor: \"#FFFFFF\",", + " * title: \"Expert Contributor Badge\"", + " * }", + " * }", + " */", + "", + "export async function createExpertContributorBadge(memberId) {", + " const EXPERT_THRESHOLD = 5; // Minimum number of blog posts to be considered an expert contributor", + " const SUBJECT_KEYWORD = 'velo'; // Subject keyword for blog posts", + "", + " // Count the number of blog posts created by the member with the given ID on the subject of 'velo'", + " const blogPostsCount = await wixData.query('BlogPosts')", + " .eq('author', memberId)", + " .contains('tags', SUBJECT_KEYWORD)", + " .count();", + "", + " // Count if the member meets the criteria to be an expert contributor", + " if (blogPostsCount >= EXPERT_THRESHOLD) {", + " const expertBadge = {", + " backgroundColor: \"#42A5F5\",", + " description: \"Expert Contributor Badge\",", + " icon: \"http://example.com/expert-badge-icon.svg\",", + " permissionsEnabled: true,", + " textColor: \"#FFFFFF\",", + " title: \"Expert Contributor Badge\"", + " };", + "", + " try {", + " const elevatedCreateBadge = elevate(badges.createBadge);", + " const newExpertBadge = await elevatedCreateBadge(expertBadge);", + "", + " console.log('Expert badge created for member ', memberId, ': ', newExpertBadge);", + " return newExpertBadge;", + " } catch (error) {", + " console.error('Error creating expert badge:', error);", + " // Handle the error", + " }", + " } else {", + " console.log('Member with ID ', memberId, ' does not meet the criteria for the expert badge.');", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"_createdDate\": \"2024-02-02T12:00:00.000Z\",", + " * \"_id\": \"unique-id-for-expert-badge-1\",", + " * \"_updatedDate\": \"2024-02-02T12:00:00.000Z\",", + " * \"backgroundColor\": \"#42A5F5\",", + " * \"description\": \"Expert Contributor Badge\",", + " * \"icon\": \"http://example.com/expert-badge-icon.svg\",", + " * \"permissionsEnabled\": true,", + " * \"slug\": \"expert-contributor-badge-1\",", + " * \"textColor\": \"#FFFFFF\",", + " * \"title\": \"Expert Contributor Badge\"", + " * }", + " */", + "" + ], + "extra": { + "description": "This code automates the creation of an \"Expert Contributor Badge\" for users with a specific number of blog posts on the subject 'velo'." + } } ] }, @@ -237,13 +310,12 @@ "docs": { "summary": "Deletes a badge.", "description": [ - "The `deleteBadge()` function returns a Promise that resolves when the specified badge is deleted.\n\nThe `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.\n\nThis function is not a universal function and runs only on the backend" + "The `deleteBadge()` function returns a Promise that resolves when the specified badge is deleted.\n\nThe `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset." ], "examples": [ { "title": "Delete existing badge.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -257,7 +329,7 @@ " console.log(\"Badge deleted: \", deletedBadge);", " return deletedBadge;", " } catch (error) {", - " console.error(error);", + " console.error(error);", " // Handle the error", "", " }", @@ -308,13 +380,12 @@ "docs": { "summary": "Retrieves information about a badge.", "description": [ - "The `getBadge` function returns a Promise that resolves when the badge information is retrieved." + "The `getBadge` function returns a Promise that resolves when the badge information is retrieved.\n\nThe `_id` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.\n\nThis function is not a universal function and runs only on the backend." ], "examples": [ { "title": "Get badge details.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -382,13 +453,12 @@ "docs": { "summary": "Retrieves member count per badge.", "description": [ - "The `getMemberCountsPerBadge` function returns a Promise that resolves when the member counts of each badge are retrieved." + "The `getMemberCountsPerBadge` function returns a Promise that resolves when the member counts of each badge are retrieved.\n\nThis function is not a universal function and runs only on the backend." ], "examples": [ { "title": "Get member count for badge.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -471,13 +541,12 @@ "docs": { "summary": "Lists the badges.", "description": [ - "The `listBadges` function returns a Promise that resolves when the badges are retrieved. Retrieves up to 1000 badges, given the requested paging. Default paging.limit is 100, paging.offset - 0." + "The `listBadges` function returns a Promise that resolves when the badges are retrieved. Retrieves up to 1000 badges, given the requested paging. Default paging.limit is 100, paging.offset - 0.\n\nThis function is not a universal function and runs only on the backend." ], "examples": [ { "title": "Lists all badges.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -600,13 +669,12 @@ "docs": { "summary": "Lists the badges assigned to each of the specified site members.", "description": [ - "The `listBadgesPerMember()` function returns a Promise that resolves to a list of badge IDs associated with each of the specified members." + "The `listBadgesPerMember()` function returns a Promise that resolves to a list of badge IDs associated with each of the specified members.\n\nThis function is not a universal function and runs only on the backend." ], "examples": [ { "title": "List badges assigned to specified members.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -695,13 +763,12 @@ "docs": { "summary": "Lists the IDs of all members assigned to a badge.", "description": [ - "The `listMembersByBadge()` function returns a Promise that resolves to a list of member IDs assigned to the specified badge.\n\nRetrieves up to 1000 site members who have a specified badge. Default `paging.limit` is 100, `paging.offset` - 0." + "The `listMembersByBadge()` function returns a Promise that resolves to a list of member IDs assigned to the specified badge.\n\nRetrieves up to 1000 site members who have a specified badge. Default `paging.limit` is 100, `paging.offset` - 0.\n\nThe `_id` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.\n\nThis function is not a universal function and runs only on the backend." ], "examples": [ { "title": "List member IDs with assigned badges.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -802,13 +869,12 @@ "docs": { "summary": "Removes site members from an assigned badge.", "description": [ - "The `unassignBadge()` function returns a Promise that resolves when the specified members are removed as holders of the specified badge.\n\nThe `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.\n\nThis function is not a universal function and runs only on the backend" + "The `unassignBadge()` function returns a Promise that resolves when the specified members are removed as holders of the specified badge.\n\nThe `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset." ], "examples": [ { "title": "Remove assigned badge from member.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -891,13 +957,12 @@ "docs": { "summary": "Updates a badge.", "description": [ - "The `updateBadge()` function returns a Promise that resolves to the updated badge.\n\nOnly the properties passed in the `BadgeInfo` object will be updated. All other properties will remain the same.\n\nBecause the badge `slug` is based on the badge `title`, if you change `title`, `slug` is updated accordingly.\n\n`badgeId` must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.\n\nThis function is not a universal function and runs only on the backend" + "The `updateBadge()` function returns a Promise that resolves to the updated badge.\n\nOnly the properties passed in the `BadgeInfo` object will be updated. All other properties will remain the same.\n\nBecause the badge `slug` is based on the badge `title`, if you change `title`, `slug` is updated accordingly.\n\n`badgeId` must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset." ], "examples": [ { "title": "Update existing badge.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -932,13 +997,13 @@ " * \"_createdDate\": \"2024-01-18T10:27:14.878Z\",", " * \"_id\": \"215be5d9-4b32-4861-9eb5-2152930dd0b4\",", " * \"_updatedDate\": \"2024-01-18T14:50:36.174Z\",", - " * \"backgroundColor\": \"#42A5F5\",", - " * \"description\": \"Outstanding Contributor Badge\",", - " * \"icon\": \"https://example.com/custom-badge-icon.svg\",", + " * \"backgroundColor\": \"#FED8B1\",", + " * \"description\": \"Contributed 5 posts this month\",", + " * \"icon\": \"https://static.wixstatic.com/shapes/132b9a3d51884000acaf705eeeb0e296.svg\",", " * \"permissionsEnabled\": true,", " * \"slug\": \"super-contributor\",", - " * \"textColor\": \"#FFFF00\",", - " * \"title\": \"Super Contributor\"", + " * \"textColor\": \"#000000\",", + " * \"title\": \"Rising Star\"", " * }", " */" ] @@ -991,13 +1056,12 @@ "docs": { "summary": "Updates badges' display order.", "description": [ - "This function is not a universal function and runs only on the backend" + "The `badgeId` parameter must be an ID from your site's `Members/Badges` collection. Typically, you retrieve the ID from the collection using a query or through a dataset.\n\nThis function is not a universal function and runs only on the backend" ], "examples": [ { "title": "Updates badge display order.", "body": [ - "", "import { badges } from 'wix-members.v2';", "import { elevate } from 'wix-auth';", "", @@ -1039,7 +1103,7 @@ " * },", " * {", " * \"_createdDate\": \"2024-01-18T13:53:11.659Z\",", - " * \"_id\": \"b657b857-774a-4dde-9b0e-f364d61092ea\",", + " * \"_id\": \"aedd9a3d-1efa-45ce-85d6-df09a167e37e\",", " * \"_updatedDate\": \"2024-01-18T13:53:11.659Z\",", " * \"backgroundColor\": \"#796EFF\",", " * \"description\": \"Completed challenging tasks and achieved milestones.\",", @@ -1277,7 +1341,7 @@ "nativeType": "boolean" } ], - "doc": "Whether the badge has special permissions\nto access specific members-only pages.\nWhen `true`, members with the badge receive special permissions,\nand site contributors can\n[manage badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge)\nin the site dashboard.\nWhen `false`, members with the badge receive no special permissions." + "doc": "Whether the badge has special permissions\nto access specific members-only pages.\nWhen `true`, members with the badge receive special permissions,\nand site contributors can\n[manage badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge)\nin the Dashboard.\nWhen `false`, members with the badge receive no special permissions." }, { "name": "slug", @@ -2201,7 +2265,7 @@ "nativeType": "boolean" } ], - "doc": "Whether the badge has special permissions\nto access specific members-only pages.\nWhen `true`, members with the badge receive special permissions,\nand site contributors can\n[manage badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge)\nin the site dashboard.\nWhen `false`, members with the badge receive no special permissions." + "doc": "Whether the badge has special permissions\nto access specific members-only pages.\nWhen `true`, members with the badge receive special permissions,\nand site contributors can\n[manage badge permissions](https://support.wix.com/en/article/setting-permissions-for-a-member-badge)\nin the Dashboard.\nWhen `false`, members with the badge receive no special permissions." }, { "name": "slug", diff --git a/wix-members-v2/wix-members-v2/Events.service.json b/wix-members-v2/wix-members-v2/Events.service.json index 9db98ebcae..8f7b97a5a8 100644 --- a/wix-members-v2/wix-members-v2/Events.service.json +++ b/wix-members-v2/wix-members-v2/Events.service.json @@ -3050,7 +3050,7 @@ } } ], - "doc": "Supported values:\n- `'EXTENDED'`\n- `'FULL'`\n- `'PUBLIC'`" + "doc": "Predefined set of fields to return. One of:\n\n- `FULL`: Returns all fields.\n- `PUBLIC`: Returns `id`, `contactId`, and the `profile` object. `status`, `privacyStatus`, and `activityStatus` are returned as `UNKNOWN`.\n- `EXTENDED`: Returns `id`, `loginEmail`, `status`, `contactId`, `privacyStatus`, `activityStatus`, and the `profile` object.\n\nDefault: `PUBLIC`.\n" } ], "docs": { diff --git a/wix-members-v2/wix-members-v2/Members.service.json b/wix-members-v2/wix-members-v2/Members.service.json index 36c77af2ee..b7a1c05c40 100644 --- a/wix-members-v2/wix-members-v2/Members.service.json +++ b/wix-members-v2/wix-members-v2/Members.service.json @@ -176,7 +176,7 @@ "docs": { "summary": "Deletes a member's street addresses.", "description": [ - "The `deleteMemberAddresses()` function clears the `addresses` array under the `contact` property.\n" + "The `deleteMemberAddresses()` function clears the `addresses` array under the `contact` property.\n\n> **Note:**\n> Only logged-in members can call this function without elevated permissions.\n> To call this function as a different identity, [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) are required." ], "examples": [ { @@ -270,7 +270,7 @@ "docs": { "summary": "Clears a member's email addresses.", "description": [ - "The `deleteMemberEmails()` function clears the `emails` array under the `contact` property.\n\n> **Note:**\n> A member can still log in with their `loginEmail`,\n> which is not cleared when this function is called." + "The `deleteMemberEmails()` function clears the `emails` array under the `contact` property.\n\n> **Note:**\n> A member can still log in with their `loginEmail`,\n> which is not cleared when this function is called.\n\n> **Note:**\n> Only logged-in members can call this function without elevated permissions.\n> To call this function as a different identity, [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) are required." ], "examples": [ { @@ -372,7 +372,7 @@ "docs": { "summary": "Clears a member's phone numbers.", "description": [ - "The `deleteMemberPhones()` function clears the `phones` array under the `contact` property." + "The `deleteMemberPhones()` function clears the `phones` array under the `contact` property.\n\n> **Note:**\n> Only logged-in members can call this function without elevated permissions.\n> To call this function as a different identity, [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) are required." ], "examples": [ { @@ -472,7 +472,7 @@ "docs": { "summary": "Retrieves the currently logged-in member.", "description": [ - "" + ">**Note:**\n>This endpoint is relevant only for [Headless](https://dev.wix.com/docs/go-headless/getting-started/about-headless/about-wix-headless) projects.\n\n" ], "examples": [ { @@ -646,7 +646,7 @@ "docs": { "summary": "Joins the currently logged-in member to the site community and sets their profile to public.", "description": [ - "When a member's profile is public, they have access to the site's\n[Members Area](https://support.wix.com/en/article/about-members-area)\nfeatures — such as chat, forum, and followers —\nand their profile is visible to other members and site visitors." + "When a member's profile is public, they have access to the site's\n[Members Area](https://support.wix.com/en/article/about-members-area)\nfeatures — such as chat, forum, and followers —\nand their profile is visible to other members and site visitors.\n\n> **Note:**\n> Only logged-in members can call this function without elevated permissions.\n> To call this function as a different identity, [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) are required." ], "examples": [ { @@ -734,7 +734,7 @@ "docs": { "summary": "Removes the currently logged-in member from the site community and sets their profile to private.", "description": [ - "When a member's profile is private,\nthey do not have access to the site's\n[Members Area](https://support.wix.com/en/article/about-members-area)\nfeatures — such as chat, forum, and followers —\nand their profile is hidden from other members and site visitors.\n\n> **Note:**\n> If a member leaves the site's community, their content (such as forum posts and blog comments) remain publicly visible." + "When a member's profile is private,\nthey do not have access to the site's\n[Members Area](https://support.wix.com/en/article/about-members-area)\nfeatures — such as chat, forum, and followers —\nand their profile is hidden from other members and site visitors.\n\n> **Note:**\n> If a member leaves the site's community, their content (such as forum posts and blog comments) remain publicly visible.\n\n\n> **Note:**\n> Only logged-in members can call this function without elevated permissions.\n> To call this function as a different identity, [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) are required." ], "examples": [ { @@ -975,7 +975,9 @@ }, "docs": { "summary": "Updates the currently logged in member's slug.", - "description": [], + "description": [ + "> **Note:**\n> Only logged-in members can call this function without elevated permissions.\n> To call this function as a different identity, [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) are required." + ], "examples": [ { "title": "updateCurrentMemberSlug example", @@ -1051,7 +1053,7 @@ "docs": { "summary": "Updates a member's properties.", "description": [ - "Only the requested fields are updated.\nTo clear a field's value, set an empty value with an empty string `\"\"`.\n\n> **Notes:**\n> Updating the `contact.addresses`, `contact.emails`, or `contact.phones` array overwrites the entire array, so any existing values you want to retain must be passed in the `updateMember()` call along with the new values to add.\n> However, passing an empty array will have no effect, and these functions must be used to clear all data from the respective array:\n>- To clear `contact.addresses`, use `deleteMemberAddresses()`.\n>- To clear `contact.emails`, use `deleteMemberEmails()`.\n>- To clear `contact.phones`, use `deleteMemberPhones()`." + "Only the requested fields are updated.\nTo clear a field's value, set an empty value with an empty string `\"\"`.\n\n> **Notes:**\n> Updating the `contact.addresses`, `contact.emails`, or `contact.phones` array overwrites the entire array, so any existing values you want to retain must be passed in the `updateMember()` call along with the new values to add.\n> However, passing an empty array will have no effect, and these functions must be used to clear all data from the respective array:\n>- To clear `contact.addresses`, use `deleteMemberAddresses()`.\n>- To clear `contact.emails`, use `deleteMemberEmails()`.\n>- To clear `contact.phones`, use `deleteMemberPhones()`.\n\n> **Note:**\n> Only logged-in members can call this function without elevated permissions.\n> To call this function as a different identity, [elevated permissions](https://www.wix.com/velo/reference/wix-auth/elevate) are required." ], "examples": [ { @@ -2451,7 +2453,7 @@ } } ], - "doc": "Supported values:\n- `'EXTENDED'`\n- `'FULL'`\n- `'PUBLIC'`" + "doc": "Predefined set of fields to return. One of:\n\n- `FULL`: Returns all fields.\n- `PUBLIC`: Returns `id`, `contactId`, and the `profile` object. `status`, `privacyStatus`, and `activityStatus` are returned as `UNKNOWN`.\n- `EXTENDED`: Returns `id`, `loginEmail`, `status`, `contactId`, `privacyStatus`, `activityStatus`, and the `profile` object.\n\nDefault: `PUBLIC`.\n" } ], "docs": { @@ -2571,7 +2573,7 @@ } } ], - "doc": "Supported values:\n- `'EXTENDED'`\n- `'FULL'`\n- `'PUBLIC'`" + "doc": "Predefined set of fields to return. One of:\n\n- `FULL`: Returns all fields.\n- `PUBLIC`: Returns `id`, `contactId`, and the `profile` object. `status`, `privacyStatus`, and `activityStatus` are returned as `UNKNOWN`.\n- `EXTENDED`: Returns `id`, `loginEmail`, `status`, `contactId`, `privacyStatus`, `activityStatus`, and the `profile` object.\n\nDefault: `PUBLIC`.\n" } ], "docs": { diff --git a/wix-pricing-plans-frontend/wix-pricing-plans-frontend/Checkout.service.json b/wix-pricing-plans-frontend/wix-pricing-plans-frontend/Checkout.service.json index b24d8581ab..b6898bd821 100644 --- a/wix-pricing-plans-frontend/wix-pricing-plans-frontend/Checkout.service.json +++ b/wix-pricing-plans-frontend/wix-pricing-plans-frontend/Checkout.service.json @@ -1,8 +1,7 @@ { "name": "Checkout", "memberOf": "wix-pricing-plans-frontend", "mixes": [], - "labels": - [ "changed" ], + "labels": [], "location": { "lineno": 106, "filename": "pricing-plans.js" }, @@ -90,8 +89,7 @@ "properties": [], "operations": [ { "name": "createOnlineOrder", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "planId", @@ -307,8 +305,7 @@ "extra": { } }, { "name": "startOnlinePurchase", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [ { "name": "planId", diff --git a/wix-pricing-plans-frontend/wix-pricing-plans-frontend/CustomPurchaseFlow.service.json b/wix-pricing-plans-frontend/wix-pricing-plans-frontend/CustomPurchaseFlow.service.json index 06e5c580fb..5c437b719a 100644 --- a/wix-pricing-plans-frontend/wix-pricing-plans-frontend/CustomPurchaseFlow.service.json +++ b/wix-pricing-plans-frontend/wix-pricing-plans-frontend/CustomPurchaseFlow.service.json @@ -1,7 +1,8 @@ { "name": "CustomPurchaseFlow", "memberOf": "wix-pricing-plans-frontend", "mixes": [], - "labels": [], + "labels": + [ "changed" ], "location": { "lineno": 69, "filename": "custom-purchase-flow.js" }, @@ -119,13 +120,13 @@ "extra": { } }, { "name": "navigateToCheckout", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "options", "type": "wix-pricing-plans-frontend.CustomPurchaseFlow.CheckoutOptions", - "doc": "Options to customize the Checkout page and subsequent flow.", - "optional": true } ], + "doc": "Options to customize the Checkout page and subsequent flow." } ], "ret": { "type": "void" }, "locations": @@ -167,13 +168,13 @@ "extra": { } }, { "name": "navigateToPricingPage", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "options", "type": "wix-pricing-plans-frontend.CustomPurchaseFlow.PricingPageOptions", - "doc": "Options to customize the Plans & Pricing page and subsequent flow.", - "optional": true } ], + "doc": "Options to customize the Plans & Pricing page and subsequent flow." } ], "ret": { "type": "void" }, "locations": @@ -236,13 +237,16 @@ "doc": "Selected pricing plan ID." }, { "name": "minStartDate", "type": "string", - "doc": "Earliest date the selected plan can start in `yyyy-MM-dd` format." }, + "doc": "Earliest date the selected plan can start in `yyyy-MM-dd` format.", + "optional": true }, { "name": "maxStartDate", "type": "string", - "doc": "Latest date the selected plan can start in `yyyy-MM-dd` format." }, + "doc": "Latest date the selected plan can start in `yyyy-MM-dd` format.", + "optional": true }, { "name": "thankYouPage", "type": "wix-pricing-plans-frontend.CustomPurchaseFlow.ThankYouPage", - "doc": "The data associated with the Thank You page." } ], + "doc": "The data associated with the Thank You page.", + "optional": true } ], "extra": { }, "labels": [] }, @@ -259,13 +263,16 @@ "members": [ { "name": "minStartDate", "type": "string", - "doc": "Earliest date the selected plan can start in `yyyy-MM-dd` format." }, + "doc": "Earliest date the selected plan can start in `yyyy-MM-dd` format.", + "optional": true }, { "name": "maxStartDate", "type": "string", - "doc": "Latest date the selected plan can start in `yyyy-MM-dd` format." }, + "doc": "Latest date the selected plan can start in `yyyy-MM-dd` format.", + "optional": true }, { "name": "thankYouPage", "type": "wix-pricing-plans-frontend.CustomPurchaseFlow.ThankYouPage", - "doc": "The data associated with the Thank You page." } ], + "doc": "The data associated with the Thank You page.", + "optional": true } ], "extra": { }, "labels": [] }, @@ -285,19 +292,24 @@ { "name": "Array", "typeParams": [ "string" ] }, - "doc": "List of plan IDs displayed on the Plans & Pricing page." }, + "doc": "List of plan IDs displayed on the Plans & Pricing page.", + "optional": true }, { "name": "title", "type": "string", - "doc": "Plans & Pricing page title." }, + "doc": "Plans & Pricing page title.", + "optional": true }, { "name": "subtitle", "type": "string", - "doc": "Plans & Pricing page subtitle." }, + "doc": "Plans & Pricing page subtitle.", + "optional": true }, { "name": "checkout", "type": "wix-pricing-plans-frontend.CustomPurchaseFlow.CheckoutPageOptions", - "doc": "The data associated with the Checkout page." } ], + "doc": "The data associated with the Checkout page.", + "optional": true } ], "extra": { }, - "labels": [] }, + "labels": + [ "changed" ] }, { "name": "ThankYouPage", "locations": [ { "lineno": 25, @@ -311,13 +323,16 @@ "members": [ { "name": "content", "type": "wix-pricing-plans-frontend.CustomPurchaseFlow.content", - "doc": "The content displayed on the Thank You page." }, + "doc": "The content displayed on the Thank You page.", + "optional": true }, { "name": "navigation", "type": "wix-pricing-plans-frontend.CustomPurchaseFlow.navigation", - "doc": "The page to navigate to when a user clicks the button on the Thank You Page.\nIt must be a page on your site." } ], + "doc": "The page to navigate to when a user clicks the button on the Thank You Page.\nIt must be a page on your site.", + "optional": true } ], "extra": { }, - "labels": [] }, + "labels": + [ "changed" ] }, { "name": "content", "locations": [ { "lineno": 1, @@ -331,13 +346,16 @@ "members": [ { "name": "title", "type": "string", - "doc": "Thank You page title." }, + "doc": "Thank You page title.", + "optional": true }, { "name": "message", "type": "string", - "doc": "Thank You page body." }, + "doc": "Thank You page body.", + "optional": true }, { "name": "cta", "type": "string", - "doc": "Thank You page button label." } ], + "doc": "Thank You page button label.", + "optional": true } ], "extra": { }, "labels": [] }, diff --git a/wix-pricing-plans-v2/wix-pricing-plans-v2/Orders.service.json b/wix-pricing-plans-v2/wix-pricing-plans-v2/Orders.service.json index cda14d15fe..9b7ac1a55b 100644 --- a/wix-pricing-plans-v2/wix-pricing-plans-v2/Orders.service.json +++ b/wix-pricing-plans-v2/wix-pricing-plans-v2/Orders.service.json @@ -59,26 +59,41 @@ ], "examples": [ { - "title": "cancelOrder example", + "title": "Cancel an order immediately ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function cancelOrder(id, effectiveAt) {", - " try {", - " const result = await orders.cancelOrder(id, effectiveAt);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample _id value: 'e6f12ae0-2618-41e7-a643-31ca2ee51e2b'", + " *", + " * Sample effectiveAt value: 'IMMEDIATELY'", + " */", + "", + "const elevatedCancelOrder = elevate(orders.cancelOrder);", + "", + "export async function myCancelOrderFunction(_id, effectiveAt) {", + " try {", + " await elevatedCancelOrder(_id, effectiveAt);", + "", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */", + " " ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "cancelOrder", "isAdminMethod": true }, @@ -95,6 +110,16 @@ "doc": "ID of the plan being ordered. See [Plans for more information about plan IDs](plans)", "required": true }, + { + "name": "memberId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the member ordering the plan.", + "required": true + }, { "name": "options", "type": [ @@ -107,7 +132,7 @@ } ], "requiredFields": [ - "options.memberId", + "memberId", "planId" ], "ret": { @@ -132,26 +157,215 @@ ], "examples": [ { - "title": "createOfflineOrder example", + "title": "Create an offline order ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function createOfflineOrder(planId, options) {", - " try {", - " const result = await orders.createOfflineOrder(planId, options);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample planId value: 'cb4a8c57-273a-4567-94e3-cc43d5d339f2' ", + " *", + " * Sample memberId value: '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4'", + " */", + "", + "const elevatedCreateOfflineOrder = elevate(orders.createOfflineOrder);", + "", + "export async function myCreateOfflineOrderFunction(planId, memberId) {", + " try {", + " const newOrder = await elevatedCreateOfflineOrder(planId, memberId);", + "", + " return newOrder;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"_createdDate\": \"2024-01-28T09:49:21.041Z\",", + " * \"_id\": \"82d99338-5653-459a-a751-b57483f7cfb5\",", + " * \"_updatedDate\": \"2024-01-28T09:49:21.041Z\",", + " * \"autoRenewCanceled\": false,", + " * \"buyer\": {", + " * \"contactId\": \"554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4\",", + " * \"memberId\": \"554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4\"", + " * },", + " * \"currentCycle\": {", + " * \"endedDate\": \"2024-04-27T09:49:21.041Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-28T09:49:21.041Z\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"endedDate\": \"2024-04-27T09:49:21.041Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-28T09:49:21.041Z\"", + " * }", + " * ],", + " * \"earliestEndDate\": \"2026-04-27T09:49:21.041Z\",", + " * \"endDate\": \"2026-04-27T09:49:21.041Z\",", + " * \"formData\": {", + " * \"submissionData\": {", + " * \"formId\": \"3ef36359-24bd-471a-aa8b-a5ca683b50f4\",", + " * \"submissionData\": {},", + " * \"submissionId\": \"e65d5d60-7e07-4d2f-971f-e471dcebd0d2\"", + " * },", + " * },", + " * \"freeTrialDays\": 90,", + " * \"lastPaymentStatus\": \"UNPAID\",", + " * \"pausePeriods\": [],", + " * \"planDescription\": \"3 mo free trial with discount for 1 year\",", + " * \"planId\": \"cb4a8c57-273a-4567-94e3-cc43d5d339f2\",", + " * \"planName\": \"Beginner's Plan\",", + " * \"planPrice\": \"50\",", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 2", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"50.00\",", + " * \"total\": \"50.00\"", + " * }", + " * }", + " * ],", + " * \"subscription\": {", + " * \"cycleCount\": 2,", + " * \"cycleDuration\": {", + " * \"count\": 1,", + " * \"unit\": \"YEAR\"", + " * }", + " * }", + " * },", + " * \"startDate\": \"2024-01-28T09:49:21.041Z\",", + " * \"statusNew\": \"DRAFT\",", + " * \"subscriptionId\": \"305f8fc9-3724-4cac-9f67-4e29f2c46def\",", + " * \"type\": \"OFFLINE\",", + " * \"wixPayOrderId\": \"2f0e79d8-f15d-46c6-ac1a-10ec7a2030fb\"", + " * }", + " */ ", + "" + ] + }, + { + "title": "Create an offline order with options ", + "body": [ + "import { orders } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample planId value: 'cb4a8c57-273a-4567-94e3-cc43d5d339f2'", + " *", + " * Sample memberId value: '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4'", + " * ", + " * Sample options value: ", + " * {", + " * couponCode: 'e4ddd93a-5601-4696-99dd-3356f0e558c0',", + " * paid: true,", + " * startDate: '2024-01-29T11:50:21.041Z',", + " * submissionId: '9e128ddb-f62f-4a4a-adb5-064af40f18db'", + " * }", + " */", + "", + "const elevatedCreateOfflineOrder = elevate(orders.createOfflineOrder);", + "", + "export async function myCreateOfflineOrderFunctionWithOptions(planId, memberId, options) {", + " try {", + " const newOrder = await elevatedCreateOfflineOrder(planId, memberId, options);", + "", + " return newOrder;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * order: {", + " * \"_createdDate\": \"2024-01-28T09:49:21.041Z\",", + " * \"_id\": \"82d99338-5653-459a-a751-b57483f7cfb5\",", + " * \"_updatedDate\": \"2024-01-28T09:49:21.041Z\",", + " * \"autoRenewCanceled\": false,", + " * \"buyer\": {", + " * \"contactId\": \"554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4\",", + " * \"memberId\": \"554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"endedDate\": \"2024-04-27T09:49:21.041Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-28T09:49:21.041Z\"", + " * }", + " * ],", + " * \"currentCycle\": {", + " * \"endedDate\": \"2024-04-27T09:49:21.041Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-28T09:49:21.041Z\"", + " * },", + " * \"endDate\": \"2026-04-27T09:49:21.041Z\",", + " * \"earliestEndDate\": \"2026-04-27T09:49:21.041Z\",", + " * \"formData\": {", + " * \"formId\": \"3ef36359-24bd-471a-aa8b-a5ca683b50f4\",", + " * \"submissionData\": {},", + " * \"submissionId\": \"e65d5d60-7e07-4d2f-971f-e471dcebd0d2\"", + " * },", + " * \"freeTrialDays\": 90,", + " * \"lastPaymentStatus\": \"UNPAID\",", + " * \"pausePeriods\": [],", + " * \"planDescription\": \"3 mo free trial with discount for 1 year\",", + " * \"planId\": \"cb4a8c57-273a-4567-94e3-cc43d5d339f2\",", + " * \"planName\": \"Beginner's Plan\",", + " * \"planPrice\": \"50\",", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 2", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"50.00\",", + " * \"total\": \"50.00\"", + " * }", + " * }", + " * ],", + " * \"subscription\": {", + " * \"cycleCount\": 2,", + " * \"cycleDuration\": {", + " * \"count\": 1,", + " * \"unit\": \"YEAR\"", + " * }", + " * }", + " * },", + " * \"startDate\": \"2024-01-28T09:49:21.041Z\",", + " * \"status\": \"ACTIVE\",", + " * \"statusNew\": \"DRAFT\",", + " * \"subscriptionId\": \"305f8fc9-3724-4cac-9f67-4e29f2c46def\",", + " * \"type\": \"OFFLINE\",", + " * \"wixPayOrderId\": \"2f0e79d8-f15d-46c6-ac1a-10ec7a2030fb\"", + " * }", + " * }", + " */ " ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "createOfflineOrder", "isAdminMethod": true }, @@ -168,6 +382,16 @@ "doc": "ID of the plan of the previewed order.", "required": true }, + { + "name": "memberId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Member ID of the buyer the previewed order is for.", + "required": true + }, { "name": "options", "type": [ @@ -180,7 +404,7 @@ } ], "requiredFields": [ - "options.memberId", + "memberId", "planId" ], "ret": { @@ -205,26 +429,319 @@ ], "examples": [ { - "title": "getOfflineOrderPreview example", + "title": "Create an offline order preview ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function getOfflineOrderPreview(planId, options) {", - " try {", - " const result = await orders.getOfflineOrderPreview(planId, options);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample planId value: '838f2c9d-c8d0-4799-a10a-e2f23849db10'", + " *", + " * Sample memberId value: '695568ff-1dc2-49ff-83db-2b518d35692b'", + " */", + "", + "const elevatedGetOfflineOrderPreview = elevate(orders.getOfflineOrderPreview);", + "", + "export async function myGetOfflineOrderPreviewFunction(planId, memberId) {", + " try {", + " const orderPreview = await elevatedGetOfflineOrderPreview(planId, memberId);", + "", + " return orderPreview;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * order: {", + " * \"_createdDate\": \"2024-01-31T08:51:46.516Z\",", + " * \"_id\": \"00000000-0000-0000-0000-000000000000\",", + " * \"_updatedDate\": \"2024-01-31T08:51:46.516Z\",", + " * \"autoRenewCanceled\": false,", + " * \"buyer\": {", + " * \"contactId\": \"695568ff-1dc2-49ff-83db-2b518d35692b\",", + " * \"memberId\": \"695568ff-1dc2-49ff-83db-2b518d35692b\"", + " * },", + " * \"currentCycle\": {", + " * \"endedDate\": \"2024-03-01T08:51:46.516Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-31T08:51:46.516Z\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"endedDate\": \"2024-03-01T08:51:46.516Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-31T08:51:46.516Z\"", + " * }", + " * ],", + " * \"endDate\": \"2026-03-01T08:51:46.516Z\",", + " * \"earliestEndDate\": \"2026-03-01T08:51:46.516Z\",", + " * \"formData\": {", + " * \"submissionData\": {}", + " * },", + " * \"freeTrialDays\": 30,", + " * \"lastPaymentStatus\": \"PAID\",", + " * \"order\": {", + " * \"autoRenewCanceled\": false,", + " * \"buyer\": {", + " * \"contactId\": \"695568ff-1dc2-49ff-83db-2b518d35692b\",", + " * \"memberId\": \"695568ff-1dc2-49ff-83db-2b518d35692b\"", + " * },", + " * \"currentCycle\": {", + " * \"endedDate\": \"2024-03-01T08:51:46.516Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-31T08:51:46.516Z\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"endedDate\": \"2024-03-01T08:51:46.516Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-31T08:51:46.516Z\"", + " * }", + " * ],", + " * \"endDate\": \"2026-03-01T08:51:46.516Z\",", + " * \"earliestEndDate\": \"2026-03-01T08:51:46.516Z\",", + " * \"formData\": {", + " * \"submissionData\": {}", + " * },", + " * \"freeTrialDays\": 30,", + " * \"lastPaymentStatus\": \"PAID\",", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"orderType\": \"OFFLINE\",", + " * \"pausePeriods\": [],", + " * \"planDescription\": \"Complete with all features. One month free trial.\",", + " * \"planId\": \"838f2c9d-c8d0-4799-a10a-e2f23849db10\",", + " * \"planName\": \"Premium Plan - annual - 30 day trial\",", + " * \"planPrice\": \"500\",", + " * \"priceDetails\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"freeTrialDays\": 30,", + " * \"planPrice\": \"500\",", + " * \"subtotal\": \"500.00\",", + " * \"total\": \"500.00\",", + " * \"subscription\": {", + " * \"cycleCount\": 2,", + " * \"cycleDuration\": {", + " * \"count\": 1,", + " * \"unit\": \"YEAR\"", + " * }", + " * }", + " * },", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 2", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"500.00\",", + " * \"total\": \"500.00\"", + " * }", + " * }", + " * ],", + " * \"subscription\": {", + " * \"cycleCount\": 2,", + " * \"cycleDuration\": {", + " * \"count\": 1,", + " * \"unit\": \"YEAR\"", + " * }", + " * }", + " * },", + " * \"seller\": {", + " * \"subscriptionId\": \"00000000-0000-0000-0000-000000000000\"", + " * },", + " * \"startDate\": \"2024-01-31T08:51:46.516Z\",", + " * \"status\": \"ACTIVE\",", + " * \"statusNew\": \"ACTIVE\",", + " * \"type\": \"OFFLINE\"", + " * },", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"pausePeriods\": [],", + " * \"planDescription\": \"Complete with all features. One month free trial.\",", + " * \"planId\": \"838f2c9d-c8d0-4799-a10a-e2f23849db10\",", + " * \"planName\": \"Premium Plan - annual - 30 day trial\",", + " * \"planPrice\": \"500\",", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 2", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"500.00\",", + " * \"total\": \"500.00\"", + " * }", + " * }", + " * ],", + " * \"subscription\": {", + " * \"cycleCount\": 2,", + " * \"cycleDuration\": {", + " * \"count\": 1,", + " * \"unit\": \"YEAR\"", + " * }", + " * }", + " * },", + " * \"startDate\": \"2024-01-31T08:51:46.516Z\",", + " * \"status\": \"ACTIVE\",", + " * \"statusNew\": \"ACTIVE\",", + " * \"subscriptionId\": \"00000000-0000-0000-0000-000000000000\",", + " * \"type\": \"OFFLINE\"", + " * }", + " * \"purchaseLimitExceeded\": false", + " * }", + " */ ", + "" + ] + }, + { + "title": "Create an offline order preview with options ", + "body": [ + "import { orders } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample planId value: 'd2fa5805-0d1a-4cfb-9b43-e683cf5fa990'", + " *", + " * Sample memberId value: '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4'", + " * ", + " * Sample options value:", + " * {", + " * couponCode: 'seasonal',", + " * startDate: new Date()", + " * } ", + " */", + "", + "const elevatedGetOfflineOrderPreview = elevate(orders.getOfflineOrderPreview);", + "", + "export async function myGetOfflineOrderPreviewFunction(planId, memberId, options) {", + " try {", + " const orderPreview = await elevatedGetOfflineOrderPreview(planId, memberId, options);", + "", + " return orderPreview;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"order\": {", + " * \"_createdDate\": \"2024-02-01T07:58:49.777Z\",", + " * \"_id\": \"00000000-0000-0000-0000-000000000000\",", + " * \"_updatedDate\": \"2024-02-01T07:58:49.777Z\",", + " * \"autoRenewCanceled\": false,", + " * \"buyer\": {", + " * \"contactId\": \"554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4\",", + " * \"memberId\": \"554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4\"", + " * },", + " * \"currentCycle\": {", + " * \"endedDate\": \"2024-02-15T07:58:49.387Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-02-01T07:58:49.387Z\"", + " * },", + " * \"formData\": {", + " * \"fomrId\": ", + " * \"submissionData\": {", + " * \"email_0fd2\": \"Jboss@email.com\",", + " * \"form_field_aa30\": false,", + " * \"first_name_c551\": \"Jason\",", + " * \"last_name_78e9\": \"Bollinger\",", + " * \"phone_8cf1\": \"212-909-2222\"", + " * },", + " * \"submissionId\": \"10206732-e789-40e9-957d-2c7f3398efc6\" ", + " * },", + " * \"freeTrialDays\": 14,", + " * \"lastPaymentStatus\": \"PAID\",", + " * \"pausePeriods\": [],", + " * \"planDescription\": \"The value plan\",", + " * \"planId\": \"d2fa5805-0d1a-4cfb-9b43-e683cf5fa990\",", + " * \"planName\": \"Silver Membership - Monthly\",", + " * \"planPrice\": \"100\",", + " * \"status\": \"ACTIVE\",", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 1", + " * },", + " * \"price\": {", + " * \"coupon\": {", + " * \"code\": \"seasonal\",", + " * \"amount\": \"95.00\",", + " * \"_id\": \"8673834a-a5c6-4e77-af9c-83f9bf609659\"", + " * },", + " * \"total\": \"30.00\",", + " * \"proration\": \"0\",", + " * \"fees\": [", + " * {", + " * \"name\": \"Setup Fee\",", + " * \"amount\": \"25\"", + " * }", + " * ],", + " * \"currency\": \"USD\",", + " * \"subtotal\": \"125.00\",", + " * \"discount\": \"95.00\"", + " * }", + " * },", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 2", + " * },", + " * \"price\": {", + " * \"coupon\": {", + " * \"code\": \"seasonal\",", + " * \"amount\": \"95.00\",", + " * \"_id\": \"8673834a-a5c6-4e77-af9c-83f9bf609659\"", + " * },", + " * \"total\": \"5.00\",", + " * \"proration\": \"0\",", + " * \"fees\": [],", + " * \"currency\": \"USD\",", + " * \"subtotal\": \"100.00\",", + " * \"discount\": \"95.00\"", + " * }", + " * }", + " * ]", + " * \"subscription\": {", + " * \"cycleCount\": 0,", + " * \"cycleDuration\": {", + " * \"count\": 1,", + " * \"unit\": \"MONTH\"", + " * }", + " * }", + " * },", + " * \"startDate\": \"2024-02-01T07:58:49.387Z\",", + " * \"status\": \"ACTIVE\",", + " * \"subscriptionId\": \"00000000-0000-0000-0000-000000000000\",", + " * \"type\": \"OFFLINE\",", + " * },", + " * \"purchaseLimitExceeded\": false", + " * }", + " */ " ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "getOfflineOrderPreview", "isAdminMethod": true }, @@ -277,26 +794,140 @@ ], "examples": [ { - "title": "getPricePreview example", + "title": "Get a price preview for an order ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function getPricePreview(planId, options) {", - " try {", - " const result = await orders.getPricePreview(planId, options);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample planId value: '838f2c9d-c8d0-4799-a10a-e2f23849db10' */", + "", + "const elevatedGetPricePreview = elevate(orders.getPricePreview);", + "", + "export async function myGetPricePreviewFunction(planId) {", + " try {", + " const pricePreview = await elevatedGetPricePreview(planId)", + "", + " return pricePreview;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "/* Promise resolves to:", + " * {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 2", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\"", + " * \"proration\": \"0\",", + " * \"subtotal\": \"500.00\",", + " * \"tax\": {", + " * \"name\": \"Tax\",", + " * \"includedInPrice\": false,", + " * \"rate\": \"6.5\",", + " * \"amount\": \"32.50\"", + " * },", + " * \"total\": \"532.50\"", + " * }", + " * }", + " * ]", + " * }", + " */ " + ] + }, + { + "title": "Get a price preview for an order with options ", + "body": [ + "import { orders } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample planId value: '838f2c9d-c8d0-4799-a10a-e2f23849db10'", + " *", + " * Sample options value:", + " * {", + " * couponCode: 'SUMMERSALE'", + " * }", + " */ ", + "", + "const elevatedGetPricePreview = elevate(orders.getPricePreview);", + "", + "export async function myGetPricePreviewFunction(planId, options) {", + " try {", + " const pricePreview = await elevatedGetPricePreview(planId, options)", + "", + " return pricePreview;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 1", + " * },", + " * \"price\": {", + " * \"coupon\": {", + " * \"code\": \"SUMMERSALE\",", + " * \"amount\": \"90.00\",", + " * \"_id\": \"271d5fe4-2105-47b8-81c1-b24201d1be68\"", + " * },", + " * \"discount\": \"90.00\",", + " * \"currency\": \"USD\",", + " * \"subtotal\": \"125.00\",", + " * \"tax\": {", + " * \"amount\": \"2.28\",", + " * \"includedInPrice\": false,", + " * \"name\": \"Tax\",", + " * \"rate\": \"6.5\",", + " * },", + " * \"total\": \"37.28\"", + " * }", + " * },", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 2", + " * },", + " * \"price\": {", + " * \"coupon\": {", + " * \"code\": \"SUMMERSALE\",", + " * \"amount\": \"90.00\",", + " * \"_id\": \"271d5fe4-2105-47b8-81c1-b24201d1be68\"", + " * },", + " * \"discount\": \"90.00\",", + " * \"currency\": \"USD\",", + " * \"subtotal\": \"100.00\",", + " * \"tax\": {", + " * \"amount\": \"0.65\",", + " * \"includedInPrice\": false,", + " * \"name\": \"Tax\",", + " * \"rate\": \"6.5\"", + " * },", + " * \"total\": \"10.65\",", + " * }", + " * }", + " * ]", + " * }", + " */ " ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "getPricePreview" }, { @@ -319,7 +950,7 @@ "referenceType": "wix-pricing-plans-v2.Orders.ManagementGetOrderOptions" } ], - "doc": "Options to use when getting an order.\n", + "doc": "Options to use when getting an order.", "required": false } ], @@ -348,26 +979,262 @@ ], "examples": [ { - "title": "managementGetOrder example", + "title": "Get an order ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function managementGetOrder(id, options) {", - " try {", - " const result = await orders.managementGetOrder(id, options);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample _id value:'12178428-36b7-4cf5-bfb5-0ba8c83c4e8c' */", + "", + "const elevatedManagementGetOrder = elevate(orders.managementGetOrder)", + "", + "export async function myManagementGetOrderFunction(_id) {", + " try {", + " const order = await elevatedManagementGetOrder(_id);", + "", + " return order;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * order: {", + " * \"_createdDate\": \"2024-01-31T10:59:16.422Z\",", + " * \"_id\": \"12178428-36b7-4cf5-bfb5-0ba8c83c4e8c\",", + " * \"_updatedDate\": \"2024-01-31T10:59:17.495Z\",", + " * \"buyer\": {", + " * \"contactId\": \"3fc889f6-18e8-4fd9-a509-27db9f037f26\",", + " * \"memberId\": \"3fc889f6-18e8-4fd9-a509-27db9f037f26\"", + " * },", + " * \"currentCycle\": {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-31T10:59:16.422Z\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-31T10:59:16.422Z\"", + " * }", + " * ],", + " * \"formData\": {", + " * \"formId\": \"3ef36359-24bd-471a-aa8b-a5ca683b50f4\",", + " * \"submissionData\": {},", + " * \"submissionId\": \"e65d5d60-7e07-4d2f-971f-e471dcebd0d2\"", + " * },", + " * \"lastPaymentStatus\": \"NOT_APPLICABLE\",", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"planDescription\": \"Full functionality for new users\",", + " * \"planId\": \"df83348a-777d-46ab-8d62-a43c415bdb11\",", + " * \"planName\": \"Standard Plan\",", + " * \"planPrice\": \"0\",", + " * \"priceDetails\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"planPrice\": \"0\",", + " * \"singlePaymentUnlimited\": true,", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * },", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 1", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * }", + " * }", + " * ],", + " * \"singlePaymentUnlimited\": true", + " * },", + " * \"startDate\": \"2024-01-31T10:59:16.422Z\",", + " * \"status\": \"ACTIVE\",", + " * \"statusNew\": \"ACTIVE\",", + " * \"subscriptionId\": \"b1e7d751-7727-4c07-a0b5-0ab017ef7d1b\",", + " * \"type\": \"ONLINE\"", + " * }", + " * }", + " */ " + ] + }, + { + "title": "Get an order with options ", + "body": [ + "import { orders } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample _id value:'12178428-36b7-4cf5-bfb5-0ba8c83c4e8c'", + " *", + " * Sample options value: ", + " * {", + " * fieldSet: 'FULL'", + " * }", + " * ", + "*/", + "", + "const elevatedManagementGetOrder = elevate(orders.managementGetOrder)", + "", + "export async function myManagementGetOrderFunction(_id) {", + " try {", + " const order = await elevatedManagementGetOrder(_id);", + "", + " return order;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"_createdDate\": \"2024-01-31T10:59:16.422Z\",", + " * \"_id\": \"12178428-36b7-4cf5-bfb5-0ba8c83c4e8c\",", + " * \"_updatedDate\": \"2024-01-31T10:59:17.495Z\",", + " * \"buyer\": {", + " * \"contactId\": \"3fc889f6-18e8-4fd9-a509-27db9f037f26\",", + " * \"memberId\": \"3fc889f6-18e8-4fd9-a509-27db9f037f26\"", + " * },", + " * \"currentCycle\": {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-31T10:59:16.422Z\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-31T10:59:16.422Z\"", + " * }", + " * ],", + " * \"formData\": {", + " * \"formId\": \"3ef36359-24bd-471a-aa8b-a5ca683b50f4\",", + " * \"submissionData\": {", + " * \"email_7b7a\": \"Sgray@email.com\",", + " * \"first_name_e841\": \"Stanley\",", + " * \"form_field_1b5e\": true,", + " * \"last_name_3347\": \"Grayson\"", + " * },", + " * \"submissionId\": \"e65d5d60-7e07-4d2f-971f-e471dcebd0d2\"", + " * },", + " * \"lastPaymentStatus\": \"NOT_APPLICABLE\",", + " * \"order\": {", + " * \"currentCycle\": {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-31T10:59:16.422Z\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-31T10:59:16.422Z\"", + " * }", + " * ],", + " * \"formData\": {", + " * \"formId\": \"3ef36359-24bd-471a-aa8b-a5ca683b50f4\",", + " * \"submissionData\": {", + " * \"email_7b7a\": \"Sgray@email.com\",", + " * \"first_name_e841\": \"Stanley\",", + " * \"form_field_1b5e\": true,", + " * \"last_name_3347\": \"Grayson\"", + " * },", + " * \"submissionId\": \"e65d5d60-7e07-4d2f-971f-e471dcebd0d2\"", + " * },", + " * \"lastPaymentStatus\": \"NOT_APPLICABLE\",", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"planDescription\": \"Full functionality for new users\",", + " * \"planId\": \"df83348a-777d-46ab-8d62-a43c415bdb11\",", + " * \"planName\": \"Standard Plan\",", + " * \"planPrice\": \"0\",", + " * \"priceDetails\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"planPrice\": \"0\",", + " * \"singlePaymentUnlimited\": true,", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * },", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 1", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * }", + " * }", + " * ],", + " * \"singlePaymentUnlimited\": true", + " * },", + " * \"startDate\": \"2024-01-31T10:59:16.422Z\",", + " * \"status\": \"ACTIVE\",", + " * \"statusNew\": \"ACTIVE\",", + " * \"subscriptionId\": \"b1e7d751-7727-4c07-a0b5-0ab017ef7d1b\",", + " * \"type\": \"ONLINE\"", + " * },", + " * \"pausePeriods\": [],", + " * \"planDescription\": \"Full functionality for new users\",", + " * \"planId\": \"df83348a-777d-46ab-8d62-a43c415bdb11\",", + " * \"planName\": \"Standard Plan\",", + " * \"planPrice\": \"0\",", + " * \"priceDetails\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"planPrice\": \"0\",", + " * \"singlePaymentUnlimited\": true,", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * },", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 1", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * }", + " * }", + " * ],", + " * \"singlePaymentUnlimited\": true", + " * },", + " * \"startDate\": \"2024-01-31T10:59:16.422Z\",", + " * \"status\": \"ACTIVE\",", + " * \"statusNew\": \"ACTIVE\",", + " * \"subscriptionId\": \"b1e7d751-7727-4c07-a0b5-0ab017ef7d1b\",", + " * \"type\": \"ONLINE\"", + " * }", + " */ ", + "" ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "managementGetOrder", "isAdminMethod": true }, @@ -381,7 +1248,7 @@ "referenceType": "wix-pricing-plans-v2.Orders.ManagementListOrdersOptions" } ], - "doc": "Filtering, sorting, and pagination options.\n", + "doc": "Filtering, sorting, and pagination options.", "required": false } ], @@ -408,26 +1275,256 @@ ], "examples": [ { - "title": "managementListOrders example", + "title": "List pricing plan orders ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function managementListOrders(options) {", - " try {", - " const result = await orders.managementListOrders(options);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", + "const elevatedManagementListOrders = elevate(orders.managementListOrders);", + "", + "export async function myManagementListOrdersFunction() {", + " try {", + " const ordersList = await elevatedManagementListOrders();", + "", + " return ordersList;", + " } catch (error){", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"orders\": [", + " * {", + " * \"_createdDate\": \"2024-01-22T14:00:53.904Z\",", + " * \"_id\": \"14fac8ae-506e-4e7b-84d4-e9b094d0ddca\",", + " * \"_updatedDate\": \"2024-01-22T14:00:54.772Z\",", + " * \"buyer\": {", + " * \"contactId\": \"f5691fc2-0674-4eee-92c5-da06a05981a5\",", + " * \"memberId\": \"f5691fc2-0674-4eee-92c5-da06a05981a5\"", + " * },", + " * \"currentCycle\": {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-22T14:00:53.904Z\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-22T14:00:53.904Z\"", + " * }", + " * ],", + " * \"formData\": {", + " * \"submissionData\": {}", + " * },", + " * \"lastPaymentStatus\": \"NOT_APPLICABLE\",", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"pausePeriods\": [],", + " * \"planDescription\": \"\",", + " * \"planId\": \"aa0d8e0e-99ad-4c95-ac48-4955e37956c5\",", + " * \"planName\": \"Default\",", + " * \"planPrice\": \"0\",", + " * \"priceDetails\": {", + " * \"currency\": \"EUR\",", + " * \"discount\": \"0\",", + " * \"planPrice\": \"0\",", + " * \"singlePaymentUnlimited\": true,", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * },", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 1", + " * },", + " * \"price\": {", + " * \"currency\": \"EUR\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * }", + " * }", + " * ],", + " * \"singlePaymentUnlimited\": true", + " * },", + " * \"priceDetails\": {", + " * \"currency\": \"EUR\",", + " * \"discount\": \"0\",", + " * \"planPrice\": \"0\",", + " * \"singlePaymentUnlimited\": true,", + " * \"subtotal\": \"0.00\",", + " * \"total\": \"0\"", + " * },", + " * \"startDate\": \"2024-01-22T14:00:53.904Z\",", + " * \"status\": \"ACTIVE\",", + " * \"statusNew\": \"ACTIVE\",", + " * \"subscriptionId\": \"19276032-d06f-4931-962f-79486d8b6bc0\",", + " * \"type\": \"ONLINE\"", + " * }", + " * ],", + " * \"pagingMetadata\": {", + " * \"count\": 1,", + " * \"hasNext\": false,", + " * \"offset\": 0,", + " * \"total\": 1", + " * }", + " * }", + " */ ", + "", + "" + ] + }, + { + "title": "List pricing plan orders with options ", + "body": [ + "import { orders } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "/* Sample options value:", + " * {", + " * autoRenewCanceled: false,", + " * buyerIds: [", + " * '402ec90c-235a-45c4-b4cc-52204d5f6b00',", + " * '3fc889f6-18e8-4fd9-a509-27db9f037f26',", + " * 'fa16f1dc-0fbd-41c0-8efc-53333e3fce1e',", + " * '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4',", + " * '695568ff-1dc2-49ff-83db-2b518d35692b',", + " * '554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4',", + " * 'f5691fc2-0674-4eee-92c5-da06a05981a5'", + " * ],", + " * fieldSet: 'BASIC',", + " * limit: 3,", + " * offset: 0,", + " * orderStatuses: [", + " * 'ACTIVE'", + " * ],", + " * paymentStatus: [", + " * 'PAID',", + " * 'NOT_APPLICABLE'", + " * ],", + " * planIds: [", + " * '0da57ac8-c3d0-4687-8aea-4100781b6386',", + " * 'df83348a-777d-46ab-8d62-a43c415bdb11', ", + " * '3a3e0ac2-a9e3-4bfd-ade3-bec3bab34d4b', ", + " * 'cb4a8c57-273a-4567-94e3-cc43d5d339f2', ", + " * 'df83348a-777d-46ab-8d62-a43c415bdb11', ", + " * 'aa0d8e0e-99ad-4c95-ac48-4955e37956c5', ", + " * 'aa0d8e0e-99ad-4c95-ac48-4955e37956c5'", + " * ],", + " * sorting: {", + " * fieldName: 'createdDate',", + " * order: 'ASC'", + " * };", + " */", + "", + "const elevatedManagementListOrders = elevate(orders.managementListOrders);", + "", + "export async function myManagementListOrdersFunction(options) {", + " try {", + " const ordersList = await elevatedManagementListOrders(options);", + "", + " return ordersList;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"orders\": [", + " * {", + " * \"_createdDate\": \"2024-01-28T09:49:21.041Z\",", + " * \"_id\": \"82d99338-5653-459a-a751-b57483f7cfb5\",", + " * \"_updatedDate\": \"2024-02-04T10:42:58.888Z\",", + " * \"autoRenewCanceled\": false,", + " * \"buyer\": {", + " * \"contactId\": \"554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4\",", + " * \"memberId\": \"554c9e11-f4d8-4579-ac3a-a17f7e6cb0b4\"", + " * },", + " * \"currentCycle\": {", + " * \"endedDate\": \"2024-04-27T09:49:21.041Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-28T09:49:21.041Z\"", + " * },", + " * \"cycles\": [", + " * {", + " * \"endedDate\": \"2024-04-27T09:49:21.041Z\",", + " * \"index\": 0,", + " * \"startedDate\": \"2024-01-28T09:49:21.041Z\"", + " * }", + " * ],", + " * \"endDate\": \"2026-07-29T09:49:21.041Z\",", + " * \"earliestEndDate\": \"2026-04-27T09:49:21.041Z\",", + " * \"formData\": {", + " * \"submissionData\": {}", + " * },", + " * \"freeTrialDays\": 90,", + " * \"lastPaymentStatus\": \"PAID\",", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"pausePeriods\": [],", + " * \"planDescription\": \"3 mo free trial with discount for 1 year\",", + " * \"planId\": \"cb4a8c57-273a-4567-94e3-cc43d5d339f2\",", + " * \"planName\": \"Beginner's Plan\",", + " * \"planPrice\": \"50\",", + " * \"priceDetails\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"freeTrialDays\": 90,", + " * \"planPrice\": \"50\",", + " * \"subtotal\": \"50.00\",", + " * \"total\": \"50.00\"", + " * },", + " * \"pricing\": {", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 2", + " * },", + " * \"price\": {", + " * \"currency\": \"USD\",", + " * \"discount\": \"0\",", + " * \"fees\": [],", + " * \"proration\": \"0\",", + " * \"subtotal\": \"50.00\",", + " * \"total\": \"50.00\"", + " * }", + " * }", + " * ],", + " * \"singlePaymentUnlimited\": true", + " * },", + " * \"startDate\": \"2024-01-28T09:49:21.041Z\",", + " * \"status\": \"ACTIVE\",", + " * \"statusNew\": \"ACTIVE\",", + " * \"subscriptionId\": \"305f8fc9-3724-4cac-9f67-4e29f2c46def\",", + " * \"type\": \"OFFLINE\",", + " * \"wixPayOrderId\": \"2f0e79d8-f15d-46c6-ac1a-10ec7a2030fb\"", + " * }", + " * ],", + " * \"pagingMetadata\": {", + " * \"count\": 1,", + " * \"hasNext\": false,", + " * \"offset\": 0,", + " * \"total\": 1", + " * }", + " * }", + " */ ", " " ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "managementListOrders", "isAdminMethod": true }, @@ -470,26 +1567,37 @@ ], "examples": [ { - "title": "markAsPaid example", + "title": "Mark an order as paid ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function markAsPaid(id) {", - " try {", - " const result = await orders.markAsPaid(id);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample _id value: '82d99338-5653-459a-a751-b57483f7cfb5' */", + "", + "const elevatedMarkAsPaid = elevate(orders.markAsPaid);", + "", + "export async function myMarkAsPaidFunction(_id) {", + " try {", + " await elevatedMarkAsPaid(_id);", + "", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */" ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "markAsPaid", "isAdminMethod": true }, @@ -601,26 +1709,174 @@ ], "examples": [ { - "title": "memberListOrders example", + "title": "Get orders for currently logged in members ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function memberListOrders(options) {", - " try {", - " const result = await orders.memberListOrders(options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "export async function myMemberListOrdersFunction() {", + " try {", + " const ordersList = await orders.memberListOrders();", + " return ordersList;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to:", + " * {", + " * \"orders\": [", + " * {", + " * \"planPrice\": \"0\",", + " * \"_id\": \"292c6b6b-81ec-4c10-b067-78b1a1b2fada\",", + " * \"_createdDate\": \"2024-02-05T17:26:23.348Z\",", + " * \"subscriptionId\": \"973e0e0b-85c2-4d2b-9693-fc8f1140d958\",", + " * \"pausePeriods\": [],", + " * \"_updatedDate\": \"2024-02-05T17:26:24.129Z\",", + " * \"planName\": \"Free Plan\",", + " * \"buyer\": {", + " * \"memberId\": \"695568ff-1dc2-49ff-83db-2b518d35692b\",", + " * \"contactId\": \"695568ff-1dc2-49ff-83db-2b518d35692b\"", + " * },", + " * \"lastPaymentStatus\": \"NOT_APPLICABLE\",", + " * \"status\": \"ACTIVE\",", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"planDescription\": \"\",", + " * \"formData\": {", + " * \"formId\": \"ee62cefa-bdc2-4b5d-baab-6faeef83cecb\",", + " * \"submissionId\": \"6d68798b-b5ea-4471-b029-dea6e4ac043a\",", + " * \"submissionData\": {}", + " * },", + " * \"statusNew\": \"ACTIVE\",", + " * \"cycles\": [", + " * {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-02-05T17:26:23.348Z\"", + " * }", + " * ],", + " * \"type\": \"ONLINE\",", + " * \"planId\": \"3a3e0ac2-a9e3-4bfd-ade3-bec3bab34d4b\",", + " * \"startDate\": \"2024-02-05T17:26:23.348Z\",", + " * \"currentCycle\": {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-02-05T17:26:23.348Z\"", + " * },", + " * \"pricing\": {", + " * \"singlePaymentUnlimited\": true,", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 1", + " * },", + " * \"price\": {", + " * \"tax\": {", + " * \"name\": \"Tax\",", + " * \"includedInPrice\": false,", + " * \"rate\": \"6.5\",", + " * \"amount\": \"0\"", + " * },", + " * \"total\": \"0\",", + " * \"proration\": \"0\",", + " * \"fees\": [],", + " * \"currency\": \"USD\",", + " * \"subtotal\": \"0.00\",", + " * \"discount\": \"0\"", + " * }", + " * }", + " * ]", + " * },", + " * \"priceDetails\": {", + " * \"planPrice\": \"0\",", + " * \"tax\": {", + " * \"name\": \"Tax\",", + " * \"includedInPrice\": false,", + " * \"rate\": \"6.5\",", + " * \"amount\": \"0\"", + " * },", + " * \"total\": \"0\",", + " * \"currency\": \"USD\",", + " * \"subtotal\": \"0.00\",", + " * \"discount\": \"0\",", + " * \"singlePaymentUnlimited\": true", + " * }", + " * },", + " * {", + " * \"planPrice\": \"0\",", + " * \"_id\": \"7b4ec42c-582a-4e2f-874b-09e66e0ae09d\",", + " * \"_createdDate\": \"2024-01-28T08:35:15.230Z\",", + " * \"subscriptionId\": \"08bc02c5-7663-4578-948a-ff23370e07e5\",", + " * \"pausePeriods\": [],", + " * \"_updatedDate\": \"2024-01-28T08:35:16.080Z\",", + " * \"planName\": \"Standard Plan\",", + " * \"buyer\": {", + " * \"memberId\": \"695568ff-1dc2-49ff-83db-2b518d35692b\",", + " * \"contactId\": \"695568ff-1dc2-49ff-83db-2b518d35692b\"", + " * },", + " * \"lastPaymentStatus\": \"NOT_APPLICABLE\",", + " * \"status\": \"ACTIVE\",", + " * \"orderMethod\": \"UNKNOWN\",", + " * \"planDescription\": \"Full functionality for new users\",", + " * \"formData\": {", + " * \"formId\": \"3ef36359-24bd-471a-aa8b-a5ca683b50f4\",", + " * \"submissionId\": \"2cf62c7a-d3ed-4dd9-816d-01919aaf2170\",", + " * \"submissionData\": {}", + " * },", + " * \"statusNew\": \"ACTIVE\",", + " * \"cycles\": [", + " * {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-28T08:35:15.230Z\"", + " * }", + " * ],", + " * \"type\": \"ONLINE\",", + " * \"planId\": \"df83348a-777d-46ab-8d62-a43c415bdb11\",", + " * \"startDate\": \"2024-01-28T08:35:15.230Z\",", + " * \"currentCycle\": {", + " * \"index\": 1,", + " * \"startedDate\": \"2024-01-28T08:35:15.230Z\"", + " * },", + " * \"pricing\": {", + " * \"singlePaymentUnlimited\": true,", + " * \"prices\": [", + " * {", + " * \"duration\": {", + " * \"cycleFrom\": 1,", + " * \"numberOfCycles\": 1", + " * },", + " * \"price\": {", + " * \"total\": \"0\",", + " * \"proration\": \"0\",", + " * \"fees\": [],", + " * \"currency\": \"USD\",", + " * \"subtotal\": \"0.00\",", + " * \"discount\": \"0\"", + " * }", + " * }", + " * ]", + " * },", + " * \"priceDetails\": {", + " * \"planPrice\": \"0\",", + " * \"total\": \"0\",", + " * \"currency\": \"USD\",", + " * \"subtotal\": \"0.00\",", + " * \"discount\": \"0\",", + " * \"singlePaymentUnlimited\": true", + " * }", + " * }", + " * ]", + " * }", + " */ " ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "memberListOrders" }, { @@ -662,26 +1918,37 @@ ], "examples": [ { - "title": "pauseOrder example", + "title": "Pause a pricing plan order ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function pauseOrder(id) {", - " try {", - " const result = await orders.pauseOrder(id);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample _id value: '9af3cbe6-fe27-4fdb-a0b0-892289b03d22' */", + "", + "const elevatedPauseOrder = elevate(orders.pauseOrder);", + "", + "export async function pauseOrder(_id) {", + " try {", + " await elevatedPauseOrder(_id);", + "", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */" ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "pauseOrder", "isAdminMethod": true }, @@ -735,26 +2002,40 @@ ], "examples": [ { - "title": "postponeEndDate example", + "title": "Postpone an order's end date ", "body": [ - "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function postponeEndDate(id, endDate) {", - " try {", - " const result = await orders.postponeEndDate(id, endDate);", + "import { orders } from 'wix-pricing-plans-backend';", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample _id value: '82d99338-5653-459a-a751-b57483f7cfb5'", + " * ", + " * Sample endDate value: new Date('June 30, 2026 04:00:00')", + " */", + "", + "const elevatedPostoponeEndDate = elevate(orders.postponeEndDate);", + "", + "export async function myPostponeEndDateFunction(_id, endDate) {", + " try {", + " await orders.postponeEndDate(_id, endDate);", + "", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise that resolves to void */" ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "postponeEndDate", "isAdminMethod": true }, @@ -808,26 +2089,37 @@ ], "examples": [ { - "title": "requestCancellation example", + "title": "Cancel an order immediately ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function requestCancellation(id, effectiveAt) {", - " try {", - " const result = await orders.requestCancellation(id, effectiveAt);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample _id value: '7b4ec42c-582a-4e2f-874b-09e66e0ae09d'", + " *", + " * Sample effectiveAt value: 'IMMEDIATELY'", + " */", + "", + "export async function myRequestCancellationFunction(_id, effectiveAt) {", + " try {", + " await orders.requestCancellation(_id, effectiveAt);", + "", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */" ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "requestCancellation" }, { @@ -869,26 +2161,38 @@ ], "examples": [ { - "title": "resumeOrder example", + "title": "Resume an order ", "body": [ "import { orders } from 'wix-pricing-plans.v2';", - " ", - " async function resumeOrder(id) {", - " try {", - " const result = await orders.resumeOrder(id);", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample _id value: '9af3cbe6-fe27-4fdb-a0b0-892289b03d22' */", + "", + "const elevatedResumeOrder = elevate(orders.resumeOrder);", + "", + "export async function myResumeOrderFunction(_id) {", + " try {", + " await elevatedResumeOrder(_id);", + "", + " return;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/* Promise resolves to void */", + "" ] } ] }, "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "resumeOrder", "isAdminMethod": true } @@ -1506,7 +2810,7 @@ ] } }, - { + { "name": "CreateGuestOnlineOrderOptions", "members": [ { @@ -1664,15 +2968,6 @@ ], "doc": "Coupon code to apply." }, - { - "name": "memberId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of the member ordering the plan.\nThis field is required when creating an offline order." - }, { "name": "paid", "optional": true, @@ -2568,15 +3863,6 @@ ], "doc": "Coupon code to apply." }, - { - "name": "memberId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Member ID for the buyer who might order the plan offline.\nThis field is required to get an offline order preview." - }, { "name": "startDate", "optional": true, @@ -3694,7 +4980,7 @@ ] } }, - { +{ "name": "MemberQueryOrdersOptions", "members": [ { diff --git a/wix-pricing-plans-v2/wix-pricing-plans-v2/Orders/guides/orders-intro.md b/wix-pricing-plans-v2/wix-pricing-plans-v2/Orders/guides/orders-intro.md index b6bb2fdcfc..314a2e7d49 100644 --- a/wix-pricing-plans-v2/wix-pricing-plans-v2/Orders/guides/orders-intro.md +++ b/wix-pricing-plans-v2/wix-pricing-plans-v2/Orders/guides/orders-intro.md @@ -15,14 +15,14 @@ title: Introduction -The Pricing Plans Orders API allows you to manage orders for your pricing plans. +The Orders API allows you to manage orders for your pricing plans. With the Pricing Plans Orders API, you can: - [Get](wix-pricing-plans-v2/orders/managementgetorder) and [list](wix-pricing-plans-v2/orders/managementlistorders) orders. - [Create](wix-pricing-plans-v2/orders/createofflineorder) offline orders. - [Mark](wix-pricing-plans-v2/orders/markaspaid) offline orders as paid. - [Preview](wix-pricing-plans-v2/orders/getpricepreview) the pricing details of an order. -- [Pause](wix-pricing-plans-v2/orders/pauseorder), [resume](wix-pricing-plans-v2/orders/resumeorder), or [cancel](requestcancellation) orders. +- [Pause](wix-pricing-plans-v2/orders/pauseorder), [resume](wix-pricing-plans-v2/orders/resumeorder), or [cancel](wix-pricing-plans-v2/orders/cancelorder) orders. - [Extend the duration](wix-pricing-plans-v2/orders/postponeenddate) of orders. diff --git a/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans.service.json b/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans.service.json index 5aa0656e45..22b20687ac 100644 --- a/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans.service.json +++ b/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans.service.json @@ -184,6 +184,65 @@ "/* Promise resolves to void */", "" ] + }, + { + "title": "Sort plans alphabetically ", + "body": [ + "/*************************************", + " * Backend code - plan-functions.jsw *", + " *************************************/", + "", + "import { plans } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedArrangePlans = elevate(plans.arrangePlans);", + "", + "export async function sortPlansBySlug(direction) {", + " let publicPlansQuery = plans.queryPublicPlans();", + "", + " if (direction === 'ascending') {", + " publicPlansQuery = publicPlansQuery.ascending('slug');", + " } else {", + " publicPlansQuery = publicPlansQuery.descending('slug');", + " }", + "", + " const sortedPlans = await publicPlansQuery.find();", + " const planIds = sortedPlans.items.map(item => item._id);", + "", + " return await elevatedArrangePlans(planIds);", + "}", + "", + "/*************", + " * Page code *", + " *************/", + "", + "import { sortPlansBySlug } from 'backend/plan-functions';", + "import wixLocationFrontend from 'wix-location-frontend';", + "", + "$w.onReady(function () {", + " $w('#dropdownSort').options =", + " [", + " {", + " label: 'Ascending',", + " value: 'ascending'", + " },", + " {", + " label: 'Decending',", + " value: 'descending'", + " }", + " ];", + "", + " $w('#dropdownSort').onChange(async () => {", + " const direction = $w('#dropdownSort').value;", + " sortPlansBySlug(direction);", + " const url = wixLocationFrontend.url;", + " wixLocationFrontend.to(url);", + " })", + "});" + ], + "extra": { + "description": "Select a sorting option to arranage plans in ascending or descending order by plan slug. " + } } ] }, @@ -440,6 +499,101 @@ " */ ", "" ] + }, + { + "title": "Duplicate a plan ", + "body": [ + "/*************************************", + " * Backend code - plan-functions.jsw *", + " *************************************/", + "", + "import { plans } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedListPlans = elevate(plans.listPlans);", + "const elevatedGetPlan = elevate(plans.getPlan);", + "const elevatedCreatePlan = elevate(plans.createPlan);", + "", + "export async function listPlans() {", + " try {", + " const response = await elevatedListPlans();", + " const allPlans = response.plans;", + "", + " return allPlans;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "export async function getPlan(planId) {", + " try {", + " const selectedPlan = await elevatedGetPlan(planId);", + "", + " return selectedPlan;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "export async function createPlan(plan) {", + " try {", + " const newPlan = await elevatedCreatePlan(plan);", + "", + " return newPlan;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "", + "/*************", + " * Page code *", + " *************/", + "", + "import { listPlans, getPlan, createPlan } from 'backend/plan-functions';", + "$w.onReady(async function () {", + " $w('#plansDropdown').disable();", + " $w('#clonePlanBtn').disable();", + " populatePlansDropdown();", + "", + " let selectedPlan;", + "", + " $w('#plansDropdown').onChange(async () => {", + " const planId = $w('#plansDropdown').value;", + " selectedPlan = await getPlan(planId);", + "", + " // Set default value for the new plan name", + " $w('#planName').value = `${selectedPlan.name}-duplicate`", + " $w('#clonePlanBtn').enable();", + " });", + " ", + " $w('#clonePlanBtn').onClick(async () => {", + " const newPlan = selectedPlan;", + " // Use inputs to set the new plan name and price", + " newPlan.name = $w('#planName').value;", + " newPlan.pricing.price.value = $w('#price').value;", + "", + " await createPlan(newPlan);", + " });", + "});", + "", + "async function populatePlansDropdown() {", + " const plans = await listPlans();", + " $w('#plansDropdown').options = plans.map((plan) => {", + " return {", + " label: plan.name,", + " value: plan._id", + " }", + " });", + " $w('#plansDropdown').enable();", + "}" + ], + "extra": { + "description": "The `populatePlansDropdown` function retrieves all plans and then populates them into the `#plansDropdown`. The `#plansDropdown` and `#clonePlanBtn` are set to `disabled` by default. " + } } ] }, @@ -545,6 +699,101 @@ " * } ", " */" ] + }, + { + "title": "Duplicate a plan ", + "body": [ + "/*************************************", + " * Backend code - plan-functions.jsw *", + " *************************************/", + "", + "import { plans } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedListPlans = elevate(plans.listPlans);", + "const elevatedGetPlan = elevate(plans.getPlan);", + "const elevatedCreatePlan = elevate(plans.createPlan);", + "", + "export async function listPlans() {", + " try {", + " const response = await elevatedListPlans();", + " const allPlans = response.plans;", + "", + " return allPlans;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "export async function getPlan(planId) {", + " try {", + " const selectedPlan = await elevatedGetPlan(planId);", + "", + " return selectedPlan;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "export async function createPlan(plan) {", + " try {", + " const newPlan = await elevatedCreatePlan(plan);", + "", + " return newPlan;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "", + "/*************", + " * Page code *", + " *************/", + "", + "import { listPlans, getPlan, createPlan } from 'backend/plan-functions';", + "$w.onReady(async function () {", + " $w('#plansDropdown').disable();", + " $w('#clonePlanBtn').disable();", + " populatePlansDropdown();", + "", + " let selectedPlan;", + "", + " $w('#plansDropdown').onChange(async () => {", + " const planId = $w('#plansDropdown').value;", + " selectedPlan = await getPlan(planId);", + "", + " // Set default value for the new plan name", + " $w('#planName').value = `${selectedPlan.name}-duplicate`", + " $w('#clonePlanBtn').enable();", + " });", + " ", + " $w('#clonePlanBtn').onClick(async () => {", + " const newPlan = selectedPlan;", + " // Use inputs to set the new plan name and price", + " newPlan.name = $w('#planName').value;", + " newPlan.pricing.price.value = $w('#price').value;", + "", + " await createPlan(newPlan);", + " });", + "});", + "", + "async function populatePlansDropdown() {", + " const plans = await listPlans();", + " $w('#plansDropdown').options = plans.map((plan) => {", + " return {", + " label: plan.name,", + " value: plan._id", + " }", + " });", + " $w('#plansDropdown').enable();", + "}" + ], + "extra": { + "description": "The `populatePlansDropdown` function retrieves all plans and then populates them into the `#plansDropdown`. The `#plansDropdown` and `#clonePlanBtn` are set to `disabled` by default. " + } } ] }, @@ -943,6 +1192,101 @@ " * }", " */" ] + }, + { + "title": "Duplicate a plan ", + "body": [ + "/*************************************", + " * Backend code - plan-functions.jsw *", + " *************************************/", + "", + "import { plans } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedListPlans = elevate(plans.listPlans);", + "const elevatedGetPlan = elevate(plans.getPlan);", + "const elevatedCreatePlan = elevate(plans.createPlan);", + "", + "export async function listPlans() {", + " try {", + " const response = await elevatedListPlans();", + " const allPlans = response.plans;", + "", + " return allPlans;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "export async function getPlan(planId) {", + " try {", + " const selectedPlan = await elevatedGetPlan(planId);", + "", + " return selectedPlan;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "export async function createPlan(plan) {", + " try {", + " const newPlan = await elevatedCreatePlan(plan);", + "", + " return newPlan;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "", + "/*************", + " * Page code *", + " *************/", + "", + "import { listPlans, getPlan, createPlan } from 'backend/plan-functions';", + "$w.onReady(async function () {", + " $w('#plansDropdown').disable();", + " $w('#clonePlanBtn').disable();", + " populatePlansDropdown();", + "", + " let selectedPlan;", + "", + " $w('#plansDropdown').onChange(async () => {", + " const planId = $w('#plansDropdown').value;", + " selectedPlan = await getPlan(planId);", + "", + " // Set default value for the new plan name", + " $w('#planName').value = `${selectedPlan.name}-duplicate`", + " $w('#clonePlanBtn').enable();", + " });", + " ", + " $w('#clonePlanBtn').onClick(async () => {", + " const newPlan = selectedPlan;", + " // Use inputs to set the new plan name and price", + " newPlan.name = $w('#planName').value;", + " newPlan.pricing.price.value = $w('#price').value;", + "", + " await createPlan(newPlan);", + " });", + "});", + "", + "async function populatePlansDropdown() {", + " const plans = await listPlans();", + " $w('#plansDropdown').options = plans.map((plan) => {", + " return {", + " label: plan.name,", + " value: plan._id", + " }", + " });", + " $w('#plansDropdown').enable();", + "}" + ], + "extra": { + "description": "The `populatePlansDropdown` function retrieves all plans and then populates them into the `#plansDropdown`. The `#plansDropdown` and `#clonePlanBtn` are set to `disabled` by default. " + } } ] }, @@ -1338,6 +1682,70 @@ " */ ", "" ] + }, + { + "title": "Make a plan primary ", + "body": [ + "/*************************************", + " * Backend code - plan-functions.jsw *", + " *************************************/", + "", + "import { plans } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedListPublicPlans = elevate(plans.listPublicPlans);", + "const elevatedMakePlanPrimary = elevate(plans.makePlanPrimary);", + "", + "export async function listPublicPlans() {", + " try {", + " const response = await elevatedListPublicPlans();", + " const plansList = response.plans;", + "", + " return plansList;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "export async function makePlanPrimaryFunction(_id) {", + " try {", + " const primaryPlan = await elevatedMakePlanPrimary(_id);", + "", + " return primaryPlan;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/*************", + " * Page code *", + " *************/", + "", + "import planFunctions from 'backend/plan-functions';", + "", + "$w.onReady(function () {", + " populateDropdown();", + " $w('#plansList').onChange(async () => {", + " await planFunctions.makePlanPrimaryFunction(", + " $w('#plansList').value", + " )", + " });", + "});", + "", + "async function populateDropdown() {", + " const plans = await planFunctions.listPublicPlans();", + " $w('#plansList').options = plans.map(item => ({", + " label: item.name,", + " value: item._id", + " })", + " )", + "}" + ], + "extra": { + "description": "Select a public plan from the dropdown to make it appear as a primary plan on the business site. " + } } ] }, @@ -1435,6 +1843,70 @@ " * }", " */" ] + }, + { + "title": "Make a plan primary ", + "body": [ + "/*************************************", + " * Backend code - plan-functions.jsw *", + " *************************************/", + "", + "import { plans } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedListPublicPlans = elevate(plans.listPublicPlans);", + "const elevatedMakePlanPrimary = elevate(plans.makePlanPrimary);", + "", + "export async function listPublicPlans() {", + " try {", + " const response = await elevatedListPublicPlans();", + " const plansList = response.plans;", + "", + " return plansList;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "export async function makePlanPrimaryFunction(_id) {", + " try {", + " const primaryPlan = await elevatedMakePlanPrimary(_id);", + "", + " return primaryPlan;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "", + "/*************", + " * Page code *", + " *************/", + "", + "import planFunctions from 'backend/plan-functions';", + "", + "$w.onReady(function () {", + " populateDropdown();", + " $w('#plansList').onChange(async () => {", + " await planFunctions.makePlanPrimaryFunction(", + " $w('#plansList').value", + " )", + " });", + "});", + "", + "async function populateDropdown() {", + " const plans = await planFunctions.listPublicPlans();", + " $w('#plansList').options = plans.map(item => ({", + " label: item.name,", + " value: item._id", + " })", + " )", + "}" + ], + "extra": { + "description": "Select a public plan from the dropdown to make it appear as a primary plan on the business site. " + } } ] }, @@ -1764,6 +2236,65 @@ "", "/* Returned item: '7a3375ce-18a9-42cb-8e39-47918ade45ec' */" ] + }, + { + "title": "Sort plans alphabetically ", + "body": [ + "/*************************************", + " * Backend code - plan-functions.jsw *", + " *************************************/", + "", + "import { plans } from 'wix-pricing-plans.v2';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedArrangePlans = elevate(plans.arrangePlans);", + "", + "export async function sortPlansBySlug(direction) {", + " let publicPlansQuery = plans.queryPublicPlans();", + "", + " if (direction === 'ascending') {", + " publicPlansQuery = publicPlansQuery.ascending('slug');", + " } else {", + " publicPlansQuery = publicPlansQuery.descending('slug');", + " }", + "", + " const sortedPlans = await publicPlansQuery.find();", + " const planIds = sortedPlans.items.map(item => item._id);", + "", + " return await elevatedArrangePlans(planIds);", + "}", + "", + "/*************", + " * Page code *", + " *************/", + "", + "import { sortPlansBySlug } from 'backend/plan-functions';", + "import wixLocationFrontend from 'wix-location-frontend';", + "", + "$w.onReady(function () {", + " $w('#dropdownSort').options =", + " [", + " {", + " label: 'Ascending',", + " value: 'ascending'", + " },", + " {", + " label: 'Decending',", + " value: 'descending'", + " }", + " ];", + "", + " $w('#dropdownSort').onChange(async () => {", + " const direction = $w('#dropdownSort').value;", + " sortPlansBySlug(direction);", + " const url = wixLocationFrontend.url;", + " wixLocationFrontend.to(url);", + " })", + "});" + ], + "extra": { + "description": "Select a sorting option to arranage plans in ascending or descending order by plan slug. " + } } ] }, @@ -2470,7 +3001,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." }, { "name": "prev", @@ -2480,7 +3011,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -2519,7 +3050,67 @@ ] } }, + { + "name": "Fee", + "members": [ { + "name": "amount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Amount of fee to be charged" + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fee name" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "FeeConfig", + "members": [ + { + "name": "appliedAt", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time this fee will be charged" + }, + { + "name": "fee", + "optional": true, + "type": [ + { + "referenceType": "wix-pricing-plans-v2.Plans.Fee" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { "name": "GetPlanRequest", "members": [ { diff --git a/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans/guides/plans-intro.md b/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans/guides/plans-intro.md index a283c86cf2..a1c88c2427 100644 --- a/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans/guides/plans-intro.md +++ b/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans/guides/plans-intro.md @@ -18,7 +18,7 @@ title: Introduction The Pricing Plans Plans API allows you to manage your pricing plans. With the Pricing Plans Plans API, you can: -- [Create](wix-pricing-plans-v2/plans/createplan) and [update](wix-pricing-plans-v2/plans/updateplans) orders. +- [Create](wix-pricing-plans-v2/plans/createplan) and [update](wix-pricing-plans-v2/plans/updateplan) plans. - [Get](wix-pricing-plans-v2/plans/getplan), [list](wix-pricing-plans-v2/plans/listplans) and [query](wix-pricing-plans-v2/plans/querypublicplans) plans. - [Set visibility](wix-pricing-plans-v2/plans/setplanvisibility) for which plans are public and which are hidden. - [Archive](archivePlan) plans. diff --git a/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans/guides/pricing-models.md b/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans/guides/pricing-models.md new file mode 100644 index 0000000000..10cbb07f53 --- /dev/null +++ b/wix-pricing-plans-v2/wix-pricing-plans-v2/Plans/guides/pricing-models.md @@ -0,0 +1,138 @@ +--- +title: Pricing Models +--- + +# Pricing models +Pricing models contain the [pricing and duration options](https://support.wix.com/en/article/pricing-plans-creating-a-plan#step-3-setting-the-price-and-duration-of-your-plan) for a plan. + +Plans are based on a pricing model, which is defined with the plan's `pricing` property. A pricing model can be one of the following: ++ **A subscription:** A plan with recurring payment cycles. + +*Example:* A 1-year subscription with monthly, recurring payments. Each payment is $25, so the total price for the plan is $300. In this example, the subscription is in its third month. + +`cycleDuration` is the length of one payment cycle. Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration. Currently, `cycleDuration` only supports a value of `1`. + +`index` of `currentCycle` is the current payment cycle for the subscription. `index` is `0` when the order is in a free trial period. In all other cases, the `index` starts with `1` for the first payment cycle in the subscription. For orders with a single payment, the `index` will remain `1` throughout the duration. +```javascript + "pricing": { + "subscription": { + "cycleDuration": { + // Payment recurs every month + "count": 1, + "unit": "MONTH" + }, + // for 12 times + "cycleCount": 12 + }, + "prices": [{ + "duration": { + "cycleFrom": 1, + "numberOfCycles": 12 + }, + "price": { + "subtotal": "25", + "discount": "0", + "total": "25", + "currency": "USD" + } + }] + }, + ... + "currentCycle": { + "index": 3, + "startedDate": "2022-03-01T13:45:53.129Z", + "endedDate": "2022-04-01T13:45:53.129Z" + }, +``` ++ **A Single Payment for Duration plan:** A plan paid for with a single payment. The plan does not renew after the duration. + +*Example:* A plan with a single payment of $35 for 3 months. + +The `duration` `cycleFrom` and `numberOfCycles` will both be `1`, as the single price applies to the entirety of the subscription. + +`index` of `currentCycle` will remain `1` throughout the duration. +```javascript + "pricing": { + "singlePaymentForDuration": { + // Plan duration is 3 months + "count": 3, + "unit": "MONTH" + }, + "prices": [{ + "duration": { + "cycleFrom": 1, + "numberOfCycles": 1 + }, + "price": { + "subtotal": "35", + "discount": "0", + "total": "35", + "currency": "USD" + } + }] + }, + ... + "currentCycle": { + "index": 1, + "startedDate": "2022-01-01T13:45:53.129Z", + "endedDate": "2022-04-01T13:45:53.129Z" + }, +``` ++ **A Single Payment Unlimited plan:** A plan paid for with a single payment. The plan does not expire and remains valid until canceled. + +*Example:* An unlimited plan that is paid for in advance with one payment of $200. + +`singlePaymentUnlimited` is `true`. + +The `duration` `cycleFrom` and `numberOfCycles` will remain `1` throughout the duration of the plan. + +`index` of `currentCycle` will remain `1` throughout the duration. `singlePaymentUnlimitedPlans` don't return an `endedDate` in `currentCycle`. +```javascript + "pricing": { + "singlePaymentUnlimited": true, + "prices": [{ + "duration": { + "cycleFrom": 1, + "numberOfCycles": 1 + }, + "price": { + "subtotal": "200", + "discount": "0", + "total": "200", + "currency": "USD" + } + }] + }, + ... + "currentCycle": { + "index": 1, + "startedDate": "2021-06-015T13:45:53.129Z" + }, +``` + +### Free plans and free trial periods +A free plan that is valid until canceled is a `singlePaymentUnlimited` pricing model. A free plan with a limited duration is treated as a `singlePaymentForDuration` pricing model. + +A site owner can also add a free trial period, in days, to a `subscription` pricing model. When the free trial is over, the first payment cycle begins and the buyer is billed. During the free trial period, the `index` of `currentCycle` is `0`. A buyer only receives the free trial period for the first time they purchase a plan. For example, a buyer purchases a monthly plan for 3 months that includes a 7-day free trial period. The buyer may purchase the same plan again, for another 3 months, but will not receive the 7-day free trial period. + +When a buyer cancels their order during the free trial period, their subscription will expire at the end of the free trial period and they will not be billed. A site owner can [cancel an ordered plan](wix-pricing-plans-v2/orders/cancelorder) during the free trial period and choose to apply the cancellation `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. + +Canceling `IMMEDIATELY` ends the subscription for the buyer immediately, even during the free trial period, and the buyer won't be billed. Canceling at the `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period. Then, the subscription ends and the buyer is not billed. + +### Pricing plan types and visibility + ++ **Public pricing plans** are visible plans that site members and visitors can see on the site and purchase. By default, pricing plans are public when created. + ++ **Hidden pricing plans** are plans whose `public` property has been set to `false`. These plans cannot be seen on the site by the site member or visitor. For example, consider hiding a plan if it has reached its maximum capacity and temporarily is not available for purchase. + + Changing a plan’s visibility with the `public` property does not impact existing purchases. All purchases for hidden plans are still active and keep their terms and payment options. + ++ **Active pricing plans** include all non-archived plans, such as public plans and hidden plans. + ++ **Archived pricing plans** are plans that are no longer needed on the site. For example, discontinued plans. When a plan is archived, it is no longer visible as a public plan that can be chosen by site visitors. + +The `public` property is automatically set to `false` when a plan is archived. Archived plans cannot be purchased. + +Site owners can see archived plans in the Dashboard under **Pricing Plans -> Archived Plans**. + +Archiving cannot be reversed. Once archived, a plan cannot be set as active again for purchase. Archiving does not impact existing purchases made for the plan. All purchases are still active and keep their pricing and terms. \ No newline at end of file diff --git a/wix-pricing-plans-v2/wix-pricing-plans-v2/guides/pricing-plans-intro.md b/wix-pricing-plans-v2/wix-pricing-plans-v2/guides/pricing-plans-intro.md index 576a939632..ce894951e2 100644 --- a/wix-pricing-plans-v2/wix-pricing-plans-v2/guides/pricing-plans-intro.md +++ b/wix-pricing-plans-v2/wix-pricing-plans-v2/guides/pricing-plans-intro.md @@ -33,6 +33,10 @@ Make sure to set up your site to: When setting up your site to accept pricing plans, define the plans you want to offer [using the Dashboard](https://support.wix.com/en/article/creating-a-plan-in-pricing-plans) or [using the Pricing Plans' Plans APIs](wix-pricing-plans-v2/plans). +### Creating plans +In order to build user presence and generate revenue on your site, Wix provides you with the ability to offer a robust selection of different pricing plans. You can customize your plans by price, expiration, terms, included services, and more in accordance with each plans unique [pricing models](../Plans/guides/pricing-models.md). + +The [Plans API](https://www.wix.com/velo/reference/wix-pricing-plans-v2/plans) exposes the ability to create, edit, and manage your plans, in code, allowing you to customize and enhance your site for user and administrative experience. ### Managing orders @@ -43,145 +47,9 @@ Members can order pricing plans in 2 ways: > **Note:** > Updating the properties of a pricing plan does not affect any current orders of the plan by members. The existing orders retain their existing terms and pricing. - ### Pricing models -Pricing models contain the [pricing and duration options](https://support.wix.com/en/article/pricing-plans-creating-a-plan#step-3-setting-the-price-and-duration-of-your-plan) for a plan. - -Plans are based on a pricing model, which is defined with the plan's `pricing` property. A pricing model can be one of the following: -+ **A subscription:** A plan with recurring payment cycles. - -*Example:* A 1-year subscription with monthly, recurring payments. Each payment is $25, so the total price for the plan is $300. In this example, the subscription is in its third month. - -`cycleDuration` is the length of one payment cycle. Multiply `cycleDuration`'s `count` by `cycleCount` to get the subscription duration. Currently, `cycleDuration` only supports a value of `1`. - -`index` of `currentCycle` is the current payment cycle for the subscription. `index` is `0` when the order is in a free trial period. In all other cases, the `index` starts with `1` for the first payment cycle in the subscription. For orders with a single payment, the `index` will remain `1` throughout the duration. -```javascript - "pricing": { - "subscription": { - "cycleDuration": { - // Payment recurs every month - "count": 1, - "unit": "MONTH" - }, - // for 12 times - "cycleCount": 12 - }, - "prices": [{ - "duration": { - "cycleFrom": 1, - "numberOfCycles": 12 - }, - "price": { - "subtotal": "25", - "discount": "0", - "total": "25", - "currency": "USD" - } - }] - }, - ... - "currentCycle": { - "index": 3, - "startedDate": "2022-03-01T13:45:53.129Z", - "endedDate": "2022-04-01T13:45:53.129Z" - }, -``` -+ **A Single Payment for Duration plan:** A plan paid for with a single payment. The plan does not renew after the duration. - -*Example:* A plan with a single payment of $35 for 3 months. - -The `duration` `cycleFrom` and `numberOfCycles` will both be `1`, as the single price applies to the entirety of the subscription. - -`index` of `currentCycle` will remain `1` throughout the duration. -```javascript - "pricing": { - "singlePaymentForDuration": { - // Plan duration is 3 months - "count": 3, - "unit": "MONTH" - }, - "prices": [{ - "duration": { - "cycleFrom": 1, - "numberOfCycles": 1 - }, - "price": { - "subtotal": "35", - "discount": "0", - "total": "35", - "currency": "USD" - } - }] - }, - ... - "currentCycle": { - "index": 1, - "startedDate": "2022-01-01T13:45:53.129Z", - "endedDate": "2022-04-01T13:45:53.129Z" - }, -``` -+ **A Single Payment Unlimited plan:** A plan paid for with a single payment. The plan does not expire and remains valid until canceled. - -*Example:* An unlimited plan that is paid for in advance with one payment of $200. - -`singlePaymentUnlimited` is `true`. - -The `duration` `cycleFrom` and `numberOfCycles` will remain `1` throughout the duration of the plan. - -`index` of `currentCycle` will remain `1` throughout the duration. `singlePaymentUnlimitedPlans` don't return an `endedDate` in `currentCycle`. -```javascript - "pricing": { - "singlePaymentUnlimited": true, - "prices": [{ - "duration": { - "cycleFrom": 1, - "numberOfCycles": 1 - }, - "price": { - "subtotal": "200", - "discount": "0", - "total": "200", - "currency": "USD" - } - }] - }, - ... - "currentCycle": { - "index": 1, - "startedDate": "2021-06-015T13:45:53.129Z" - }, -``` - -### Free plans and free trial periods -A free plan that is valid until canceled is a `singlePaymentUnlimited` pricing model. A free plan with a limited duration is treated as a `singlePaymentForDuration` pricing model. - -A site owner can also add a free trial period, in days, to a `subscription` pricing model. When the free trial is over, the first payment cycle begins and the buyer is billed. During the free trial period, the `index` of `currentCycle` is `0`. A buyer only receives the free trial period for the first time they purchase a plan. For example, a buyer purchases a monthly plan for 3 months that includes a 7-day free trial period. The buyer may purchase the same plan again, for another 3 months, but will not receive the 7-day free trial period. - -When a buyer cancels their order during the free trial period, their subscription will expire at the end of the free trial period and they will not be billed. A site owner can [cancel an ordered plan](wix-pricing-plans-v2/orders/cancelorder) during the free trial period and choose to apply the cancellation `IMMEDIATELY` or at the `NEXT_PAYMENT_DATE`. - -Canceling `IMMEDIATELY` ends the subscription for the buyer immediately, even during the free trial period, and the buyer won't be billed. Canceling at the `NEXT_PAYMENT_DATE` allows the buyer to continue using the benefits of the subscription until the end of the free trial period. Then, the subscription ends and the buyer is not billed. - -### Pricing plan types and visibility - -+ **Public pricing plans** are visible plans that site members and visitors can see on the site and purchase. By default, pricing plans are public when created. - -+ **Hidden pricing plans** are plans whose `public` property has been set to `false`. These plans cannot be seen on the site by the site member or visitor. For example, consider hiding a plan if it has reached its maximum capacity and temporarily is not available for purchase. - - Changing a plan’s visibility with the `public` property does not impact existing purchases. All purchases for hidden plans are still active and keep their terms and payment options. - -+ **Active pricing plans** include all non-archived plans, such as public plans and hidden plans. - -+ **Archived pricing plans** are plans that are no longer needed on the site. For example, discontinued plans. When a plan is archived, it is no longer visible as a public plan that can be chosen by site visitors. - -The `public` property is automatically set to `false` when a plan is archived. Archived plans cannot be purchased. - -Site owners can see archived plans in the Dashboard under **Pricing Plans -> Archived Plans**. - -Archiving cannot be reversed. Once archived, a plan cannot be set as active again for purchase. Archiving does not impact existing purchases made for the plan. All purchases are still active and keep their pricing and terms. - - ### Orders and subscriptions -Actions related to basic pricing plan management are available from the [Pricing Plans](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%2Fmembership%3FreferralInfo%3Dvelo-docs) page in the Dashboard. These actions correspond to the functions available in the [Plans APIs](wix-pricing-plans-v2/plans/introduction). +Actions related to basic pricing plan management are available from the [Pricing Plans](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%2Fmembership%3FreferralInfo%3Dvelo-docs) page in the Dashboard. These actions correspond to the functions available in the [Plans API](wix-pricing-plans-v2/plans/introduction). 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. Actions available on this page correspond to the functions available in the [Orders APIs](wix-pricing-plans-v2/orders/introduction). @@ -189,7 +57,7 @@ Every pricing plan order corresponds to a Wix subscription, including orders for > **Notes**: > -> + Wix pricing plans are 1 of several Wix subscriptions available from the Subscriptions page. For example, the Subscriptions page also includes Wix Stores subscriptions and Wix invoice subscriptions. +> + Wix pricing plans are 1 of several Wix subscriptions available from the [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. For example, the Subscriptions page also includes Wix Stores subscriptions and Wix invoice subscriptions. > > + Pricing plans can be 1 of 3 different pricing models: `singlePaymentForDuration`, `singlePaymentUnlimited`, or `subscription`. Orders for all pricing plan models are displayed on the Subscriptions page, not just `subscription` type models. See [Pricing Models](wix-pricing-plans-v2/introduction#pricing-models) to learn more. diff --git a/wix-stores-backend/wix-stores-backend.service.json b/wix-stores-backend/wix-stores-backend.service.json index 95aef6bae0..a3726964e1 100644 --- a/wix-stores-backend/wix-stores-backend.service.json +++ b/wix-stores-backend/wix-stores-backend.service.json @@ -1,7 +1,6 @@ { "name": "wix-stores-backend", "mixes": [], - "labels": - [ "changed" ], + "labels": [], "location": { "lineno": 1, "filename": "products.js" }, @@ -829,9 +828,31 @@ [ { "lineno": 1, "filename": "fulfillments.js" } ], "docs": - { "summary": "Creates a new fulfillment in an order.", + { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.OrderFulfillments.createFulfillment()`](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/createfulfillment).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `createFulfillment()` function returns a Promise that is resolved", + [ "> #### Migration Instructions", + ">", + "> If this function is already in your code, it will continue to work.", + "> To stay compatible with future changes, migrate to", + "> [`wix-ecom-backend.OrderFulfillments.createFulfillment()`](wix-ecom-backend/orderfulfillments/createfulfillment).", + ">", + "> To migrate to the new function:", + ">", + "> 1. Add the new import statement:", + ">", + "> ```javascript", + "> import { orderFulfillments } from 'wix-ecom-backend';", + "> ```", + ">", + "> 2. Look for any code that uses `wixStoresBackend.createFulfillment()`,", + "> and replace it with `orderFulfillments.createFulfillment()`.", + "> Update your code to work with the new `createFulfillment()`", + "> response properties.", + ">", + "> 3. Test your changes to make sure your code behaves as expected.", + "", + " Creates a new fulfillment in an order.", + " The `createFulfillment()` function returns a Promise that is resolved", " to an object with the `fulfillmentId` and the updated `Order` when the fulfillment is created." ], "links": [], "examples": @@ -1040,9 +1061,32 @@ [ { "lineno": 1, "filename": "orders.js" } ], "docs": - { "summary": "Creates a new order.", + { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Orders.createOrder()`](https://www.wix.com/velo/reference/wix-ecom-backend/orders/createorder).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `createOrder()` function returns a Promise that resolves to an `Order` object when the order has been created.", + [ "> #### Migration Instructions", + ">", + "> If this function is already in your code, it will continue to work.", + "> To stay compatible with future changes, migrate to", + "> [`wix-ecom-backend.Orders.createOrder()`](wix-ecom-backend/orders/createorder).", + ">", + "> To migrate to the new function:", + ">", + "> 1. Add the new import statement:", + ">", + "> ```javascript", + "> import { orders } from 'wix-ecom-backend';", + "> ```", + ">", + "> 2. Look for any code that uses `wixStoresBackend.createOrder()`,", + "> and replace it with `orders.createOrder()`.", + "> Update your code to work with the new `createOrder()`", + "> response properties.", + ">", + "> 3. Test your changes to make sure your code behaves as expected.", + "", + "Creates a new order.", + "", + " The `createOrder()` function returns a Promise that resolves to an `Order` object when the order has been created.", "", "> **Note:** Do not pass important information from client-side code.", "Doing so opens a vulnerability that a malicious user can exploit to change information, such as a buyer’s personal details (address, email, etc.) or product price information.", @@ -2013,12 +2057,35 @@ [ "wix-stores-backend.Order" ] }, "doc": "Fulfilled - The updated order without the specified fulfillment details." }, "locations": - [ { "lineno": 39, + [ { "lineno": 97, "filename": "fulfillments.js" } ], "docs": - { "summary": "Deletes a fulfillment from an order.", + { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.OrderFulfillments.deleteFulfillment()`](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/deletefulfillment).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `deleteFulfillment()` function returns a Promise that is resolved", + [ "> #### Migration Instructions", + ">", + "> If this function is already in your code, it will continue to work.", + "> To stay compatible with future changes, migrate to", + "> [`wix-ecom-backend.OrderFulfillments.deleteFulfillment()`](wix-ecom-backend/orderfulfillments/deletefulfillment).", + ">", + "> To migrate to the new function:", + ">", + "> 1. Add the new import statement:", + ">", + "> ```javascript", + "> import { orderFulfillments } from 'wix-ecom-backend';", + "> ```", + ">", + "> 2. Look for any code that uses `wixStoresBackend.deleteFulfillment()`,", + "> and replace it with `orderFulfillments.deleteFulfillment()`.", + "> Update your code to work with the new `deleteFulfillment()`", + "> response properties.", + ">", + "> 3. Test your changes to make sure your code behaves as expected.", + "", + " Deletes a fulfillment from an order.", + "", + " The `deleteFulfillment()` function returns a Promise that is resolved", " to an updated `Order` object when the specified fulfillment", " is deleted from the order." ], "links": [], @@ -2331,8 +2398,7 @@ "extra": { } }, { "name": "getCurrentCart", - "labels": - [ "changed" ], + "labels": [], "nameParams": [], "params": [], "ret": @@ -2345,7 +2411,7 @@ [ { "lineno": 156, "filename": "carts.js" } ], "docs": - { "summary": "**Deprecated.**\nThis function will continue to work, but a newer version is available at\n[`wix-ecom-backend.CurrentCart.getCurrentCart()`](https://www.wix.com/velo/reference/wix-ecom-backend/currentcart/getcurrentcart).", + { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.CurrentCart.getCurrentCart()`](https://www.wix.com/velo/reference/wix-ecom-backend/currentcart/getcurrentcart).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": [ "> #### Migration Instructions", ">", @@ -2510,7 +2576,7 @@ [ "wix-stores-backend.LinkToPdf" ] }, "doc": "Fulfilled - URL to a PDF file.\nRejected - Error message." }, "locations": - [ { "lineno": 20, + [ { "lineno": 49, "filename": "orders.js" } ], "docs": { "summary": "Generates a link to a PDF file containing information about one or more specified orders, up to 1000 orders.", @@ -2647,7 +2713,7 @@ [ "wix-stores-backend.LinkToPdf" ] }, "doc": "Fulfilled - URL to a PDF file.\nRejected - Error message." }, "locations": - [ { "lineno": 34, + [ { "lineno": 63, "filename": "orders.js" } ], "docs": { "summary": "Generates a link to a PDF file containing an order's packing slip.", @@ -3543,7 +3609,7 @@ [ "void" ] }, "doc": "Fulfilled - When the fulfillment email is sent." }, "locations": - [ { "lineno": 56, + [ { "lineno": 143, "filename": "fulfillments.js" } ], "docs": { "summary": "Sends a fulfillment email to a specified custom fulfiller of a line item in a given order.", @@ -3641,12 +3707,35 @@ [ "wix-stores-backend.Order" ] }, "doc": "Fulfilled - The order with the updated fulfillment." }, "locations": - [ { "lineno": 18, + [ { "lineno": 47, "filename": "fulfillments.js" } ], "docs": - { "summary": "Updates an existing fulfillment in an order.", + { "summary": "**Deprecated.**\nThis function will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.OrderFulfillments.updateFulfillment()`](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/updatefulfillment).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `updateFulfillment()` function returns a Promise that is resolved", + [ "> #### Migration Instructions", + ">", + "> If this function is already in your code, it will continue to work.", + "> To stay compatible with future changes, migrate to", + "> [`wix-ecom-backend.OrderFulfillments.updateFulfillment()`](wix-ecom-backend/orderfulfillments/updatefulfillment).", + ">", + "> To migrate to the new function:", + ">", + "> 1. Add the new import statement:", + ">", + "> ```javascript", + "> import { orderFulfillments } from 'wix-ecom-backend';", + "> ```", + ">", + "> 2. Look for any code that uses `wixStoresBackend.updateFulfillment()`,", + "> and replace it with `orderFulfillments.updateFulfillment()`.", + "> Update your code to work with the new `updateFulfillment()`", + "> response properties.", + ">", + "> 3. Test your changes to make sure your code behaves as expected.", + "", + " Updates an existing fulfillment in an order.", + "", + " The `updateFulfillment()` function returns a Promise that is resolved", " to an updated `Order` object when the specified fulfillment in the order", " is updated.", "", @@ -4529,7 +4618,7 @@ "labels": [] }, { "name": "Activities", "locations": - [ { "lineno": 209, + [ { "lineno": 238, "filename": "orders.js" } ], "docs": { "summary": "An array of objects representing a log of updates related to the order.", @@ -4896,7 +4985,7 @@ "labels": [] }, { "name": "Address", "locations": - [ { "lineno": 246, + [ { "lineno": 275, "filename": "orders.js" } ], "docs": { "summary": "An object representing address information.", @@ -5239,7 +5328,7 @@ "labels": [] }, { "name": "AppliedCoupon", "locations": - [ { "lineno": 538, + [ { "lineno": 567, "filename": "orders.js" } ], "docs": { "summary": "An object representing a coupon applied to the order.", @@ -5539,7 +5628,7 @@ "labels": [] }, { "name": "BillingInfo", "locations": - [ { "lineno": 321, + [ { "lineno": 350, "filename": "orders.js" } ], "docs": { "summary": "An object representing an order's billing info.", @@ -6031,7 +6120,7 @@ "labels": [] }, { "name": "BuyerInfo", "locations": - [ { "lineno": 189, + [ { "lineno": 218, "filename": "orders.js" } ], "docs": { "summary": "An object representing information about the buyer.", @@ -7778,7 +7867,7 @@ "labels": [] }, { "name": "ChannelInfo", "locations": - [ { "lineno": 268, + [ { "lineno": 297, "filename": "orders.js" } ], "docs": { "summary": "An object representing information about the sales channel that submitted this order.", @@ -8117,7 +8206,7 @@ "labels": [] }, { "name": "CreateOrderBillingInfo", "locations": - [ { "lineno": 305, + [ { "lineno": 334, "filename": "orders.js" } ], "docs": { "summary": "An object representing billing information for creating an order.", @@ -8447,7 +8536,7 @@ "labels": [] }, { "name": "CreateOrderBuyerInfo", "locations": - [ { "lineno": 175, + [ { "lineno": 204, "filename": "orders.js" } ], "docs": { "summary": "An object representing buyer information for creating an order.", @@ -8744,7 +8833,7 @@ "labels": [] }, { "name": "CreateOrderLineItem", "locations": - [ { "lineno": 473, + [ { "lineno": 502, "filename": "orders.js" } ], "docs": { "summary": "An object representing a line item for creating an order.", @@ -9106,7 +9195,7 @@ "labels": [] }, { "name": "CreateOrderLineItemPriceData", "locations": - [ { "lineno": 368, + [ { "lineno": 397, "filename": "orders.js" } ], "docs": { "summary": "An object representing an line item's price information for creating an order.", @@ -9404,7 +9493,7 @@ "labels": [] }, { "name": "CreateOrderMediaItem", "locations": - [ { "lineno": 422, + [ { "lineno": 451, "filename": "orders.js" } ], "docs": { "summary": "An object representing a line item's primary media item for creating an order.", @@ -9703,7 +9792,7 @@ "labels": [] }, { "name": "CreateOrderTotals", "locations": - [ { "lineno": 518, + [ { "lineno": 547, "filename": "orders.js" } ], "docs": { "summary": "An object representing an order's totals for creating an order.", @@ -10238,7 +10327,7 @@ "labels": [] }, { "name": "CustomField", "locations": - [ { "lineno": 529, + [ { "lineno": 558, "filename": "orders.js" } ], "docs": { "summary": "An object representing a custom field added by the customer during the checkout process.", @@ -10538,7 +10627,7 @@ "labels": [] }, { "name": "CustomTextField", "locations": - [ { "lineno": 430, + [ { "lineno": 459, "filename": "orders.js" } ], "docs": { "summary": "An object representing a custom text field.", @@ -10866,7 +10955,7 @@ "labels": [] }, { "name": "Discount", "locations": - [ { "lineno": 547, + [ { "lineno": 576, "filename": "orders.js" } ], "docs": { "summary": "An object representing a discount applied to the order.", @@ -11160,7 +11249,7 @@ "labels": [] }, { "name": "EnteredBy", "locations": - [ { "lineno": 288, + [ { "lineno": 317, "filename": "orders.js" } ], "docs": { "summary": "An object representing information about the identity of the order initiator.\nOccasionally, 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.", @@ -11457,7 +11546,7 @@ "labels": [] }, { "name": "Fulfillment", "locations": - [ { "lineno": 91, + [ { "lineno": 178, "filename": "fulfillments.js" } ], "docs": { "summary": "An object representing order fulfillment details.", @@ -11669,7 +11758,7 @@ "labels": [] }, { "name": "FulfillmentInfo", "locations": - [ { "lineno": 82, + [ { "lineno": 169, "filename": "fulfillments.js" } ], "docs": { "summary": "An object representing new fulfillment details.", @@ -11875,7 +11964,7 @@ "labels": [] }, { "name": "FulfillmentLineItem", "locations": - [ { "lineno": 102, + [ { "lineno": 189, "filename": "fulfillments.js" } ], "docs": { "summary": "An object representing information about a fulfillment's line items.", @@ -12634,7 +12723,7 @@ "labels": [] }, { "name": "LineItemPriceData", "locations": - [ { "lineno": 359, + [ { "lineno": 388, "filename": "orders.js" } ], "docs": { "summary": "An object representing an line item's price information.", @@ -12934,7 +13023,7 @@ "labels": [] }, { "name": "LinkToPdf", "locations": - [ { "lineno": 48, + [ { "lineno": 77, "filename": "orders.js" } ], "docs": { "summary": "An object with the link to a PDF file.", @@ -13182,7 +13271,7 @@ "labels": [] }, { "name": "NewFulfillmentAndOrder", "locations": - [ { "lineno": 73, + [ { "lineno": 160, "filename": "fulfillments.js" } ], "docs": { "summary": "An object representing order fulfillment details.", @@ -13386,7 +13475,7 @@ "labels": [] }, { "name": "Option", "locations": - [ { "lineno": 404, + [ { "lineno": 433, "filename": "orders.js" } ], "docs": { "summary": "An object representing a line item option.", @@ -13683,7 +13772,7 @@ "labels": [] }, { "name": "Order", "locations": - [ { "lineno": 100, + [ { "lineno": 129, "filename": "orders.js" } ], "docs": { "summary": "An object representing an order.", @@ -14070,7 +14159,7 @@ "labels": [] }, { "name": "OrderInfo", "locations": - [ { "lineno": 149, + [ { "lineno": 178, "filename": "orders.js" } ], "docs": { "summary": "An object representing information for creating an order.", @@ -14414,7 +14503,7 @@ "labels": [] }, { "name": "OrderLineItem", "locations": - [ { "lineno": 438, + [ { "lineno": 467, "filename": "orders.js" } ], "docs": { "summary": "An object representing a line item in an order.", @@ -14785,7 +14874,7 @@ "labels": [] }, { "name": "OrderMediaItem", "locations": - [ { "lineno": 413, + [ { "lineno": 442, "filename": "orders.js" } ], "docs": { "summary": "An object representing a line item's primary media item.", @@ -15086,7 +15175,7 @@ "labels": [] }, { "name": "OrderShippingInfo", "locations": - [ { "lineno": 339, + [ { "lineno": 368, "filename": "orders.js" } ], "docs": { "summary": "An object representing an order's shipping information.", @@ -15675,7 +15764,7 @@ "labels": [] }, { "name": "PickupDetails", "locations": - [ { "lineno": 392, + [ { "lineno": 421, "filename": "orders.js" } ], "docs": { "summary": "An object representing an order's pickup details.", @@ -16902,7 +16991,7 @@ "labels": [] }, { "name": "Refund", "locations": - [ { "lineno": 55, + [ { "lineno": 84, "filename": "orders.js" } ], "docs": { "summary": "An object representing order refund information.", @@ -17092,7 +17181,7 @@ "removed" ] }, { "name": "ShipmentDetails", "locations": - [ { "lineno": 376, + [ { "lineno": 405, "filename": "orders.js" } ], "docs": { "summary": "An object representing an order's shipping details.", @@ -17423,7 +17512,7 @@ "labels": [] }, { "name": "ShipmentPriceData", "locations": - [ { "lineno": 351, + [ { "lineno": 380, "filename": "orders.js" } ], "docs": { "summary": "An object representing shipment price information.", @@ -17720,7 +17809,7 @@ "labels": [] }, { "name": "StreetAddress", "locations": - [ { "lineno": 238, + [ { "lineno": 267, "filename": "orders.js" } ], "docs": { "summary": "An object representing information about the street name and street number of an address.", @@ -18017,7 +18106,7 @@ "labels": [] }, { "name": "SubscriptionInfo", "locations": - [ { "lineno": 69, + [ { "lineno": 98, "filename": "orders.js" } ], "docs": { "links": [], @@ -18042,7 +18131,7 @@ "labels": [] }, { "name": "SubscriptionOptionInfo", "locations": - [ { "lineno": 92, + [ { "lineno": 121, "filename": "orders.js" } ], "docs": { "links": [], @@ -18064,7 +18153,7 @@ "labels": [] }, { "name": "SubscriptionSettings", "locations": - [ { "lineno": 77, + [ { "lineno": 106, "filename": "orders.js" } ], "docs": { "links": [], @@ -18086,7 +18175,7 @@ "labels": [] }, { "name": "Totals", "locations": - [ { "lineno": 505, + [ { "lineno": 534, "filename": "orders.js" } ], "docs": { "summary": "An object representing an order's totals.", @@ -18401,7 +18490,7 @@ "labels": [] }, { "name": "TrackingInfo", "locations": - [ { "lineno": 113, + [ { "lineno": 200, "filename": "fulfillments.js" } ], "docs": { "summary": "An object representing tracking information for a fulfilled order.", @@ -19056,7 +19145,7 @@ "labels": [] }, { "name": "VatId", "locations": - [ { "lineno": 260, + [ { "lineno": 289, "filename": "orders.js" } ], "docs": { "summary": "An object representing value added tax (VAT) information.", @@ -19353,7 +19442,7 @@ "labels": [] }, { "name": "VideoItem", "locations": - [ { "lineno": 246, + [ { "lineno": 288, "filename": "events.js" } ], "docs": { "summary": "An object used by the Gallery properties `items` and `currentItem` to represent a single gallery video.", diff --git a/wix-stores-backend/wix-stores-backend/Events.service.json b/wix-stores-backend/wix-stores-backend/Events.service.json index 6437fa55e6..99e68b1f4c 100644 --- a/wix-stores-backend/wix-stores-backend/Events.service.json +++ b/wix-stores-backend/wix-stores-backend/Events.service.json @@ -1,7 +1,8 @@ { "name": "Events", "memberOf": "wix-stores-backend", "mixes": [], - "labels": [], + "labels": + [ "changed" ], "location": { "lineno": 1, "filename": "events.js" }, @@ -47,12 +48,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 68, + [ { "lineno": 76, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when a visitor abandons a shopping cart.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onAbandonedCheckoutCreated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onabandonedcheckoutcreated).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onCartAbandoned()` event handler runs when a visitor adds an item to the", + [ "An event that fires when a visitor abandons a shopping cart.", + "", + " The `onCartAbandoned()` event handler runs when a visitor adds an item to the", " shopping cart, but does not complete the purchase within 1 hour.", "", " If the visitor completes the purchase after it has been abandoned, an", @@ -116,12 +119,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 176, + [ { "lineno": 210, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when a visitor completes a purchase from a shopping cart.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onCheckoutCompleted()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/oncheckoutcompleted).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onCartCompleted()` event handler runs when a visitor completes a", + [ "An event that fires when a visitor completes a purchase from a shopping cart.", + "", + " The `onCartCompleted()` event handler runs when a visitor completes a", " purchase from a shopping cart.", "", "> **Note:** Backend events don't work when previewing your site." ], @@ -265,12 +270,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 146, + [ { "lineno": 170, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when a cart is created.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onCartCreated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/oncartcreated).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.\n\nFor more info about the differences between the Stores Cart and eCommerce Cart, refer to the [cart conversion table](https://www.wix.com/velo/reference/wix-ecom-backend/cart/stores-to-ecommerce-cart-conversion-table).", "description": - [ "The `onCartCreated()` event handler runs the first time a site visitor adds a product to their shopping cart.", + [ "An event that fires when a cart is created.", + "", + "The `onCartCreated()` event handler runs the first time a site visitor adds a product to their shopping cart.", "", "Removing all items from the cart and adding a new item does not create a new cart and does not trigger this event.", "", @@ -328,12 +335,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 115, + [ { "lineno": 131, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when a visitor completes a purchase from an abandoned shopping cart.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onAbandonedCheckoutRecovered()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onabandonedcheckoutrecovered).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onCartRecovered()` event handler runs when a visitor completes a purchase", + [ "An event that fires when a visitor completes a purchase from an abandoned shopping cart.", + "", + " The `onCartRecovered()` event handler runs when a visitor completes a purchase", " more than 1 hour after items have been added to a shopping cart.", "", " You can use this event to cancel planned communications with the visitor who abandoned the shopping cart.", @@ -377,7 +386,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 305, + [ { "lineno": 347, "filename": "events.js" } ], "docs": { "summary": "An event that fires when a product collection is created.", @@ -422,7 +431,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 352, + [ { "lineno": 394, "filename": "events.js" } ], "docs": { "summary": "An event that fires when a product collection is deleted.", @@ -465,7 +474,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 329, + [ { "lineno": 371, "filename": "events.js" } ], "docs": { "summary": "An event that fires when a product collection is updated.", @@ -513,12 +522,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 484, + [ { "lineno": 526, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when an order fulfillment is created.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onFulfillmentsUpdated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onfulfillmentsupdated).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onFulfillmentCreated()` event handler runs when one of the following occurs:", + [ "An event that fires when an order fulfillment is created.", + "", + " The `onFulfillmentCreated()` event handler runs when one of the following occurs:", "+ The [createFulfillment()](https://www.wix.com/velo/reference/wix-stores-backend/createfulfillment) function is called.", "+ A [tracking number](https://support.wix.com/en/article/wix-stores-adding-a-tracking-number-to-a-store-order) is added to an order.", "", @@ -575,12 +586,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 547, + [ { "lineno": 605, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when an order fulfillment is deleted.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onFulfillmentsUpdated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onfulfillmentsupdated).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onFulfillmentDeleted()` event handler runs when the [deleteFulfillment()](https://www.wix.com/velo/reference/wix-stores-backend/deletefulfillment) function is called.", + [ "An event that fires when an order fulfillment is deleted.", + "", + " The `onFulfillmentDeleted()` event handler runs when the [deleteFulfillment()](https://www.wix.com/velo/reference/wix-stores-backend/deletefulfillment) function is called.", "", "> **Note:** Backend events don't work when previewing your site." ], "links": [], @@ -620,12 +633,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 521, + [ { "lineno": 571, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when an order fulfillment is updated.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onFulfillmentsUpdated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onfulfillmentsupdated).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onFulfillmentUpdated()` event handler runs when one of the following occurs:", + [ "An event that fires when an order fulfillment is updated.", + "", + " The `onFulfillmentUpdated()` event handler runs when one of the following occurs:", "+ The [updateFulfillment()](https://www.wix.com/velo/reference/wix-stores-backend/updatefulfillment) function is called.", "+ A [tracking number](https://support.wix.com/en/article/wix-stores-adding-a-tracking-number-to-a-store-order) on an order is edited.", "", @@ -672,7 +687,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 419, + [ { "lineno": 461, "filename": "events.js" } ], "docs": { "summary": "An event that fires when an inventory item's information is updated.", @@ -717,7 +732,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 443, + [ { "lineno": 485, "filename": "events.js" } ], "docs": { "summary": "An event that fires when the inventory information of a product variant is updated.", @@ -779,11 +794,12 @@ [ { "lineno": 30, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when a new order is placed.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onOrderApproved()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onorderapproved).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onNewOrder()` event handler runs when a new order is placed in your site's", - " store. The received `NewOrderEvent`", - " object contains information about the new order that was placed.", + [ "An event that fires when a new order is placed.", + "", + "The `onNewOrder()` event handler runs when a new order is placed in your site's store.", + "The received `NewOrderEvent` object contains information about the new order that was placed.", "", "> **Note:** Backend events don't work when previewing your site." ], "links": [], @@ -891,12 +907,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 593, + [ { "lineno": 667, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when an order is canceled.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onOrderCanceled()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordercanceled).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onOrderCanceled()` event handler runs when an order is canceled. For example, when an order is canceled in the site's Dashboard.", + [ "An event that fires when an order is canceled.", + "", + " The `onOrderCanceled()` event handler runs when an order is canceled. For example, when an order is canceled in the site's Dashboard.", "", "> **Note:** Backend events don't work when previewing your site." ], "links": [], @@ -1082,12 +1100,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 579, + [ { "lineno": 645, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when an order is marked as paid.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onOrderPaymentStatusUpdated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onorderpaymentstatusupdated).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onOrderPaid()` event handler runs when an order is paid either via customer checkout, or when [marked as paid on your site's Dashboard](https://support.wix.com/en/article/wix-stores-handling-store-orders#marking-orders-as-paid).", + [ "An event that fires when an order is marked as paid.", + "", + " The `onOrderPaid()` event handler runs when an order is paid either via customer checkout, or when [marked as paid on your site's Dashboard](https://support.wix.com/en/article/wix-stores-handling-store-orders#marking-orders-as-paid).", "", "> **Note:** Backend events don't work when previewing your site." ], "links": [], @@ -1271,7 +1291,8 @@ "extra": { } }, { "name": "onOrderRefunded", - "labels": [], + "labels": + [ "changed" ], "nameParams": [], "params": [ { "name": "event", @@ -1280,12 +1301,14 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 614, + [ { "lineno": 696, "filename": "events.js" } ], "docs": - { "summary": "An event that fires when an order is refunded.", + { "summary": "**Deprecated.**\nThis event will continue to work until June 30, 2024, but a newer version is available at\n[`wix-ecom-backend.Events.onOrderTransactionsUpdated()`](https://www.wix.com/velo/reference/wix-ecom-backend/events/onordertransactionsupdated).\n\nWe recommend you migrate to the new [Wix eCommerce APIs](https://www.wix.com/velo/reference/wix-ecom-backend/introduction) as soon as possible.", "description": - [ "The `onOrderRefunded()` event handler runs when an order is refunded. For example, when an order is refunded in your site's Dashboard.", + [ "An event that fires when an order is refunded.", + "", + " The `onOrderRefunded()` event handler runs when an order is refunded. For example, when an order is refunded in your site's Dashboard.", "", "> **Note:** Backend events don't work when previewing your site." ], "links": [], @@ -1478,7 +1501,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 211, + [ { "lineno": 253, "filename": "events.js" } ], "docs": { "summary": "An event that fires when a product is created.", @@ -1542,7 +1565,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 283, + [ { "lineno": 325, "filename": "events.js" } ], "docs": { "summary": "An event that fires when a product is deleted.", @@ -1585,7 +1608,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 260, + [ { "lineno": 302, "filename": "events.js" } ], "docs": { "summary": "An event that fires when a product is updated.", @@ -1644,7 +1667,7 @@ "ret": { "type": "void" }, "locations": - [ { "lineno": 374, + [ { "lineno": 416, "filename": "events.js" } ], "docs": { "summary": "An event that fires when variant information for a product is updated.", @@ -1701,7 +1724,7 @@ "messages": [ { "name": "CartAbandonedEvent", "locations": - [ { "lineno": 88, + [ { "lineno": 104, "filename": "events.js" } ], "docs": { "summary": "An object representing a shopping cart that was abandoned.", @@ -1779,7 +1802,7 @@ "labels": [] }, { "name": "CartCompletedEvent", "locations": - [ { "lineno": 192, + [ { "lineno": 234, "filename": "events.js" } ], "docs": { "summary": "An object representing a shopping cart that was completed.", @@ -1948,7 +1971,7 @@ "labels": [] }, { "name": "CartCreatedEvent", "locations": - [ { "lineno": 162, + [ { "lineno": 196, "filename": "events.js" } ], "docs": { "summary": "An object representing a shopping cart that was created.", @@ -2018,7 +2041,7 @@ "labels": [] }, { "name": "CartRecoveredEvent", "locations": - [ { "lineno": 132, + [ { "lineno": 156, "filename": "events.js" } ], "docs": { "summary": "An object representing a shopping cart that was recovered.", @@ -2067,7 +2090,7 @@ "labels": [] }, { "name": "CartTotals", "locations": - [ { "lineno": 104, + [ { "lineno": 120, "filename": "events.js" } ], "docs": { "summary": "An object representing the totals of a shopping cart.", @@ -2130,7 +2153,7 @@ "labels": [] }, { "name": "CollectionCreatedEvent", "locations": - [ { "lineno": 320, + [ { "lineno": 362, "filename": "events.js" } ], "docs": { "summary": "An object representing a product collection that was created.", @@ -2173,7 +2196,7 @@ "labels": [] }, { "name": "CollectionDeletedEvent", "locations": - [ { "lineno": 367, + [ { "lineno": 409, "filename": "events.js" } ], "docs": { "summary": "An object representing a product collection that was deleted.", @@ -2208,7 +2231,7 @@ "labels": [] }, { "name": "CollectionUpdatedEvent", "locations": - [ { "lineno": 344, + [ { "lineno": 386, "filename": "events.js" } ], "docs": { "summary": "An object representing a product collection that was updated.", @@ -2254,7 +2277,7 @@ "labels": [] }, { "name": "FulfillmentCreatedEvent", "locations": - [ { "lineno": 500, + [ { "lineno": 550, "filename": "events.js" } ], "docs": { "summary": "An object representing fulfillment information that was created.", @@ -2323,7 +2346,7 @@ "labels": [] }, { "name": "FulfillmentDeletedEvent", "locations": - [ { "lineno": 561, + [ { "lineno": 627, "filename": "events.js" } ], "docs": { "summary": "An object representing fulfillment information that was deleted.", @@ -2368,7 +2391,7 @@ "labels": [] }, { "name": "FulfillmentUpdatedEvent", "locations": - [ { "lineno": 537, + [ { "lineno": 595, "filename": "events.js" } ], "docs": { "summary": "An object representing fulfillment information that was updated.", @@ -2418,7 +2441,7 @@ "labels": [] }, { "name": "InventoryItemUpdatedEvent", "locations": - [ { "lineno": 434, + [ { "lineno": 476, "filename": "events.js" } ], "docs": { "summary": "An object representing an inventory item that was updated.", @@ -2461,7 +2484,7 @@ "labels": [] }, { "name": "InventoryVariantUpdatedEvent", "locations": - [ { "lineno": 458, + [ { "lineno": 500, "filename": "events.js" } ], "docs": { "summary": "An object representing product variant information that was updated.", @@ -2521,7 +2544,7 @@ "labels": [] }, { "name": "NewOrderEvent", "locations": - [ { "lineno": 48, + [ { "lineno": 56, "filename": "events.js" } ], "docs": { "summary": "An object representing a new order from a store.", @@ -2659,7 +2682,7 @@ "labels": [] }, { "name": "OrderCanceledEvent", "locations": - [ { "lineno": 607, + [ { "lineno": 689, "filename": "events.js" } ], "docs": { "summary": "An object representing information about a canceled order.", @@ -2843,7 +2866,7 @@ "labels": [] }, { "name": "OrderRefundedEvent", "locations": - [ { "lineno": 628, + [ { "lineno": 718, "filename": "events.js" } ], "docs": { "summary": "An object representing information about a refunded order.", @@ -3037,7 +3060,7 @@ "labels": [] }, { "name": "ProductChoices", "locations": - [ { "lineno": 407, + [ { "lineno": 449, "filename": "events.js" } ], "docs": { "summary": "An object representing the specific choices from the product's options.", @@ -3092,7 +3115,7 @@ "labels": [] }, { "name": "ProductCreatedEvent", "locations": - [ { "lineno": 226, + [ { "lineno": 268, "filename": "events.js" } ], "docs": { "summary": "An object representing a product that was created.", @@ -3193,7 +3216,7 @@ "labels": [] }, { "name": "ProductDeletedEvent", "locations": - [ { "lineno": 298, + [ { "lineno": 340, "filename": "events.js" } ], "docs": { "summary": "An object representing a product that was deleted.", @@ -3228,7 +3251,7 @@ "labels": [] }, { "name": "ProductUpdatedEvent", "locations": - [ { "lineno": 275, + [ { "lineno": 317, "filename": "events.js" } ], "docs": { "summary": "An object representing a product that was updated.", @@ -3285,7 +3308,7 @@ "labels": [] }, { "name": "UpdatedVariant", "locations": - [ { "lineno": 397, + [ { "lineno": 439, "filename": "events.js" } ], "docs": { "summary": "An object representing a product variants that was updated.", @@ -3349,7 +3372,7 @@ "labels": [] }, { "name": "UpdatedVariantInventory", "locations": - [ { "lineno": 467, + [ { "lineno": 509, "filename": "events.js" } ], "docs": { "summary": "An object representing product variant that was updated.", @@ -3406,7 +3429,7 @@ "labels": [] }, { "name": "VariantInventoryValue", "locations": - [ { "lineno": 476, + [ { "lineno": 518, "filename": "events.js" } ], "docs": { "summary": "An object representing a product variant value.", @@ -3460,7 +3483,7 @@ "labels": [] }, { "name": "VariantsUpdatedEvent", "locations": - [ { "lineno": 389, + [ { "lineno": 431, "filename": "events.js" } ], "docs": { "summary": "An object representing product variants that were updated.", diff --git a/wix-stores-v2/wix-stores-v2/AbandonedCarts.service.json b/wix-stores-v2/wix-stores-v2/AbandonedCarts.service.json index 6c836cc6a9..689001888f 100644 --- a/wix-stores-v2/wix-stores-v2/AbandonedCarts.service.json +++ b/wix-stores-v2/wix-stores-v2/AbandonedCarts.service.json @@ -68,7 +68,8 @@ ] }, "isVeloEvent": false, - "syntaxName": "getAbandonedCart" + "syntaxName": "getAbandonedCart", + "isAdminMethod": true }, { "name": "queryAbandonedCarts", @@ -132,7 +133,8 @@ "id": "maturity-beta" } ], - "syntaxName": "queryAbandonedCarts" + "syntaxName": "queryAbandonedCarts", + "isAdminMethod": true } ], "messages": [ diff --git a/wix-stores-v2/wix-stores-v2/Collections.service.json b/wix-stores-v2/wix-stores-v2/Collections.service.json index 07c9c4724d..52bd1b5272 100644 --- a/wix-stores-v2/wix-stores-v2/Collections.service.json +++ b/wix-stores-v2/wix-stores-v2/Collections.service.json @@ -71,7 +71,73 @@ "id": "maturity-beta" } ], - "syntaxName": "getCollection" + "syntaxName": "getCollection", + "isAdminMethod": true + }, + { + "name": "getCollectionBySlug", + "params": [ + { + "name": "slug", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Slug of the collection to retrieve.", + "required": true + } + ], + "requiredFields": [ + "slug" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Collections.GetCollectionBySlugResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves a collection with the provided slug.", + "description": [], + "examples": [ + { + "title": "getCollectionBySlug example", + "body": [ + "import { collections } from 'wix-stores.v2';", + " ", + " async function getCollectionBySlug(slug) {", + " try {", + " const result = await collections.getCollectionBySlug(slug);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "getCollectionBySlug", + "isAdminMethod": true }, { "name": "queryCollections", @@ -89,9 +155,11 @@ "summary": "Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.", "description": [ "See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.", + "", + "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", - "|`id`|[`eq()`](wix-stores-v2.Collections.CollectionsQueryBuilder#eq),[`ne()`](wix-stores-v2.Collections.CollectionsQueryBuilder#ne),[`exists()`](wix-stores-v2.Collections.CollectionsQueryBuilder#exists),[`in()`](wix-stores-v2.Collections.CollectionsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Collections.CollectionsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Collections.CollectionsQueryBuilder#startsWith),[`ascending()`](wix-stores-v2.Collections.CollectionsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Collections.CollectionsQueryBuilder#descending)|", + "|`_id`|[`eq()`](wix-stores-v2.Collections.CollectionsQueryBuilder#eq),[`ne()`](wix-stores-v2.Collections.CollectionsQueryBuilder#ne),[`exists()`](wix-stores-v2.Collections.CollectionsQueryBuilder#exists),[`in()`](wix-stores-v2.Collections.CollectionsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Collections.CollectionsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Collections.CollectionsQueryBuilder#startsWith),[`ascending()`](wix-stores-v2.Collections.CollectionsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Collections.CollectionsQueryBuilder#descending)|", "|`name`|[`eq()`](wix-stores-v2.Collections.CollectionsQueryBuilder#eq),[`ne()`](wix-stores-v2.Collections.CollectionsQueryBuilder#ne),[`exists()`](wix-stores-v2.Collections.CollectionsQueryBuilder#exists),[`in()`](wix-stores-v2.Collections.CollectionsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Collections.CollectionsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Collections.CollectionsQueryBuilder#startsWith),[`ascending()`](wix-stores-v2.Collections.CollectionsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Collections.CollectionsQueryBuilder#descending)|" ], "examples": [ @@ -114,7 +182,8 @@ "id": "maturity-beta" } ], - "syntaxName": "queryCollections" + "syntaxName": "queryCollections", + "isAdminMethod": true } ], "messages": [ @@ -212,7 +281,7 @@ "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { "name": "limit", @@ -222,7 +291,7 @@ "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -242,7 +311,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." }, { "name": "prev", @@ -252,7 +321,46 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "Cursor pointing to the previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetCollectionBySlugRequest", + "members": [ + { + "name": "slug", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Slug of the collection to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetCollectionBySlugResponse", + "members": [ + { + "name": "collection", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Collections.Collection" + } + ], + "doc": "The requested collection." } ], "docs": { diff --git a/wix-stores-v2/wix-stores-v2/Collections/CollectionsQueryResult.service.json b/wix-stores-v2/wix-stores-v2/Collections/CollectionsQueryResult.service.json index 962de43ab8..cda0fe5b10 100644 --- a/wix-stores-v2/wix-stores-v2/Collections/CollectionsQueryResult.service.json +++ b/wix-stores-v2/wix-stores-v2/Collections/CollectionsQueryResult.service.json @@ -11,6 +11,9 @@ { "name": "currentPage", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } @@ -209,6 +212,9 @@ { "name": "totalCount", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } @@ -245,6 +251,9 @@ { "name": "totalPages", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } diff --git a/wix-stores-v2/wix-stores-v2/Events.service.json b/wix-stores-v2/wix-stores-v2/Events.service.json index 9b617250df..6963e5bbbd 100644 --- a/wix-stores-v2/wix-stores-v2/Events.service.json +++ b/wix-stores-v2/wix-stores-v2/Events.service.json @@ -9,6 +9,303 @@ "relatedGuides": [], "properties": [], "operations": [ + { + "name": "onBackInStockNotificationRequestCreated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequestCreated", + "displayName": "BackInStockNotificationRequestCreated" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "Triggered when a back in stock notification request is created.", + "description": [], + "examples": [ + { + "title": "onBackInStockNotificationRequestCreated example", + "body": [ + "", + " export function wixEcom_onBackInStockNotificationRequestCreated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixEcom_onBackInStockNotificationRequestCreated" + }, + { + "name": "onBackInStockNotificationRequestDeleted", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequestDeleted", + "displayName": "BackInStockNotificationRequestDeleted" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "Triggered when a back in stock notification request is deleted.", + "description": [], + "examples": [ + { + "title": "onBackInStockNotificationRequestDeleted example", + "body": [ + "", + " export function wixEcom_onBackInStockNotificationRequestDeleted(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixEcom_onBackInStockNotificationRequestDeleted" + }, + { + "name": "onBackInStockNotificationRequestUpdated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequestUpdated", + "displayName": "BackInStockNotificationRequestUpdated" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "summary": "Triggered when a back in stock notification request is updated.", + "description": [], + "examples": [ + { + "title": "onBackInStockNotificationRequestUpdated example", + "body": [ + "", + " export function wixEcom_onBackInStockNotificationRequestUpdated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixEcom_onBackInStockNotificationRequestUpdated" + }, + { + "name": "onProductCreated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProductCreated", + "displayName": "ProductCreated" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onProductCreated example", + "body": [ + "", + " export function wixStoresCatalog_onProductCreated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixStoresCatalog_onProductCreated" + }, + { + "name": "onProductDeleted", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProductDeleted", + "displayName": "ProductDeleted" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onProductDeleted example", + "body": [ + "", + " export function wixStoresCatalog_onProductDeleted(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixStoresCatalog_onProductDeleted" + }, + { + "name": "onProductUpdated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProductUpdated", + "displayName": "ProductUpdated" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onProductUpdated example", + "body": [ + "", + " export function wixStoresCatalog_onProductUpdated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixStoresCatalog_onProductUpdated" + }, { "name": "onSubscriptionOptionCreated", "params": [ @@ -16,7 +313,7 @@ "name": "event", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionCreatedEvent", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionCreatedEvent", "displayName": "SubscriptionOptionCreatedEvent" } ], @@ -34,8 +331,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a subscription option is created.", - "description": [], + "summary": "Triggered when a subscription option is created.\n
", + "description": [ + "_Deprecation Notice:_\n\nThis webhook has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "onSubscriptionOptionCreated example", @@ -52,6 +351,11 @@ ] }, "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "wixStores_onSubscriptionOptionCreated" }, { @@ -61,7 +365,7 @@ "name": "event", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionDeletedEvent", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionDeletedEvent", "displayName": "SubscriptionOptionDeletedEvent" } ], @@ -79,8 +383,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a subscription option is deleted.", - "description": [], + "summary": "Triggered when a subscription option is deleted.\n
", + "description": [ + "_Deprecation Notice:_\n\nThis webhook has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "onSubscriptionOptionDeleted example", @@ -97,6 +403,11 @@ ] }, "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], "syntaxName": "wixStores_onSubscriptionOptionDeleted" }, { @@ -106,7 +417,7 @@ "name": "event", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionUpdated", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionUpdated", "displayName": "SubscriptionOptionUpdated" } ], @@ -124,8 +435,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a subscription option is changed.", - "description": [], + "summary": "Triggered when a subscription option is changed.\n
", + "description": [ + "_Deprecation Notice:_\n\nThis webhook has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "onSubscriptionOptionUpdated example", @@ -142,12 +455,8040 @@ ] }, "isVeloEvent": true, - "syntaxName": "wixStores_onSubscriptionOptionUpdated" + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixStores_onSubscriptionOptionUpdated" } ], "messages": [ { - "name": "wixVeloEventsAllowOneTimePurchasesRequest", + "name": "ecomV1BackInStockNotificationRequestActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestApp", + "members": [ + { + "name": "appDefId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The AppDefId" + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The instance Id" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestBackInStockItemDetails", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item image." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item name." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item price." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestBackInStockNotificationRequest", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the notification request was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Request ID." + }, + { + "name": "autoNotified", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a notification was sent automatically.\n\n`autoNotified` is empty when the notification request is created and is not returned until\nthe field has a value. `autoNotified` receives a value when a notification email is sent for this request object.\n\n`autoNotified` sets to `TRUE` if the notification is sent through the site, either automatically or with [Report Items Back In Stock](/report-items-back-in-stock).\nIf the notification email is sent offline but the `status` is updated with [Mark As Notification Sent](/mark-as-notification-sent),\nthen `autoNotified` sets to `FALSE`." + }, + { + "name": "catalogReference", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestCatalogReference", + "displayName": "CatalogReference" + } + ], + "doc": "Catalog and item reference that the notification request is for.\n\nIncludes IDs for the catalog and item it came from, as well as additional, optional information.\n" + }, + { + "name": "contactId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact ID for the contact with this `email`.\n\nIf a contact does not already exist with the email address submitted when creating this request, then a new contact is created.\nFor more information about contacts, see the [Contacts API](https://dev.wix.com/docs/rest/api-reference/contacts/introduction)." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Email address to send notification to about item being back in stock." + }, + { + "name": "itemUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item URL for this request." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Status of the notification.\n\n`status` is set to `RECEIVED` when the notification request is created.\nThe `status` changes once a notification email is sent for this request object:\n+ When a notification email is sent through the site, either automatically or with [Report Items Back In Stock](/report-items-back-in-stock), then the `status` is briefly set to `PROCESSING` and then set to `NOTIFICATION_SENT` if the email is successul, and `FAILED` if it fails.\n+ When a notification email is sent offline, use [Mark As Notification Sent](/mark-as-notification-sent) to set `status` to `NOTIFICATION_SENT`." + } + ], + "docs": { + "description": [ + "The back in stock notification request allows a customer to receive a notifiction when a specific item\nis available again. The request includes information about the person making the request, the item\nthey want to receive a notification for, and the status of the notification." + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestBackInStockNotificationRequestCreated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequest", + "displayName": "BackInStockNotificationRequest" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestBackInStockNotificationRequestDeleted", + "members": [ + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestBackInStockNotificationRequestUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequest", + "displayName": "BackInStockNotificationRequest" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestBackInStockNotificationRequestsCount", + "members": [ + { + "name": "catalogReference", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestCatalogReference", + "displayName": "CatalogReference" + } + ], + "doc": "Catalog and item reference.\n\nIncludes IDs and additional, optional information related to the item.\n" + }, + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of unique back in stock requests for given `catalogReference`." + } + ], + "docs": { + "description": [ + "Maps each back in stock CatalogReference to the results (the number of unique occurrences)." + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestBackendEventMetadata", + "members": [ + { + "name": "entityId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event timestamp." + }, + { + "name": "id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event ID." + }, + { + "name": "triggeredByAnonymizeRequest", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestCatalogReference", + "members": [ + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the app providing the catalog. For items from Wix apps, the following values always apply:\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`" + }, + { + "name": "catalogItemId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:\n+ `{\"options\": {\"options\": {\"Size\": \"M\", \"Color\": \"Red\"}}}`\n+ `{\"options\": {\"variantId\": \"\"}}`" + } + ], + "docs": { + "description": [ + "Used for grouping line items and is sent on add to cart" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestCreateBackInStockNotificationRequestRequest", + "members": [ + { + "name": "itemDetails", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockItemDetails", + "displayName": "BackInStockItemDetails" + } + ], + "doc": "Item details to include in the notification when the item is back in stock." + }, + { + "name": "request", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequest", + "displayName": "BackInStockNotificationRequest" + } + ], + "doc": "Notification request information.\n\nIncludes details for the out of stock item and the email address\nrequesting to be notified when it's back in stock.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestCreateBackInStockNotificationRequestResponse", + "members": [ + { + "name": "request", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequest", + "displayName": "BackInStockNotificationRequest" + } + ], + "doc": "Created back in stock notification request." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestDeleteBackInStockNotificationRequestRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the notification request to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestDeleteBackInStockNotificationRequestResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestDomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestDomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestEmpty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestEntityDeletedEvent", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestGetBackInStockNotificationRequestRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the notification request to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestGetBackInStockNotificationRequestResponse", + "members": [ + { + "name": "request", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequest", + "displayName": "BackInStockNotificationRequest" + } + ], + "doc": "Retrieved back in stock notification request." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestGetBackInStockNotificationRequestsCountByCatalogReferencesRequest", + "members": [ + { + "name": "catalogReferences", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestCatalogReference", + "displayName": "CatalogReference" + } + ] + } + } + ], + "doc": "`catalogReference` items to retrieve the notification request for." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestGetBackInStockNotificationRequestsCountByCatalogReferencesResponse", + "members": [ + { + "name": "countsPerCatalogReference", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequestsCount", + "displayName": "BackInStockNotificationRequestsCount" + } + ] + } + } + ], + "doc": "Amount of back in stock notifications for each of the retrieved `catalogReference` items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestInvalidateCache", + "members": [ + { + "name": "app", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestApp", + "displayName": "App" + } + ], + "doc": "Invalidate by App" + }, + { + "name": "localDc", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Is local DS" + }, + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!" + }, + { + "name": "page", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestPage", + "displayName": "Page" + } + ], + "doc": "Invalidate by page id" + }, + { + "name": "reason", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "tell us why you're invalidating the cache. You don't need to add your app name" + }, + { + "name": "siteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!" + }, + { + "name": "uri", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestUri", + "displayName": "URI" + } + ], + "doc": "Invalidate by URI path" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfInvalidateCacheGetByOneOf", + "members": [ + "app", + "metaSiteId", + "page", + "siteId", + "uri" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestInvalidateCacheGetByOneOf", + "members": [ + { + "name": "app", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestApp", + "displayName": "App" + } + ], + "doc": "Invalidate by App" + }, + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!" + }, + { + "name": "page", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestPage", + "displayName": "Page" + } + ], + "doc": "Invalidate by page id" + }, + { + "name": "siteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!" + }, + { + "name": "uri", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestUri", + "displayName": "URI" + } + ], + "doc": "Invalidate by URI path" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestMarkAsNotificationSentRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the notification request to mark." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestMarkAsNotificationSentResponse", + "members": [ + { + "name": "request", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequest", + "displayName": "BackInStockNotificationRequest" + } + ], + "doc": "Marked back in stock notification request." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestPage", + "members": [ + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "the msid the page is on" + }, + { + "name": "pageId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Invalidate by Page ID" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestPlatformPaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestPlatformPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of items returned in this response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestCursors", + "displayName": "Cursors" + } + ], + "doc": "Cursors to navigate through result pages. Returned if cursor paging was used." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The offset which was requested. Returned if offset paging was used." + }, + { + "name": "total", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The total number of items that match the query. Returned if offset paging was used." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestPlatformQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestPlatformPaging", + "displayName": "PlatformPaging" + } + ], + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPlatformQueryPagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestPlatformQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestPlatformPaging", + "displayName": "PlatformPaging" + } + ], + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestQueryBackInStockNotificationRequestsRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestPlatformQuery", + "displayName": "PlatformQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestQueryBackInStockNotificationRequestsResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestPlatformPagingMetadata", + "displayName": "PlatformPagingMetadata" + } + ], + "doc": "Details on the paged set of results returned." + }, + { + "name": "requests", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockNotificationRequest", + "displayName": "BackInStockNotificationRequest" + } + ] + } + } + ], + "doc": "Retrieved back in stock requests." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestReportItemsBackInStockRequest", + "members": [ + { + "name": "catalogReference", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestCatalogReference", + "displayName": "CatalogReference" + } + ], + "doc": "`catalogReference` item to send notifications for.\n\nCannot be used with `requestIds`.\n" + }, + { + "name": "extraAutomationTemplateParameters", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Additional key-value pairs to pass to the back in stock notification template." + }, + { + "name": "itemDetails", + "type": [ + { + "referenceType": "wix-stores-v2.Events.ecomV1BackInStockNotificationRequestBackInStockItemDetails", + "displayName": "BackInStockItemDetails" + } + ], + "doc": "Item details to use in notifications.\n\n`itemDetails` may populate dynamic valyes in the notification template, as follows:\n+ `itemDetails.name` passes to the template as `item.name`\n+ `itemDetails.price` passes to the template as `item.price`\n+ `itemDetails.image.url` passes to the template as `item.image.url`\n\nUse `extraAutomationTemplateParameters` to pass additional dynamic values.\n" + }, + { + "name": "requestIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of requests to send notifications for.\n\nCannot be used with `catalogReference`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestReportItemsBackInStockResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestSorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ecomV1BackInStockNotificationRequestUri", + "members": [ + { + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "the msid the URI is on" + }, + { + "name": "uriPath", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAddProductMediaRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaDataForWrite", + "displayName": "MediaDataForWrite" + } + ] + } + } + ], + "doc": "Sources of media items already uploaded to the Wix site." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAddProductMediaResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAddProductMediaToChoicesRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaAssignmentToChoice", + "displayName": "MediaAssignmentToChoice" + } + ] + } + } + ], + "doc": "Product media items and the choices to add the media to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAddProductMediaToChoicesResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAddProductsToCollectionRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID." + }, + { + "name": "productIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the products to add to the collection, separated by commas." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAddProductsToCollectionResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAdditionalInfoSection", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product info section description" + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product info section title" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAdjustValue", + "members": [ + { + "name": "cost", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPropertyAdjustmentData", + "displayName": "PropertyAdjustmentData" + } + ], + "doc": "Adjust product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be adjusted per variant." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPropertyAdjustmentData", + "displayName": "PropertyAdjustmentData" + } + ], + "doc": "Adjust product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariants prices will be calculated according to the adjusted price.\nIf variant price is negative after the adjustment, the update will fail." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPropertyAdjustmentData", + "displayName": "PropertyAdjustmentData" + } + ], + "doc": "Adjust product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be adjusted per variant." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAdjustValueValueOneOf", + "members": [ + "cost", + "price", + "weight" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAdjustValueValueOneOf", + "members": [ + { + "name": "cost", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPropertyAdjustmentData", + "displayName": "PropertyAdjustmentData" + } + ], + "doc": "Adjust product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be adjusted per variant." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPropertyAdjustmentData", + "displayName": "PropertyAdjustmentData" + } + ], + "doc": "Adjust product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariants prices will be calculated according to the adjusted price.\nIf variant price is negative after the adjustment, the update will fail." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPropertyAdjustmentData", + "displayName": "PropertyAdjustmentData" + } + ], + "doc": "Adjust product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be adjusted per variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAggregateProductsRequest", + "members": [ + { + "name": "aggregation", + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "This is an object defining aggregation itself" + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter applied to original data" + }, + { + "name": "includeHiddenProducts", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether hidden products should be considered. Requires permissions to manage products." + }, + { + "name": "includeMerchantSpecificData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAggregateProductsResponse", + "members": [ + { + "name": "aggregates", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductAllowedProductsCountLimitExceededErrorData", + "members": [ + { + "name": "totalCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of products" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductApplicationError", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + }, + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data related to the error." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the error." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBackendEventMetadata", + "members": [ + { + "name": "entityId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event timestamp." + }, + { + "name": "id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event ID." + }, + { + "name": "triggeredByAnonymizeRequest", + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "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." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkActionMetadata", + "members": [ + { + "name": "totalFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that couldn't be processed." + }, + { + "name": "totalSuccesses", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that were successfully processed." + }, + { + "name": "undetailedFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkAdjustProductPropertiesByFilterSyncRequest", + "members": [ + { + "name": "adjust", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductAdjustValue", + "displayName": "AdjustValue" + } + ], + "doc": "Numerical property to adjust." + }, + { + "name": "filter", + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/stores/stores-catalog/filter-and-sort)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkAdjustProductPropertiesByFilterSyncResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBulkProductResult", + "displayName": "BulkProductResult" + } + ] + } + } + ], + "doc": "Items updated by bulk action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkAdjustProductPropertiesRequest", + "members": [ + { + "name": "adjust", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductAdjustValue", + "displayName": "AdjustValue" + } + ], + "doc": "Numerical property to adjust." + }, + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Product IDs." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkAdjustProductPropertiesResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBulkProductResult", + "displayName": "BulkProductResult" + } + ] + } + } + ], + "doc": "Bulk action results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkDeleteProductsRequest", + "members": [ + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the products to be deleted." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkDeleteProductsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkProductResult", + "members": [ + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductItemMetadata", + "displayName": "ItemMetadata" + } + ], + "doc": "Item metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkQueryCustomFieldsRequest", + "members": [ + { + "name": "names", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Requested field names." + }, + { + "name": "query", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductQuery", + "displayName": "Query" + } + ], + "doc": "Filter string." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkQueryCustomFieldsResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPagingMetadata", + "displayName": "PagingMetadata" + } + ], + "doc": "" + }, + { + "name": "productIdToCustomFields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCustomFieldsContainer", + "displayName": "CustomFieldsContainer" + } + ] + } + } + ], + "doc": "ProductId to Custom Fields Map packed in container." + }, + { + "name": "totalResults", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkRemoveCustomFieldsRequest", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Filter string." + }, + { + "name": "names", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Custom fields names." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkRemoveCustomFieldsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkSetCustomFieldsRequest", + "members": [ + { + "name": "customFields", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Custom field that will be added, if a custom field with same name already exists, the value of the custom field will be overridden." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Filter string." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkSetCustomFieldsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkUpdateProductsByFilterSyncRequest", + "members": [ + { + "name": "filter", + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/stores/stores-catalog/filter-and-sort)." + }, + { + "name": "set", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductSetValue", + "displayName": "SetValue" + } + ], + "doc": "The field to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkUpdateProductsByFilterSyncResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBulkProductResult", + "displayName": "BulkProductResult" + } + ] + } + } + ], + "doc": "Items updated by bulk action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkUpdateProductsRequest", + "members": [ + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Product IDs." + }, + { + "name": "set", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductSetValue", + "displayName": "SetValue" + } + ], + "doc": "Field to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductBulkUpdateProductsResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBulkActionMetadata", + "displayName": "BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBulkProductResult", + "displayName": "BulkProductResult" + } + ] + } + } + ], + "doc": "Bulk action results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductChoice", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Choice description." + }, + { + "name": "inStock", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Based on the customer’s choices, which (if any) variants that include the selected choices are in stock" + }, + { + "name": "media", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMedia", + "displayName": "Media" + } + ], + "doc": "Media items (images, videos) associated with this choice" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Choice value." + }, + { + "name": "visible", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Based on the customer’s choices, which (if any) variants that include the selected choices are visible" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCollection", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID (generated automatically by the catalog)." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection description." + }, + { + "name": "media", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMedia", + "displayName": "Media" + } + ], + "doc": "Media items (images, videos etc) associated with this collection. Read only." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection name." + }, + { + "name": "numberOfProducts", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of products in the collection. Read only." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection slug." + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCollectionChanged", + "members": [ + { + "name": "changedFields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of collection fields that were changed." + }, + { + "name": "collection_Id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID (generated automatically by the catalog)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCollectionCreated", + "members": [ + { + "name": "collection_Id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID (generated automatically by the catalog)." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMedia", + "displayName": "Media" + } + ], + "doc": "Media items (images, videos, etc.) associated with this collection." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection name." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection slug" + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Collection visible status" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCollectionDeleted", + "members": [ + { + "name": "collection_Id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the collection that was deleted." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCostAndProfitData", + "members": [ + { + "name": "formattedItemCost", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item cost formatted with currency symbol." + }, + { + "name": "formattedProfit", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Profit formatted with currency symbol." + }, + { + "name": "itemCost", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Item cost." + }, + { + "name": "profit", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Profit. Calculated by reducing `cost` from `discounted_price`." + }, + { + "name": "profitMargin", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Profit Margin. Calculated by dividing `profit` by `discounted_price`.\nThe result is rounded to 4 decimal places." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCreateCollectionRequest", + "members": [ + { + "name": "collection", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCollection", + "displayName": "Collection" + } + ], + "doc": "Collection info." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCreateCollectionResponse", + "members": [ + { + "name": "collection", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCollection", + "displayName": "Collection" + } + ], + "doc": "Collection." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCreateProductPlatformizedRequest", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "Product information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCreateProductPlatformizedResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCreateProductRequest", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "Product information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCreateProductResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of items to return in the results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor string pointing to the next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to the previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCustomFieldsContainer", + "members": [ + { + "name": "customFields", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductCustomTextField", + "members": [ + { + "name": "mandatory", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this text box is mandatory" + }, + { + "name": "maxLength", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Text box input max length" + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Text box title" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDeleteCollectionRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the collection to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDeleteCollectionResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDeleteProductOptionsRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the product with options to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDeleteProductOptionsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDeleteProductPlatformizedRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the product to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDeleteProductPlatformizedResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDeleteProductRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the product to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDeleteProductResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductDiscount", + "members": [ + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Discount type:\n+ `\"AMOUNT\"`\n+ `\"PERCENT\"`" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Discount value" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductFormattedPrice", + "members": [ + { + "name": "discountedPrice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned)" + }, + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product price formatted with the currency" + }, + { + "name": "pricePerUnit", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Price per unit" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetCollectionBySlugRequest", + "members": [ + { + "name": "slug", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Slug of the collection to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetCollectionBySlugResponse", + "members": [ + { + "name": "collection", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCollection", + "displayName": "Collection" + } + ], + "doc": "The requested collection." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetCollectionRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Requested collection ID." + }, + { + "name": "includeNumberOfProducts", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the `collection.numberOfProducts` field in the response.\nDefaults to `false`, in which case the value of `collection.numberOfProducts` will be `0`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetCollectionResponse", + "members": [ + { + "name": "collection", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCollection", + "displayName": "Collection" + } + ], + "doc": "The requested collection." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetProductPlatformizedRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Requested product ID." + }, + { + "name": "includeMerchantSpecificData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetProductPlatformizedResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "Requested product data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetProductRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Requested product ID." + }, + { + "name": "includeMerchantSpecificData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetProductResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "Requested product data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetProductsRequest", + "members": [ + { + "name": "ids", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Requested product IDs." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetProductsResponse", + "members": [ + { + "name": "products", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetStoreVariantRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen. For example, `{productId}-{variantId}`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductGetStoreVariantResponse", + "members": [ + { + "name": "variant", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductStoreVariant", + "displayName": "StoreVariant" + } + ], + "doc": "The requested store variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductItemMetadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + }, + { + "name": "error", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductApplicationError", + "displayName": "ApplicationError" + } + ], + "doc": "Details about the error in case of failure." + }, + { + "name": "originalIndex", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductKeyword", + "members": [ + { + "name": "isMain", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the keyword is the main focus keyword." + }, + { + "name": "term", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Keyword value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductMedia", + "members": [ + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaItem", + "displayName": "MediaItem" + } + ] + } + } + ], + "doc": "Media (images, videos etc) associated with this product." + }, + { + "name": "mainMedia", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Primary media (image, video etc) associated with this product." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductMediaAssignmentToChoice", + "members": [ + { + "name": "choice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Choice name." + }, + { + "name": "mediaIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Media IDs (available via the Query Product endpoint)." + }, + { + "name": "option", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductMediaDataForWrite", + "members": [ + { + "name": "choice", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductOptionAndChoice", + "displayName": "OptionAndChoice" + } + ], + "doc": "Assign this media item to a specific product choice.\nNote that you may set media items for choices under only one option (e.g., if Colors blue, green, and red have media items, Sizes S, M, and L can't have media items assigned to them).\nYou may clear existing media from choices with the [Remove Product Media From Choices](/catalog/products/remove-product-media-from-choices)." + }, + { + "name": "mediaId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media ID. For media items previously saved in Wix Media, the media ID is returned in the Query Product response." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media external URL (for new media items)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaDataForWriteMediaSourceOneOf", + "members": [ + "mediaId", + "url" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductMediaDataForWriteMediaSourceOneOf", + "members": [ + { + "name": "mediaId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media ID. For media items previously saved in Wix Media, the media ID is returned in the Query Product response." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media external URL (for new media items)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductMediaItem", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media ID (for example, `\"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg\"`)." + }, + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaItemUrlAndSize", + "displayName": "MediaItemUrlAndSize" + } + ], + "doc": "Image data (URL, size)." + }, + { + "name": "mediaType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media item type (image, video, etc.)." + }, + { + "name": "thumbnail", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaItemUrlAndSize", + "displayName": "MediaItemUrlAndSize" + } + ], + "doc": "Media item thumbnail details." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media item title." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaItemVideo", + "displayName": "MediaItemVideo" + } + ], + "doc": "Video data (URL, size)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaItemItemOneOf", + "members": [ + "image", + "video" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductMediaItemItemOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaItemUrlAndSize", + "displayName": "MediaItemUrlAndSize" + } + ], + "doc": "Image data (URL, size)." + }, + { + "name": "video", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaItemVideo", + "displayName": "MediaItemVideo" + } + ], + "doc": "Video data (URL, size)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductMediaItemUrlAndSize", + "members": [ + { + "name": "altText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Alt text. This text will be shown in case the image is not available." + }, + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media format (mp4, png, etc.)." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media item height." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media item URL." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Media item width." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductMediaItemVideo", + "members": [ + { + "name": "files", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaItemUrlAndSize", + "displayName": "MediaItemUrlAndSize" + } + ] + } + } + ], + "doc": "Data (URL, size) about each resolution for which this video is available." + }, + { + "name": "stillFrameMediaId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `\"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg\"`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductNumericPropertyRange", + "members": [ + { + "name": "maxValue", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum value." + }, + { + "name": "minValue", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minimum value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductOptionAndChoice", + "members": [ + { + "name": "choice", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Choice to add the media to." + }, + { + "name": "option", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option to add the media to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPageUrl", + "members": [ + { + "name": "base", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite)." + }, + { + "name": "path", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Path to the product page - e.g /product-page/a-product." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of items to load per page" + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the display (relevant for all pages after the first)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPagingMetadata", + "members": [ + { + "name": "items", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of items to load per page" + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the display (relevant for all pages after the first)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPagingWithBigLimit", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Amount of items to load per page" + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the display (relevant for all pages after the first)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPercentageData", + "members": [ + { + "name": "rate", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Percentage value, as a whole number (integer) between `-100` and `1000`.\n\nFor example:\n+ Pass `100` to increase value by 100% (multiply original value by 2).\n+ Pass `1000` to increase value by 1000% (multiply original value by 10).\n+ Pass `-50` to decrease value by 50% (original value is halved).\n" + }, + { + "name": "roundToInt", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "If `true`, result will be rounded to the nearest whole number.\nIf `false`, result will be rounded to 2 places after the decimal point." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPlatformMedia", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "video", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPlatformMediaMediaOneOf", + "members": [ + "image", + "video" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPlatformMediaMediaOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "video", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPlatformPaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPlatformPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of items returned in this response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCursors", + "displayName": "Cursors" + } + ], + "doc": "Cursors to navigate through result pages. Returned if cursor paging was used." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The offset which was requested. Returned if offset paging was used." + }, + { + "name": "total", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The total number of items that match the query. Returned if offset paging was used." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPlatformQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformPaging", + "displayName": "PlatformPaging" + } + ], + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPlatformQueryPagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPlatformQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformPaging", + "displayName": "PlatformPaging" + } + ], + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPreorderInfo", + "members": [ + { + "name": "enabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the item is available for preorder." + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of products that can be preordered after stock reaches zero." + }, + { + "name": "message", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A message the buyer will see when the item is out of stock and preorder is enabled." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPriceData", + "members": [ + { + "name": "currency", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product price currency" + }, + { + "name": "discountedPrice", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Discounted product price (if no discounted price is set, the product price is returned)" + }, + { + "name": "formatted", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductFormattedPrice", + "displayName": "FormattedPrice" + } + ], + "doc": "The product price and discounted price, formatted with the currency" + }, + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Product price" + }, + { + "name": "pricePerUnit", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Price per unit" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPricePerUnitData", + "members": [ + { + "name": "baseMeasurementUnit", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Base measurement unit" + }, + { + "name": "baseQuantity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Base quantity" + }, + { + "name": "totalMeasurementUnit", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Total measurement unit" + }, + { + "name": "totalQuantity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total quantity" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductProduct", + "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the product was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID (generated automatically by the catalog)." + }, + { + "name": "additionalInfoSections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductAdditionalInfoSection", + "displayName": "AdditionalInfoSection" + } + ] + } + } + ], + "doc": "Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.)." + }, + { + "name": "brand", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores)." + }, + { + "name": "collectionIds", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs)." + }, + { + "name": "convertedPriceData", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPriceData", + "displayName": "PriceData" + } + ], + "doc": "Price data, converted to the currency specified in request header." + }, + { + "name": "costAndProfitData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCostAndProfitData", + "displayName": "CostAndProfitData" + } + ], + "doc": "Cost and profit data." + }, + { + "name": "costRange", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductNumericPropertyRange", + "displayName": "NumericPropertyRange" + } + ], + "doc": "Product cost range. The minimum and maximum costs of all the variants." + }, + { + "name": "customTextFields", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCustomTextField", + "displayName": "CustomTextField" + } + ] + } + } + ], + "doc": "Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text)." + }, + { + "name": "discount", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductDiscount", + "displayName": "Discount" + } + ], + "doc": "Discount deducted from the product's original price." + }, + { + "name": "inventoryItemId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Inventory item ID - ID referencing the inventory system." + }, + { + "name": "lastUpdated", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the product was last updated." + }, + { + "name": "manageVariants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data." + }, + { + "name": "media", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMedia", + "displayName": "Media" + } + ], + "doc": "Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint)." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product name.\n\nMin: 1 character\nMax: 80 characters\n" + }, + { + "name": "numericId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product’s unique numeric ID (assigned in ascending order).\nPrimarily used for sorting and filtering when crawling all products." + }, + { + "name": "price", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPriceData", + "displayName": "PriceData" + } + ], + "doc": "Deprecated (use `priceData` instead)." + }, + { + "name": "priceData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPriceData", + "displayName": "PriceData" + } + ], + "doc": "Price data." + }, + { + "name": "pricePerUnitData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPricePerUnitData", + "displayName": "PricePerUnitData" + } + ], + "doc": "Price per unit data." + }, + { + "name": "priceRange", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductNumericPropertyRange", + "displayName": "NumericPropertyRange" + } + ], + "doc": "Product price range. The minimum and maximum prices of all the variants." + }, + { + "name": "productOptions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProductOption", + "displayName": "ProductOption" + } + ] + } + } + ], + "doc": "Options for this product." + }, + { + "name": "productPageUrl", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPageUrl", + "displayName": "PageUrl" + } + ], + "doc": "Product page URL for this product (generated automatically by the server)." + }, + { + "name": "productType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Currently, only creating physical products ( `\"productType\": \"physical\"` ) is supported via the API." + }, + { + "name": "ribbon", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ribbon. Used to highlight relevant information about a product. For example, \"Sale\", \"New Arrival\", \"Sold Out\"." + }, + { + "name": "ribbons", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductRibbon", + "displayName": "Ribbon" + } + ] + } + } + ], + "doc": "Deprecated (use `ribbon` instead)." + }, + { + "name": "seoData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductSeoSchema", + "displayName": "SeoSchema" + } + ], + "doc": "Custom SEO data for the product." + }, + { + "name": "sku", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A friendly URL name (generated automatically by the catalog when a product is created), can be updated." + }, + { + "name": "stock", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductStock", + "displayName": "Stock" + } + ], + "doc": "Product inventory status (in future this will be writable via Inventory API)." + }, + { + "name": "variants", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariant", + "displayName": "Variant" + } + ] + } + } + ], + "doc": "Product variants, will be provided if the the request was sent with the includeVariants flag." + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the product is visible to site visitors." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "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 will be set per variant, and this field will be empty." + }, + { + "name": "weightRange", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductNumericPropertyRange", + "displayName": "NumericPropertyRange" + } + ], + "doc": "Product weight range. The minimum and maximum weights of all the variants." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductProductChanged", + "members": [ + { + "name": "changedFields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of product fields that were changed." + }, + { + "name": "productId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductProductCreated", + "members": [ + { + "name": "brand", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product brand." + }, + { + "name": "costAndProfitData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCostAndProfitData", + "displayName": "CostAndProfitData" + } + ], + "doc": "Cost and profit data" + }, + { + "name": "entity", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMedia", + "displayName": "Media" + } + ], + "doc": "Media items (images, videos, etc.) associated with this product." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product name." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPriceData", + "displayName": "PriceData" + } + ], + "doc": "Product price." + }, + { + "name": "productId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID (generated automatically by the catalog)." + }, + { + "name": "productPageUrl", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPageUrl", + "displayName": "PageUrl" + } + ], + "doc": "Product page URL for this product (generated automatically by the server)." + }, + { + "name": "sku", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product stock keeping unit (SKU). If variants are being managed, this will be empty." + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the product is visible to customers." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductProductDeleted", + "members": [ + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + }, + { + "name": "productId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the product that was deleted." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductProductOption", + "members": [ + { + "name": "choices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductChoice", + "displayName": "Choice" + } + ] + } + } + ], + "doc": "Choices available for this option." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option name." + }, + { + "name": "optionType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option type - color or other(drop down)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductProductOptionsAvailabilityRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Requested product ID." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Array containing the selected options. For example, `[\"color\": \"Blue\", \"size\": \"Large\"]`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductProductOptionsAvailabilityResponse", + "members": [ + { + "name": "availableForPurchase", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether all the selected choices result in a visible, in-stock variant." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMedia", + "displayName": "Media" + } + ], + "doc": "Information about media items (images, videos, etc.) associated with this choice." + }, + { + "name": "productOptions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProductOption", + "displayName": "ProductOption" + } + ] + } + } + ], + "doc": "Options information (color, size, etc.) for this product, with the inventory and visibility fields updated based on the provided choices." + }, + { + "name": "selectedVariant", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariantData", + "displayName": "VariantData" + } + ], + "doc": "Variant information, given that all the choices were provided." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductProductUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPropertyAdjustmentData", + "members": [ + { + "name": "amount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Adjust by amount." + }, + { + "name": "percentage", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPercentageData", + "displayName": "PercentageData" + } + ], + "doc": "Adjust by percentage." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPropertyAdjustmentDataByOneOf", + "members": [ + "amount", + "percentage" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductPropertyAdjustmentDataByOneOf", + "members": [ + { + "name": "amount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Adjust by amount." + }, + { + "name": "percentage", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPercentageData", + "displayName": "PercentageData" + } + ], + "doc": "Adjust by percentage." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQuery", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Filter string" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPaging", + "displayName": "Paging" + } + ], + "doc": "" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort string" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryCollectionsPlatformizedRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformQuery", + "displayName": "PlatformQuery" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryCollectionsPlatformizedResponse", + "members": [ + { + "name": "collections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCollection", + "displayName": "Collection" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformPagingMetadata", + "displayName": "PlatformPagingMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryCollectionsRequest", + "members": [ + { + "name": "includeDescription", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Wether to include collection description in the response. When `false` is passed, `collection.description` will return null." + }, + { + "name": "includeNumberOfProducts", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether number of products should be included in the response." + }, + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductQuery", + "displayName": "Query" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryCollectionsResponse", + "members": [ + { + "name": "collections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCollection", + "displayName": "Collection" + } + ] + } + } + ], + "doc": "List of collections." + }, + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPagingMetadata", + "displayName": "PagingMetadata" + } + ], + "doc": "Details on the paged set of results returned." + }, + { + "name": "totalResults", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of results returned." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryCustomFieldsRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Requested product ID." + }, + { + "name": "names", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Requested field names." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryCustomFieldsResponse", + "members": [ + { + "name": "customFields", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryProductVariantsRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Requested product ID." + }, + { + "name": "choices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).\nYou may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (not relevant when passing variant IDs)." + }, + { + "name": "includeMerchantSpecificData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPaging", + "displayName": "Paging" + } + ], + "doc": "" + }, + { + "name": "variantIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of variant IDs (not relevant when passing choices)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryProductVariantsResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPagingMetadata", + "displayName": "PagingMetadata" + } + ], + "doc": "" + }, + { + "name": "totalResults", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "variants", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariant", + "displayName": "Variant" + } + ] + } + } + ], + "doc": "List of variants based on the specified filters and sorting." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryProductsPlatformizedRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformQuery", + "displayName": "PlatformQuery" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryProductsPlatformizedResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformPagingMetadata", + "displayName": "PlatformPagingMetadata" + } + ], + "doc": "" + }, + { + "name": "products", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryProductsRequest", + "members": [ + { + "name": "includeHiddenProducts", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." + }, + { + "name": "includeMerchantSpecificData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + }, + { + "name": "includeVariants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether variants should be included in the response." + }, + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductQuery", + "displayName": "Query" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryProductsResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPagingMetadata", + "displayName": "PagingMetadata" + } + ], + "doc": "" + }, + { + "name": "products", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "totalResults", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryProductsWithBigPageLimitRequest", + "members": [ + { + "name": "includeHiddenProducts", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." + }, + { + "name": "includeMerchantSpecificData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + }, + { + "name": "includeVariants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether variants should be included in the response." + }, + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductQueryWithBigPageLimit", + "displayName": "QueryWithBigPageLimit" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryStoreVariantsRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformQuery", + "displayName": "PlatformQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryStoreVariantsResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformPagingMetadata", + "displayName": "PlatformPagingMetadata" + } + ], + "doc": "Details on the paged set of results returned." + }, + { + "name": "variants", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductStoreVariant", + "displayName": "StoreVariant" + } + ] + } + } + ], + "doc": "List of variants based on the specified filters and sorting." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryStoreVariantsWithBigLimitRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductUnlimitedPlatformQuery", + "displayName": "UnlimitedPlatformQuery" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductQueryWithBigPageLimit", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Filter string" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPagingWithBigLimit", + "displayName": "PagingWithBigLimit" + } + ], + "doc": "" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort string" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductReCloneStoreRequest", + "members": [ + { + "name": "metasiteId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of value" + }, + { + "name": "originalMetasiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductReCloneStoreResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveCustomFieldsRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "names", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Custom fields to be removed (by name)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveCustomFieldsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductBrandRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductBrandResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductMediaFromChoicesRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID from whose choices to remove media items." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductMediaAssignmentToChoice", + "displayName": "MediaAssignmentToChoice" + } + ] + } + } + ], + "doc": "Media to remove from choices. If an empty array is passed, all media will be removed from all choices for the given product." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductMediaFromChoicesResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductMediaRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "mediaIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of media IDs to remove. Pass an empty array to delete all media items for the product." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductMediaResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductRibbonRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductRibbonResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductsFromCollectionRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID." + }, + { + "name": "productIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the products to remove from the collection." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRemoveProductsFromCollectionResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductResetAllVariantDataRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductResetAllVariantDataResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductRibbon", + "members": [ + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Ribbon text" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductSeoSchema", + "members": [ + { + "name": "settings", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductSettings", + "displayName": "Settings" + } + ], + "doc": "SEO general settings." + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductTag", + "displayName": "Tag" + } + ] + } + } + ], + "doc": "SEO tag information." + } + ], + "docs": { + "description": [ + "The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.\nThe search engines use this information for ranking purposes, or to display snippets in the search results.\nThis data will override other sources of tags (for example patterns) and will be included in the section of the HTML document, while not being displayed on the page itself." + ] + } + }, + { + "name": "storesCatalogV1ProductSetCustomFieldsRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "customFields", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Custom field that will be added, if a custom field with the same name already exists, the value of the custom field will be overridden." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductSetCustomFieldsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductSetValue", + "members": [ + { + "name": "brand", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Set product brand. Pass empty string to remove existing brand." + }, + { + "name": "cost", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Set product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be set per variant." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Set product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariant prices will be calculated according to the set product price.\nIf variant price is negative after setting new price, the update will fail." + }, + { + "name": "ribbon", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Set product ribbon. Pass empty string to remove existing ribbon." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Set product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be set per variant." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSetValueValueOneOf", + "members": [ + "brand", + "cost", + "price", + "ribbon", + "weight" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductSetValueValueOneOf", + "members": [ + { + "name": "brand", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Set product brand. Pass empty string to remove existing brand." + }, + { + "name": "cost", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Set product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be set per variant." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Set product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariant prices will be calculated according to the set product price.\nIf variant price is negative after setting new price, the update will fail." + }, + { + "name": "ribbon", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Set product ribbon. Pass empty string to remove existing ribbon." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Set product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be set per variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductSettings", + "members": [ + { + "name": "keywords", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductKeyword", + "displayName": "Keyword" + } + ] + } + } + ], + "doc": "User-selected keyword terms for a specific page." + }, + { + "name": "preventAutoRedirect", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.\n\nDefault: `false` (Auto Redirect is enabled.)\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductSorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductStock", + "members": [ + { + "name": "inStock", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the product is currently in stock (relevant only when tracking manually)\nDeprecated (use `inventoryStatus` instead)" + }, + { + "name": "inventoryStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The current status of the inventory\n+ `IN_STOCK` - In stock\n+ `OUT_OF_STOCK` - Not in stock\n+ `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock" + }, + { + "name": "quantity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Quantity currently left in inventory" + }, + { + "name": "trackInventory", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether inventory is being tracked" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductStoreVariant", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen: {productId}.{variantId}." + }, + { + "name": "choices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The selected options of this variant. For example, `{\"Color\": \"Blue\", \"Size\": \"Large\"}`." + }, + { + "name": "collectionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Collections that include this variant." + }, + { + "name": "managedVariant", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the variant is managed or represents a product." + }, + { + "name": "media", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPlatformMedia", + "displayName": "PlatformMedia" + } + ], + "doc": "Media items (images, videos) associated with this variant." + }, + { + "name": "preorderInfo", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPreorderInfo", + "displayName": "PreorderInfo" + } + ], + "doc": "Preorder information." + }, + { + "name": "productId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "productName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product name." + }, + { + "name": "sku", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant SKU (stock keeping unit)." + }, + { + "name": "stock", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariantStock", + "displayName": "VariantStock" + } + ], + "doc": "Variant inventory status." + }, + { + "name": "variantId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant ID." + }, + { + "name": "variantName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductTag", + "members": [ + { + "name": "children", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "SEO tag inner content. For example, ` inner content `." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the tag is a custom tag." + }, + { + "name": "disabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the tag is disabled." + }, + { + "name": "meta", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "SEO tag meta data. For example, `{height: 300, width: 240}`." + }, + { + "name": "props", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.\nFor example: `{'name': 'description', 'content': 'the description itself'}`." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "SEO tag type.\n\nSupported values: `title`, `meta`, `script`, `link`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUnlimitedPlatformCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor returned in last query response. Should not be provided on first page request" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of items to load.\nCursor token returned in the query response. To be used on the next query request, but not the first query request." + } + ], + "docs": { + "description": [ + "Don't use it unless you have to and know what you do. Prefer PlatformCursorPaging or wix.common.CursorPaging other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." + ] + } + }, + { + "name": "storesCatalogV1ProductUnlimitedPlatformPaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "Don't use it unless you have to and know what you do. Prefer PlatformPaging or wix.common.Paging other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." + ] + } + }, + { + "name": "storesCatalogV1ProductUnlimitedPlatformQuery", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductUnlimitedPlatformCursorPaging", + "displayName": "UnlimitedPlatformCursorPaging" + } + ], + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductUnlimitedPlatformPaging", + "displayName": "UnlimitedPlatformPaging" + } + ], + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfUnlimitedPlatformQueryPagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "Don't use it unless you have to and know what you do. Prefer PlatformQuery other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." + ] + } + }, + { + "name": "storesCatalogV1ProductUnlimitedPlatformQueryPagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductUnlimitedPlatformCursorPaging", + "displayName": "UnlimitedPlatformCursorPaging" + } + ], + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductUnlimitedPlatformPaging", + "displayName": "UnlimitedPlatformPaging" + } + ], + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUpdateCollectionRequest", + "members": [ + { + "name": "collection", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCollection", + "displayName": "Collection" + } + ], + "doc": "Collection info." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUpdateCollectionResponse", + "members": [ + { + "name": "collection", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCollection", + "displayName": "Collection" + } + ], + "doc": "Updated collection." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUpdateProductPlatformizedRequest", + "members": [ + { + "name": "product", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUpdateProductPlatformizedResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUpdateProductRequest", + "members": [ + { + "name": "product", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUpdateProductResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUpdateVariantsRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the product with managed variants." + }, + { + "name": "variants", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariantOverride", + "displayName": "VariantOverride" + } + ] + } + } + ], + "doc": "Variant info to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductUpdateVariantsResponse", + "members": [ + { + "name": "variants", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariant", + "displayName": "Variant" + } + ] + } + } + ], + "doc": "List of the product's variants." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductV1CreateProductPlatformizedRequest", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "Product information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductV1CreateProductPlatformizedResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductV1DeleteProductPlatformizedRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the product to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductV1DeleteProductPlatformizedResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductV1UpdateProductPlatformizedRequest", + "members": [ + { + "name": "product", + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductV1UpdateProductPlatformizedResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductProduct", + "displayName": "Product" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductVariant", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Requested Variant ID" + }, + { + "name": "choices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Specific choices within a selection, as option-choice key-value pairs" + }, + { + "name": "stock", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariantStock", + "displayName": "VariantStock" + } + ], + "doc": "Variant inventory status." + }, + { + "name": "variant", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariantDataWithNoStock", + "displayName": "VariantDataWithNoStock" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductVariantChanged", + "members": [ + { + "name": "changedFields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of variant fields that were changed." + }, + { + "name": "choices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "variantId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductVariantData", + "members": [ + { + "name": "convertedPriceData", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPriceData", + "displayName": "PriceData" + } + ], + "doc": "Variant price data converted to currency provided in header." + }, + { + "name": "inStock", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the product is currently in stock (relevant only when tracking manually)." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPriceData", + "displayName": "PriceData" + } + ], + "doc": "Variant price." + }, + { + "name": "quantity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Quantity currently in inventory (relevant only when tracking by inventory)." + }, + { + "name": "sku", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant SKU (stock keeping unit)." + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the variant is visible to customers." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Variant weight." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductVariantDataWithNoStock", + "members": [ + { + "name": "convertedPriceData", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPriceData", + "displayName": "PriceData" + } + ], + "doc": "Variant price data, converted to currency requested in header." + }, + { + "name": "costAndProfitData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductCostAndProfitData", + "displayName": "CostAndProfitData" + } + ], + "doc": "Cost and profit data." + }, + { + "name": "priceData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductPriceData", + "displayName": "PriceData" + } + ], + "doc": "Variant price." + }, + { + "name": "sku", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant SKU (stock keeping unit)." + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the variant is visible to customers." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Variant weight." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductVariantOverride", + "members": [ + { + "name": "choices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice). You may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (Not relevant when passing variant IDs)" + }, + { + "name": "cost", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Variant cost of goods" + }, + { + "name": "price", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Variant price" + }, + { + "name": "sku", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant SKU (stock keeping unit)" + }, + { + "name": "variantIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of variant IDs\n(Not relevant when passing choices)" + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the variant is visible to customers" + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Variant weight" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductVariantStock", + "members": [ + { + "name": "inStock", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the product is currently in stock (relevant only when tracking manually)." + }, + { + "name": "quantity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Quantity currently left in inventory." + }, + { + "name": "trackQuantity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether inventory is being tracked." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductVariantsChanged", + "members": [ + { + "name": "productId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "variants", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Events.storesCatalogV1ProductVariantChanged", + "displayName": "VariantChanged" + } + ] + } + } + ], + "doc": "List of variants that were changed." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesCatalogV1ProductVideoResolution", + "members": [ + { + "name": "format", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Video format for example, mp4, hls." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Video height." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Video URL." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Video width." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "storesV1SubscriptionOptionAllowOneTimePurchasesRequest", "members": [ { "name": "allowed", @@ -175,7 +8516,7 @@ } }, { - "name": "wixVeloEventsAllowOneTimePurchasesResponse", + "name": "storesV1SubscriptionOptionAllowOneTimePurchasesResponse", "members": [], "docs": { "description": [ @@ -184,7 +8525,7 @@ } }, { - "name": "wixVeloEventsAssignSubscriptionOptionsToProductRequest", + "name": "storesV1SubscriptionOptionAssignSubscriptionOptionsToProductRequest", "members": [ { "name": "assignedSubscriptionOptions", @@ -195,7 +8536,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionInProduct", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionInProduct", "displayName": "SubscriptionOptionInProduct" } ] @@ -221,7 +8562,7 @@ } }, { - "name": "wixVeloEventsAssignSubscriptionOptionsToProductResponse", + "name": "storesV1SubscriptionOptionAssignSubscriptionOptionsToProductResponse", "members": [], "docs": { "description": [ @@ -230,7 +8571,7 @@ } }, { - "name": "wixVeloEventsBackendEventMetadata", + "name": "storesV1SubscriptionOptionBackendEventMetadata", "members": [ { "name": "entityId", @@ -276,7 +8617,7 @@ } }, { - "name": "wixVeloEventsBulkCalculatePricesRequest", + "name": "storesV1SubscriptionOptionBulkCalculatePricesRequest", "members": [ { "name": "ids", @@ -321,7 +8662,7 @@ } }, { - "name": "wixVeloEventsBulkCalculatePricesRequestItem", + "name": "storesV1SubscriptionOptionBulkCalculatePricesRequestItem", "members": [ { "name": "_id", @@ -378,7 +8719,7 @@ } }, { - "name": "wixVeloEventsBulkCalculatePricesRequestV2", + "name": "storesV1SubscriptionOptionBulkCalculatePricesRequestV2", "members": [ { "name": "items", @@ -388,7 +8729,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsBulkCalculatePricesRequestItem", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionBulkCalculatePricesRequestItem", "displayName": "BulkCalculatePricesRequestItem" } ] @@ -405,7 +8746,7 @@ } }, { - "name": "wixVeloEventsBulkCalculatePricesResponse", + "name": "storesV1SubscriptionOptionBulkCalculatePricesResponse", "members": [ { "name": "calculatedPrices", @@ -419,7 +8760,7 @@ "nativeType": "string" }, { - "referenceType": "wix-stores-v2.Events.wixVeloEventsCalculatePricesResponse", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionCalculatePricesResponse", "displayName": "CalculatePricesResponse" } ] @@ -436,7 +8777,7 @@ } }, { - "name": "wixVeloEventsBulkCalculatePricesResponseItem", + "name": "storesV1SubscriptionOptionBulkCalculatePricesResponseItem", "members": [ { "name": "_id", @@ -460,7 +8801,7 @@ "nativeType": "string" }, { - "referenceType": "wix-stores-v2.Events.wixVeloEventsCalculatePricesResponse", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionCalculatePricesResponse", "displayName": "CalculatePricesResponse" } ] @@ -477,7 +8818,7 @@ } }, { - "name": "wixVeloEventsBulkCalculatePricesResponseV2", + "name": "storesV1SubscriptionOptionBulkCalculatePricesResponseV2", "members": [ { "name": "calculatedPricesPerProduct", @@ -488,7 +8829,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsBulkCalculatePricesResponseItem", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionBulkCalculatePricesResponseItem", "displayName": "BulkCalculatePricesResponseItem" } ] @@ -505,7 +8846,7 @@ } }, { - "name": "wixVeloEventsBulkCreateSubscriptionOptionsRequest", + "name": "storesV1SubscriptionOptionBulkCreateSubscriptionOptionsRequest", "members": [ { "name": "subscriptionOptions", @@ -515,7 +8856,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ] @@ -532,7 +8873,7 @@ } }, { - "name": "wixVeloEventsBulkCreateSubscriptionOptionsResponse", + "name": "storesV1SubscriptionOptionBulkCreateSubscriptionOptionsResponse", "members": [ { "name": "subscriptionOptions", @@ -543,7 +8884,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ] @@ -560,7 +8901,7 @@ } }, { - "name": "wixVeloEventsBulkDeleteSubscriptionOptionsRequest", + "name": "storesV1SubscriptionOptionBulkDeleteSubscriptionOptionsRequest", "members": [ { "name": "ids", @@ -586,7 +8927,7 @@ } }, { - "name": "wixVeloEventsBulkDeleteSubscriptionOptionsResponse", + "name": "storesV1SubscriptionOptionBulkDeleteSubscriptionOptionsResponse", "members": [], "docs": { "description": [ @@ -595,7 +8936,7 @@ } }, { - "name": "wixVeloEventsBulkUpdateSubscriptionOptionsRequest", + "name": "storesV1SubscriptionOptionBulkUpdateSubscriptionOptionsRequest", "members": [ { "name": "subscriptionOptions", @@ -605,7 +8946,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ] @@ -622,7 +8963,7 @@ } }, { - "name": "wixVeloEventsBulkUpdateSubscriptionOptionsResponse", + "name": "storesV1SubscriptionOptionBulkUpdateSubscriptionOptionsResponse", "members": [ { "name": "subscriptionOptions", @@ -633,7 +8974,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ] @@ -650,7 +8991,7 @@ } }, { - "name": "wixVeloEventsCalculatePricesRequest", + "name": "storesV1SubscriptionOptionCalculatePricesRequest", "members": [ { "name": "ids", @@ -686,7 +9027,7 @@ } }, { - "name": "wixVeloEventsCalculatePricesResponse", + "name": "storesV1SubscriptionOptionCalculatePricesResponse", "members": [ { "name": "originalPrice", @@ -707,7 +9048,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionPrices", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionPrices", "displayName": "SubscriptionOptionPrices" } ] @@ -724,13 +9065,13 @@ } }, { - "name": "wixVeloEventsCreateSubscriptionOptionRequest", + "name": "storesV1SubscriptionOptionCreateSubscriptionOptionRequest", "members": [ { "name": "subscriptionOption", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ], @@ -744,14 +9085,14 @@ } }, { - "name": "wixVeloEventsCreateSubscriptionOptionResponse", + "name": "storesV1SubscriptionOptionCreateSubscriptionOptionResponse", "members": [ { "name": "subscriptionOption", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ], @@ -765,7 +9106,7 @@ } }, { - "name": "wixVeloEventsDeleteSubscriptionOptionRequest", + "name": "storesV1SubscriptionOptionDeleteSubscriptionOptionRequest", "members": [ { "name": "_id", @@ -784,7 +9125,7 @@ } }, { - "name": "wixVeloEventsDeleteSubscriptionOptionResponse", + "name": "storesV1SubscriptionOptionDeleteSubscriptionOptionResponse", "members": [], "docs": { "description": [ @@ -793,7 +9134,7 @@ } }, { - "name": "wixVeloEventsDiscount", + "name": "storesV1SubscriptionOptionDiscount", "members": [ { "name": "type", @@ -823,7 +9164,7 @@ } }, { - "name": "wixVeloEventsGetOneTimePurchasesStatusRequest", + "name": "storesV1SubscriptionOptionGetOneTimePurchasesStatusRequest", "members": [ { "name": "productId", @@ -842,7 +9183,7 @@ } }, { - "name": "wixVeloEventsGetOneTimePurchasesStatusResponse", + "name": "storesV1SubscriptionOptionGetOneTimePurchasesStatusResponse", "members": [ { "name": "allowed", @@ -862,7 +9203,7 @@ } }, { - "name": "wixVeloEventsGetProductIdsForSubscriptionOptionRequest", + "name": "storesV1SubscriptionOptionGetProductIdsForSubscriptionOptionRequest", "members": [ { "name": "_id", @@ -888,7 +9229,7 @@ "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsPaging", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionPaging", "displayName": "Paging" } ], @@ -902,14 +9243,14 @@ } }, { - "name": "wixVeloEventsGetProductIdsForSubscriptionOptionResponse", + "name": "storesV1SubscriptionOptionGetProductIdsForSubscriptionOptionResponse", "members": [ { "name": "metadata", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsPagingMetadata", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionPagingMetadata", "displayName": "PagingMetadata" } ], @@ -950,7 +9291,7 @@ } }, { - "name": "wixVeloEventsGetSubscriptionOptionRequest", + "name": "storesV1SubscriptionOptionGetSubscriptionOptionRequest", "members": [ { "name": "_id", @@ -969,14 +9310,14 @@ } }, { - "name": "wixVeloEventsGetSubscriptionOptionResponse", + "name": "storesV1SubscriptionOptionGetSubscriptionOptionResponse", "members": [ { "name": "subscriptionOption", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ], @@ -990,7 +9331,7 @@ } }, { - "name": "wixVeloEventsGetSubscriptionOptionsForProductRequest", + "name": "storesV1SubscriptionOptionGetSubscriptionOptionsForProductRequest", "members": [ { "name": "includeHiddenSubscriptionOptions", @@ -1019,7 +9360,7 @@ } }, { - "name": "wixVeloEventsGetSubscriptionOptionsForProductResponse", + "name": "storesV1SubscriptionOptionGetSubscriptionOptionsForProductResponse", "members": [ { "name": "subscriptionOptions", @@ -1030,7 +9371,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionInProduct", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionInProduct", "displayName": "SubscriptionOptionInProduct" } ] @@ -1047,7 +9388,7 @@ } }, { - "name": "wixVeloEventsListSubscriptionOptionsRequest", + "name": "storesV1SubscriptionOptionListSubscriptionOptionsRequest", "members": [ { "name": "ids", @@ -1073,7 +9414,7 @@ } }, { - "name": "wixVeloEventsListSubscriptionOptionsResponse", + "name": "storesV1SubscriptionOptionListSubscriptionOptionsResponse", "members": [ { "name": "subscriptionOptions", @@ -1084,7 +9425,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ] @@ -1101,7 +9442,7 @@ } }, { - "name": "wixVeloEventsOneTimePurchasesChanged", + "name": "storesV1SubscriptionOptionOneTimePurchasesChanged", "members": [ { "name": "allowed", @@ -1131,7 +9472,7 @@ } }, { - "name": "wixVeloEventsPaging", + "name": "storesV1SubscriptionOptionPaging", "members": [ { "name": "limit", @@ -1161,7 +9502,7 @@ } }, { - "name": "wixVeloEventsPagingMetadata", + "name": "storesV1SubscriptionOptionPagingMetadata", "members": [ { "name": "items", @@ -1191,7 +9532,7 @@ } }, { - "name": "wixVeloEventsSubscriptionOption", + "name": "storesV1SubscriptionOptionSubscriptionOption", "members": [ { "name": "_id", @@ -1218,7 +9559,7 @@ "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsDiscount", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionDiscount", "displayName": "Discount" } ], @@ -1229,7 +9570,7 @@ "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionSettings", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionSettings", "displayName": "SubscriptionSettings" } ], @@ -1253,14 +9594,14 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionChanged", + "name": "storesV1SubscriptionOptionSubscriptionOptionChanged", "members": [ { "name": "subscriptionOption", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ], @@ -1274,14 +9615,14 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionCreated", + "name": "storesV1SubscriptionOptionSubscriptionOptionCreated", "members": [ { "name": "subscriptionOption", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ], @@ -1295,13 +9636,13 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionCreatedEvent", + "name": "storesV1SubscriptionOptionSubscriptionOptionCreatedEvent", "members": [ { "name": "entity", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionCreated", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionCreated", "displayName": "SubscriptionOptionCreated" } ], @@ -1311,7 +9652,7 @@ "name": "metadata", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsBackendEventMetadata", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionBackendEventMetadata", "displayName": "BackendEventMetadata" } ], @@ -1325,7 +9666,7 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionDeleted", + "name": "storesV1SubscriptionOptionSubscriptionOptionDeleted", "members": [ { "name": "_id", @@ -1345,13 +9686,13 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionDeletedEvent", + "name": "storesV1SubscriptionOptionSubscriptionOptionDeletedEvent", "members": [ { "name": "metadata", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsBackendEventMetadata", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionBackendEventMetadata", "displayName": "BackendEventMetadata" } ], @@ -1365,7 +9706,7 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionInProduct", + "name": "storesV1SubscriptionOptionSubscriptionOptionInProduct", "members": [ { "name": "_id", @@ -1394,7 +9735,7 @@ "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsDiscount", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionDiscount", "displayName": "Discount" } ], @@ -1416,7 +9757,7 @@ "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionSettings", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionSettings", "displayName": "SubscriptionSettings" } ], @@ -1441,7 +9782,7 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionPriceData", + "name": "storesV1SubscriptionOptionSubscriptionOptionPriceData", "members": [ { "name": "currency", @@ -1481,7 +9822,7 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionPrices", + "name": "storesV1SubscriptionOptionSubscriptionOptionPrices", "members": [ { "name": "_id", @@ -1498,7 +9839,7 @@ "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionPriceData", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionPriceData", "displayName": "SubscriptionOptionPriceData" } ], @@ -1509,7 +9850,7 @@ "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionPriceData", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionPriceData", "displayName": "SubscriptionOptionPriceData" } ], @@ -1523,13 +9864,13 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionUpdated", + "name": "storesV1SubscriptionOptionSubscriptionOptionUpdated", "members": [ { "name": "entity", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionChanged", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionChanged", "displayName": "SubscriptionOptionChanged" } ], @@ -1539,7 +9880,7 @@ "name": "metadata", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsBackendEventMetadata", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionBackendEventMetadata", "displayName": "BackendEventMetadata" } ], @@ -1553,7 +9894,7 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionWithVisibility", + "name": "storesV1SubscriptionOptionSubscriptionOptionWithVisibility", "members": [ { "name": "_id", @@ -1583,7 +9924,7 @@ } }, { - "name": "wixVeloEventsSubscriptionOptionsAssignmentChangedForProduct", + "name": "storesV1SubscriptionOptionSubscriptionOptionsAssignmentChangedForProduct", "members": [ { "name": "assignedSubscriptionOptions", @@ -1594,7 +9935,7 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOptionWithVisibility", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOptionWithVisibility", "displayName": "SubscriptionOptionWithVisibility" } ] @@ -1621,7 +9962,7 @@ } }, { - "name": "wixVeloEventsSubscriptionSettings", + "name": "storesV1SubscriptionOptionSubscriptionSettings", "members": [ { "name": "autoRenewal", @@ -1661,13 +10002,13 @@ } }, { - "name": "wixVeloEventsUpdateSubscriptionOptionRequest", + "name": "storesV1SubscriptionOptionUpdateSubscriptionOptionRequest", "members": [ { "name": "subscriptionOption", "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ], @@ -1681,14 +10022,14 @@ } }, { - "name": "wixVeloEventsUpdateSubscriptionOptionResponse", + "name": "storesV1SubscriptionOptionUpdateSubscriptionOptionResponse", "members": [ { "name": "subscriptionOption", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Events.wixVeloEventsSubscriptionOption", + "referenceType": "wix-stores-v2.Events.storesV1SubscriptionOptionSubscriptionOption", "displayName": "SubscriptionOption" } ], diff --git a/wix-stores-v2/wix-stores-v2/Inventory.service.json b/wix-stores-v2/wix-stores-v2/Inventory.service.json index 5271871787..38f57c1ff7 100644 --- a/wix-stores-v2/wix-stores-v2/Inventory.service.json +++ b/wix-stores-v2/wix-stores-v2/Inventory.service.json @@ -51,7 +51,7 @@ "docs": { "summary": "Subtracts a set number of items from inventory.", "description": [ - "The `decrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.\n\nThis function is not a universal function and runs only on the backend." + "The `decrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory." ], "examples": [ { @@ -197,7 +197,7 @@ "docs": { "summary": "Adds a set number of items to inventory.", "description": [ - "The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.\n\nThis function is not a universal function and runs only on the backend." + "The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory." ], "examples": [ { @@ -307,7 +307,7 @@ "referenceType": "wix-stores-v2.Inventory.UpdateInventoryVariantsInventoryItem" } ], - "doc": "Inventory item to update.\n", + "doc": "Inventory item to update.", "required": true } ], @@ -333,7 +333,7 @@ "docs": { "summary": "Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.", "description": [ - "The `updateInventoryVariants()` function is a Promise that resolves to the updated inventory variant data.\n\nThis function is not a universal function and runs only on the backend." + "The `updateInventoryVariants()` function is a Promise that resolves to the updated inventory variant data." ], "examples": [ { @@ -1205,21 +1205,14 @@ "name": "InventoryItemChanged", "members": [ { - "name": "fieldMask", + "name": "_updatedDate", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "Date" } ], - "doc": "Field mask of updated fields." + "doc": "Date and time the inventory item was last updated." }, { "name": "inventoryItemId", @@ -1412,6 +1405,16 @@ { "name": "InventoryVariantsChanged", "members": [ + { + "name": "_updatedDate", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the inventory variant item was last updated." + }, { "name": "inventoryItemId", "optional": true, diff --git a/wix-stores-v2/wix-stores-v2/Products.service.json b/wix-stores-v2/wix-stores-v2/Products.service.json index 4c42b1b7ed..6e0959984b 100644 --- a/wix-stores-v2/wix-stores-v2/Products.service.json +++ b/wix-stores-v2/wix-stores-v2/Products.service.json @@ -62,7 +62,7 @@ "docs": { "summary": "Adds media items to a specified product, either via URL or existing media ID.", "description": [ - "> **NOTE:** The URL is not validated and no event is triggered to indicate if the media was added successfully.\n\nThis function is not a universal function and runs only on the backend." + "> **NOTE:** The URL is not validated and no event is triggered to indicate if the media was added successfully." ], "examples": [ { @@ -144,7 +144,7 @@ "docs": { "summary": "Links media items that are already associated with a specific product to a choice within the same product.", "description": [ - "Media items can only be set for choices within one option at a time - e.g., if you set media items for some or all of the choices within the Colors option (blue, green, and red), you won't be able to also assign media items to choices within the Size option (S, M, and L).\n\nTo remove all existing media items, call the [Remove Product Media From Choices](https://dev.wix.com/api/rest/wix-stores/catalog/products/remove-product-media-from-choices) endpoint.\n\nThis function is not a universal function and runs only on the backend." + "Media items can only be set for choices within one option at a time - e.g., if you set media items for some or all of the choices within the Colors option (blue, green, and red), you won't be able to also assign media items to choices within the Size option (S, M, and L).\n\nTo remove all existing media items, call the [Remove Product Media From Choices](https://dev.wix.com/api/rest/wix-stores/catalog/products/remove-product-media-from-choices) endpoint." ], "examples": [ { @@ -181,7 +181,7 @@ "nativeType": "string" } ], - "doc": "Collection ID. Cannot be used to add products to All Products", + "doc": "Collection ID.", "required": true }, { @@ -223,9 +223,7 @@ }, "docs": { "summary": "Adds products to a specified collection.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "addProductsToCollection example", @@ -452,9 +450,7 @@ }, "docs": { "summary": "Creates a new collection.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "createCollection example", @@ -523,9 +519,7 @@ }, "docs": { "summary": "Creates a new product.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "createProduct example", @@ -556,6 +550,75 @@ "syntaxName": "createProduct", "isAdminMethod": true }, + { + "name": "createProductPlatformized", + "params": [ + { + "name": "product", + "type": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ], + "doc": "Product information.", + "required": true + } + ], + "requiredFields": [ + "product", + "product.costAndProfitData.itemCost", + "product.name", + "product.priceData", + "product.priceData.price" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Creates a new product.", + "description": [], + "examples": [ + { + "title": "createProductPlatformized example", + "body": [ + "import { products } from 'wix-stores.v2';", + " ", + " async function createProductPlatformized(product) {", + " try {", + " const result = await products.createProductPlatformized(product);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "createProductPlatformized", + "isAdminMethod": true + }, { "name": "deleteCollection", "params": [ @@ -566,7 +629,7 @@ "nativeType": "string" } ], - "doc": "ID of the collection to delete.\n", + "doc": "ID of the collection to delete.", "required": true } ], @@ -590,9 +653,7 @@ }, "docs": { "summary": "Deletes a collection.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "deleteCollection example", @@ -657,9 +718,7 @@ }, "docs": { "summary": "Deletes a product.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "deleteProduct example", @@ -719,9 +778,7 @@ }, "docs": { "summary": "Delete all options from a specific product. Only available when [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is disabled.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "deleteProductOptions example", @@ -747,6 +804,71 @@ "syntaxName": "deleteProductOptions", "isAdminMethod": true }, + { + "name": "deleteProductPlatformized", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the product to delete.", + "required": true + } + ], + "requiredFields": [ + "_id" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Deletes a product.", + "description": [], + "examples": [ + { + "title": "deleteProductPlatformized example", + "body": [ + "import { products } from 'wix-stores.v2';", + " ", + " async function deleteProductPlatformized(id) {", + " try {", + " const result = await products.deleteProductPlatformized(id);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "deleteProductPlatformized", + "isAdminMethod": true + }, { "name": "getCollectionBySlug", "params": [ @@ -910,7 +1032,7 @@ } } ], - "doc": "Set of key-value pairs. Array containing the selected options (e.g, color: Blue, size: Large).", + "doc": "Array containing the selected options. For example, `[\"color\": \"Blue\", \"size\": \"Large\"]`.", "required": true } ], @@ -960,6 +1082,80 @@ "isVeloEvent": false, "syntaxName": "getProductOptionsAvailability" }, + { + "name": "getProductPlatformized", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Requested product ID.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-stores-v2.Products.GetProductPlatformizedOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [ + "_id" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ] + } + } + ], + "doc": "Requested product data.\n" + }, + "docs": { + "summary": "Retrieves a product with the provided ID.", + "description": [], + "examples": [ + { + "title": "getProductPlatformized example", + "body": [ + "import { products } from 'wix-stores.v2';", + " ", + " async function getProductPlatformized(id, options) {", + " try {", + " const result = await products.getProductPlatformized(id, options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "getProductPlatformized" + }, { "name": "getStoreVariant", "params": [ @@ -1113,19 +1309,22 @@ "docs": { "summary": "Returns a list of up to 100 products, given the provided paging, sorting and filtering.", "description": [ + "", + "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", - "|`id`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Products.ProductsQueryBuilder#startsWith),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", + "|`_id`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Products.ProductsQueryBuilder#startsWith),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", "|`name`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Products.ProductsQueryBuilder#startsWith),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", "|`slug`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Products.ProductsQueryBuilder#startsWith),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", "|`productType`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", "|`description`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Products.ProductsQueryBuilder#startsWith)|", "|`sku`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`startsWith()`](wix-stores-v2.Products.ProductsQueryBuilder#startsWith),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", "|`price`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", + "|`priceData.price`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`lt()`](wix-stores-v2.Products.ProductsQueryBuilder#lt),[`le()`](wix-stores-v2.Products.ProductsQueryBuilder#le),[`gt()`](wix-stores-v2.Products.ProductsQueryBuilder#gt),[`ge()`](wix-stores-v2.Products.ProductsQueryBuilder#ge),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", "|`numericId`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`lt()`](wix-stores-v2.Products.ProductsQueryBuilder#lt),[`le()`](wix-stores-v2.Products.ProductsQueryBuilder#le),[`gt()`](wix-stores-v2.Products.ProductsQueryBuilder#gt),[`ge()`](wix-stores-v2.Products.ProductsQueryBuilder#ge),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", "|`collectionIds`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`hasAll()`](wix-stores-v2.Products.ProductsQueryBuilder#hasAll)|", - "|`lastUpdated`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`gt()`](wix-stores-v2.Products.ProductsQueryBuilder#gt),[`lt()`](wix-stores-v2.Products.ProductsQueryBuilder#lt),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", - "|`createdDate`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`gt()`](wix-stores-v2.Products.ProductsQueryBuilder#gt),[`lt()`](wix-stores-v2.Products.ProductsQueryBuilder#lt)|" + "|`lastUpdated`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`lt()`](wix-stores-v2.Products.ProductsQueryBuilder#lt),[`le()`](wix-stores-v2.Products.ProductsQueryBuilder#le),[`gt()`](wix-stores-v2.Products.ProductsQueryBuilder#gt),[`ge()`](wix-stores-v2.Products.ProductsQueryBuilder#ge),[`ascending()`](wix-stores-v2.Products.ProductsQueryBuilder#ascending),[`descending()`](wix-stores-v2.Products.ProductsQueryBuilder#descending)|", + "|`_createdDate`|[`eq()`](wix-stores-v2.Products.ProductsQueryBuilder#eq),[`ne()`](wix-stores-v2.Products.ProductsQueryBuilder#ne),[`exists()`](wix-stores-v2.Products.ProductsQueryBuilder#exists),[`in()`](wix-stores-v2.Products.ProductsQueryBuilder#in),[`hasSome()`](wix-stores-v2.Products.ProductsQueryBuilder#hasSome),[`lt()`](wix-stores-v2.Products.ProductsQueryBuilder#lt),[`le()`](wix-stores-v2.Products.ProductsQueryBuilder#le),[`gt()`](wix-stores-v2.Products.ProductsQueryBuilder#gt),[`ge()`](wix-stores-v2.Products.ProductsQueryBuilder#ge)|" ], "examples": [ { @@ -1247,9 +1446,7 @@ }, "docs": { "summary": "Deletes a product's brand.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "removeBrand example", @@ -1277,7 +1474,8 @@ "id": "maturity-beta" } ], - "syntaxName": "removeBrand" + "syntaxName": "removeBrand", + "isAdminMethod": true }, { "name": "removeProductMedia", @@ -1331,9 +1529,7 @@ }, "docs": { "summary": "Removes specified media items from a product.\nPass an empty array to remove all media items.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "removeProductMedia example", @@ -1411,9 +1607,7 @@ }, "docs": { "summary": "Removes media items from all or some of a product's choices.\n(Media items can only be set for choices within one option at a time - e.g., if you set media items for some or all of the choices within the Colors option (blue, green, and red), you won't be able to also assign media items to choices within the Size option (S, M, and L).)", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "removeProductMediaFromChoices example", @@ -1491,9 +1685,7 @@ }, "docs": { "summary": "Deletes products from a specified collection.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "removeProductsFromCollection example", @@ -1553,9 +1745,7 @@ }, "docs": { "summary": "Deletes a product's ribbon.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "removeRibbon example", @@ -1620,9 +1810,7 @@ }, "docs": { "summary": "Resets the data (such as the price and the weight) of all variants for a given product to their default values.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "resetAllProductVariantData example", @@ -1673,7 +1861,7 @@ "referenceType": "wix-stores-v2.Products.UpdateCollection" } ], - "doc": "Collection info to update.\n", + "doc": "Collection info to update.", "required": true } ], @@ -1698,9 +1886,7 @@ }, "docs": { "summary": "Updates specified properties of a collection. To add products to a collection, call the [addProductsToCollection](#addproductstocollection) function.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "updateCollection example", @@ -1776,9 +1962,7 @@ }, "docs": { "summary": "Updates specified fields in a product.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "description": [], "examples": [ { "title": "updateProduct example", @@ -1810,7 +1994,7 @@ "isAdminMethod": true }, { - "name": "updateProductVariants", + "name": "updateProductPlatformized", "params": [ { "name": "_id", @@ -1819,30 +2003,23 @@ "nativeType": "string" } ], - "doc": "ID of the product with managed variants.", + "doc": "Product ID (generated automatically by the catalog).", "required": true }, { - "name": "variants", + "name": "product", "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.VariantOverride" - } - ] - } + "referenceType": "wix-stores-v2.Products.UpdateProductPlatformizedProduct" } ], - "doc": "Variant info to update.", + "doc": "", "required": true } ], "requiredFields": [ "_id", - "variants" + "product" ], "ret": { "type": [ @@ -1851,7 +2028,7 @@ "nativeType": "Promise", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.UpdateVariantsResponse" + "referenceType": "wix-stores-v2.Products.Product" } ] } @@ -1860,19 +2037,17 @@ "doc": null }, "docs": { - "summary": "Updates variants of a specified product.", - "description": [ - "This function is not a universal function and runs only on the backend." - ], + "summary": "Updates specified fields in a product.", + "description": [], "examples": [ { - "title": "updateProductVariants example", + "title": "updateProductPlatformized example", "body": [ "import { products } from 'wix-stores.v2';", " ", - " async function updateProductVariants(id, variants) {", + " async function updateProductPlatformized(id, product) {", " try {", - " const result = await products.updateProductVariants(id, variants);", + " const result = await products.updateProductPlatformized(id, product);", "", " return result;", " } catch (error) {", @@ -1891,14 +2066,12 @@ "id": "maturity-beta" } ], - "syntaxName": "updateProductVariants", + "syntaxName": "updateProductPlatformized", "isAdminMethod": true - } - ], - "messages": [ + }, { - "name": "AddProductMediaRequest", - "members": [ + "name": "updateProductVariants", + "params": [ { "name": "_id", "type": [ @@ -1906,35 +2079,1738 @@ "nativeType": "string" } ], - "doc": "Product ID." + "doc": "ID of the product with managed variants.", + "required": true }, { - "name": "media", - "optional": true, + "name": "variants", "type": [ { "complexType": { "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.MediaDataForWrite" + "referenceType": "wix-stores-v2.Products.VariantOverride" } ] } } ], - "doc": "Sources of media items already uploaded to the Wix site." + "doc": "Variant info to update.", + "required": true } ], + "requiredFields": [ + "_id", + "variants" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.UpdateVariantsResponse" + } + ] + } + } + ], + "doc": null + }, "docs": { - "description": [ - "" + "summary": "Updates variants of a specified product.", + "description": [], + "examples": [ + { + "title": "updateProductVariants example", + "body": [ + "import { products } from 'wix-stores.v2';", + " ", + " async function updateProductVariants(id, variants) {", + " try {", + " const result = await products.updateProductVariants(id, variants);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } ] - } + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updateProductVariants", + "isAdminMethod": true }, { - "name": "AddProductMediaResponse", - "members": [], + "name": "writeProxyCreateProductPlatformized", + "params": [ + { + "name": "product", + "type": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ], + "doc": "Product information.", + "required": true + } + ], + "requiredFields": [ + "product", + "product.costAndProfitData.itemCost", + "product.name", + "product.priceData", + "product.priceData.price" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Creates a new product.", + "description": [], + "examples": [ + { + "title": "writeProxyCreateProductPlatformized example", + "body": [ + "import { products } from 'wix-stores.v2';", + " ", + " async function writeProxyCreateProductPlatformized(product) {", + " try {", + " const result = await products.writeProxyCreateProductPlatformized(product);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "writeProxyCreateProductPlatformized", + "isAdminMethod": true + }, + { + "name": "writeProxyDeleteProductPlatformized", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the product to delete.", + "required": true + } + ], + "requiredFields": [ + "_id" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Deletes a product.", + "description": [], + "examples": [ + { + "title": "writeProxyDeleteProductPlatformized example", + "body": [ + "import { products } from 'wix-stores.v2';", + " ", + " async function writeProxyDeleteProductPlatformized(id) {", + " try {", + " const result = await products.writeProxyDeleteProductPlatformized(id);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "writeProxyDeleteProductPlatformized", + "isAdminMethod": true + }, + { + "name": "writeProxyUpdateProductPlatformized", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID (generated automatically by the catalog).", + "required": true + }, + { + "name": "product", + "type": [ + { + "referenceType": "wix-stores-v2.Products.WriteProxyUpdateProductPlatformizedProduct" + } + ], + "doc": "", + "required": true + } + ], + "requiredFields": [ + "_id", + "product" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates specified fields in a product.", + "description": [], + "examples": [ + { + "title": "writeProxyUpdateProductPlatformized example", + "body": [ + "import { products } from 'wix-stores.v2';", + " ", + " async function writeProxyUpdateProductPlatformized(id, product) {", + " try {", + " const result = await products.writeProxyUpdateProductPlatformized(id, product);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "writeProxyUpdateProductPlatformized", + "isAdminMethod": true + } + ], + "messages": [ + { + "name": "AddProductMediaRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.MediaDataForWrite" + } + ] + } + } + ], + "doc": "Sources of media items already uploaded to the Wix site." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddProductMediaResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddProductMediaToChoicesRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.MediaAssignmentToChoice" + } + ] + } + } + ], + "doc": "Product media items and the choices to add the media to." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddProductMediaToChoicesResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddProductsToCollectionRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID." + }, + { + "name": "productIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the products to add to the collection, separated by commas." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddProductsToCollectionResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AdditionalInfoSection", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product info section description" + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product info section title" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AdjustValue", + "members": [ + { + "name": "cost", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + } + ], + "doc": "Adjust product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be adjusted per variant." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + } + ], + "doc": "Adjust product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariants prices will be calculated according to the adjusted price.\nIf variant price is negative after the adjustment, the update will fail." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + } + ], + "doc": "Adjust product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be adjusted per variant." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAdjustValueValueOneOf", + "members": [ + "cost", + "price", + "weight" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AdjustValueValueOneOf", + "members": [ + { + "name": "cost", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + } + ], + "doc": "Adjust product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be adjusted per variant." + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + } + ], + "doc": "Adjust product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariants prices will be calculated according to the adjusted price.\nIf variant price is negative after the adjustment, the update will fail." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + } + ], + "doc": "Adjust product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be adjusted per variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AggregateProductsOptions", + "members": [ + { + "name": "aggregation", + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "This is an object defining aggregation itself" + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter applied to original data" + }, + { + "name": "includeHiddenProducts", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether hidden products should be considered. Requires permissions to manage products." + }, + { + "name": "includeMerchantSpecificData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AggregateProductsRequest", + "members": [ + { + "name": "aggregation", + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "This is an object defining aggregation itself" + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter applied to original data" + }, + { + "name": "includeHiddenProducts", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether hidden products should be considered. Requires permissions to manage products." + }, + { + "name": "includeMerchantSpecificData", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AggregateProductsResponse", + "members": [ + { + "name": "aggregates", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AllowedProductsCountLimitExceededErrorData", + "members": [ + { + "name": "totalCount", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of products" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ApplicationError", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + }, + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data related to the error." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the error." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkActionMetadata", + "members": [ + { + "name": "totalFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that couldn't be processed." + }, + { + "name": "totalSuccesses", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that were successfully processed." + }, + { + "name": "undetailedFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkAdjustProductPropertiesByFilterSyncOptions", + "members": [ + { + "name": "adjust", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.AdjustValue" + } + ], + "doc": "Numerical property to adjust." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkAdjustProductPropertiesByFilterSyncRequest", + "members": [ + { + "name": "adjust", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.AdjustValue" + } + ], + "doc": "Numerical property to adjust." + }, + { + "name": "filter", + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/stores/stores-catalog/filter-and-sort)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkAdjustProductPropertiesByFilterSyncResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.BulkProductResult" + } + ] + } + } + ], + "doc": "Items updated by bulk action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkAdjustProductPropertiesRequest", + "members": [ + { + "name": "adjust", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.AdjustValue" + } + ], + "doc": "Numerical property to adjust." + }, + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Product IDs." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkAdjustProductPropertiesResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.BulkProductResult" + } + ] + } + } + ], + "doc": "Bulk action results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkDeleteProductsRequest", + "members": [ + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "IDs of the products to be deleted." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkDeleteProductsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkProductResult", + "members": [ + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.ItemMetadata" + } + ], + "doc": "Item metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkQueryCustomFieldsRequest", + "members": [ + { + "name": "names", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Requested field names." + }, + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.Query" + } + ], + "doc": "Filter string." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkQueryCustomFieldsResponse", + "members": [ + { + "name": "metadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PagingMetadata" + } + ], + "doc": "" + }, + { + "name": "productIdToCustomFields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-stores-v2.Products.CustomFieldsContainer" + } + ] + } + } + ], + "doc": "ProductId to Custom Fields Map packed in container." + }, + { + "name": "totalResults", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRemoveCustomFieldsOptions", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Filter string." + }, + { + "name": "names", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Custom fields names." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRemoveCustomFieldsRequest", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Filter string." + }, + { + "name": "names", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Custom fields names." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRemoveCustomFieldsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSetCustomFieldsOptions", + "members": [ + { + "name": "customFields", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Custom field that will be added, if a custom field with same name already exists, the value of the custom field will be overridden." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Filter string." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSetCustomFieldsRequest", + "members": [ + { + "name": "customFields", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Custom field that will be added, if a custom field with same name already exists, the value of the custom field will be overridden." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Filter string." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkSetCustomFieldsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateProductsByFilterSyncOptions", + "members": [ + { + "name": "set", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.SetValue" + } + ], + "doc": "The field to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateProductsByFilterSyncRequest", + "members": [ + { + "name": "filter", + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/stores/stores-catalog/filter-and-sort)." + }, + { + "name": "set", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.SetValue" + } + ], + "doc": "The field to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateProductsByFilterSyncResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.BulkProductResult" + } + ] + } + } + ], + "doc": "Items updated by bulk action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateProductsRequest", + "members": [ + { + "name": "ids", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Product IDs." + }, + { + "name": "set", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.SetValue" + } + ], + "doc": "Field to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateProductsResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.BulkActionMetadata" + } + ], + "doc": "Bulk action metadata." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.BulkProductResult" + } + ] + } + } + ], + "doc": "Bulk action results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Choice", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Choice description." + }, + { + "name": "inStock", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Based on the customer’s choices, which (if any) variants that include the selected choices are in stock" + }, + { + "name": "media", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.Media" + } + ], + "doc": "Media items (images, videos) associated with this choice" + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Choice value." + }, + { + "name": "visible", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Based on the customer’s choices, which (if any) variants that include the selected choices are visible" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Collection", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID (generated automatically by the catalog)." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection description." + }, + { + "name": "media", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.Media" + } + ], + "doc": "Media items (images, videos etc) associated with this collection. Read only." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection name." + }, + { + "name": "numberOfProducts", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of products in the collection. Read only." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection slug." + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CollectionChanged", + "members": [ + { + "name": "changedFields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of collection fields that were changed." + }, + { + "name": "collection_Id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID (generated automatically by the catalog)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CollectionCreated", + "members": [ + { + "name": "collection_Id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection ID (generated automatically by the catalog)." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.Media" + } + ], + "doc": "Media items (images, videos, etc.) associated with this collection." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection name." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Collection slug" + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Collection visible status" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CollectionDeleted", + "members": [ + { + "name": "collection_Id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the collection that was deleted." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CostAndProfitData", + "members": [ + { + "name": "formattedItemCost", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item cost formatted with currency symbol." + }, + { + "name": "formattedProfit", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Profit formatted with currency symbol." + }, + { + "name": "itemCost", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Item cost." + }, + { + "name": "profit", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Profit. Calculated by reducing `cost` from `discounted_price`." + }, + { + "name": "profitMargin", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Profit Margin. Calculated by dividing `profit` by `discounted_price`.\nThe result is rounded to 4 decimal places." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCollectionRequest", + "members": [ + { + "name": "collection", + "type": [ + { + "referenceType": "wix-stores-v2.Products.Collection" + } + ], + "doc": "Collection info." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCollectionResponse", + "members": [ + { + "name": "collection", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.Collection" + } + ], + "doc": "Collection." + } + ], "docs": { "description": [ "" @@ -1942,33 +3818,17 @@ } }, { - "name": "AddProductMediaToChoicesRequest", + "name": "CreateProductPlatformizedRequest", "members": [ { - "name": "_id", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Product ID." - }, - { - "name": "media", + "name": "product", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.MediaAssignmentToChoice" - } - ] - } + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Product media items and the choices to add the media to." + "doc": "Product information." } ], "docs": { @@ -1978,8 +3838,19 @@ } }, { - "name": "AddProductMediaToChoicesResponse", - "members": [], + "name": "CreateProductPlatformizedResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ], + "doc": "" + } + ], "docs": { "description": [ "" @@ -1987,33 +3858,17 @@ } }, { - "name": "AddProductsToCollectionRequest", + "name": "CreateProductRequest", "members": [ { - "name": "_id", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Collection ID. Cannot be used to add products to All Products" - }, - { - "name": "productIds", + "name": "product", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "IDs of the products to add to the collection, separated by commas." + "doc": "Product information." } ], "docs": { @@ -2023,8 +3878,19 @@ } }, { - "name": "AddProductsToCollectionResponse", - "members": [], + "name": "CreateProductResponse", + "members": [ + { + "name": "product", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ], + "doc": "" + } + ], "docs": { "description": [ "" @@ -2032,27 +3898,27 @@ } }, { - "name": "AdditionalInfoSection", + "name": "CursorPaging", "members": [ { - "name": "description", + "name": "cursor", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product info section description" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { - "name": "title", + "name": "limit", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Product info section title" + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -2062,51 +3928,29 @@ } }, { - "name": "AdjustValue", + "name": "Cursors", "members": [ { - "name": "cost", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" - } - ], - "doc": "Adjust product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be adjusted per variant." - }, - { - "name": "price", + "name": "next", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + "nativeType": "string" } ], - "doc": "Adjust product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariants prices will be calculated according to the adjusted price.\nIf variant price is negative after the adjustment, the update will fail." + "doc": "Cursor string pointing to the next page in the list of results." }, { - "name": "weight", + "name": "prev", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + "nativeType": "string" } ], - "doc": "Adjust product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be adjusted per variant." + "doc": "Cursor pointing to the previous page in the list of results." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfAdjustValueValueOneOf", - "members": [ - "cost", - "price", - "weight" - ] - } - ] - }, "docs": { "description": [ "" @@ -2114,37 +3958,17 @@ } }, { - "name": "AdjustValueValueOneOf", + "name": "CustomFieldsContainer", "members": [ { - "name": "cost", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" - } - ], - "doc": "Adjust product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be adjusted per variant." - }, - { - "name": "price", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" - } - ], - "doc": "Adjust product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariants prices will be calculated according to the adjusted price.\nIf variant price is negative after the adjustment, the update will fail." - }, - { - "name": "weight", + "name": "customFields", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PropertyAdjustmentData" + "nativeType": "Object" } ], - "doc": "Adjust product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be adjusted per variant." + "doc": "" } ], "docs": { @@ -2154,46 +3978,37 @@ } }, { - "name": "AggregateProductsOptions", + "name": "CustomTextField", "members": [ { - "name": "aggregation", - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "This is an object defining aggregation itself" - }, - { - "name": "filter", + "name": "mandatory", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "boolean" } ], - "doc": "Filter applied to original data" + "doc": "Whether this text box is mandatory" }, { - "name": "includeHiddenProducts", + "name": "maxLength", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether hidden products should be considered. Requires permissions to manage products." + "doc": "Text box input max length" }, { - "name": "includeMerchantSpecificData", + "name": "title", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + "doc": "Text box title" } ], "docs": { @@ -2203,46 +4018,44 @@ } }, { - "name": "AggregateProductsRequest", + "name": "DeleteCollectionRequest", "members": [ { - "name": "aggregation", - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "This is an object defining aggregation itself" - }, - { - "name": "filter", - "optional": true, - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "Filter applied to original data" - }, - { - "name": "includeHiddenProducts", - "optional": true, + "name": "_id", "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether hidden products should be considered. Requires permissions to manage products." - }, + "doc": "ID of the collection to delete." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteCollectionResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteProductOptionsRequest", + "members": [ { - "name": "includeMerchantSpecificData", - "optional": true, + "name": "_id", "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + "doc": "ID of the product with options to delete." } ], "docs": { @@ -2252,17 +4065,25 @@ } }, { - "name": "AggregateProductsResponse", + "name": "DeleteProductOptionsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteProductPlatformizedRequest", "members": [ { - "name": "aggregates", - "optional": true, + "name": "_id", "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of the product to delete." } ], "docs": { @@ -2272,17 +4093,25 @@ } }, { - "name": "AllowedProductsCountLimitExceededErrorData", + "name": "DeleteProductPlatformizedResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteProductRequest", "members": [ { - "name": "totalCount", - "optional": true, + "name": "_id", "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Total number of products" + "doc": "ID of the product to delete." } ], "docs": { @@ -2292,37 +4121,36 @@ } }, { - "name": "ApplicationError", + "name": "DeleteProductResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Discount", "members": [ { - "name": "code", + "name": "type", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Error code." - }, - { - "name": "data", - "optional": true, - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "Data related to the error." + "doc": "Discount type:\n+ `\"AMOUNT\"`\n+ `\"PERCENT\"`" }, { - "name": "description", + "name": "value", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Description of the error." + "doc": "Discount value" } ], "docs": { @@ -2332,37 +4160,38 @@ } }, { - "name": "BulkActionMetadata", + "name": "FormattedPrice", "members": [ { - "name": "totalFailures", + "name": "discountedPrice", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items that couldn't be processed." + "doc": "Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned)" }, { - "name": "totalSuccesses", + "name": "price", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items that were successfully processed." + "doc": "Product price formatted with the currency" }, { - "name": "undetailedFailures", + "name": "pricePerUnit", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of failures without details because detailed failure threshold was exceeded." + "doc": "Price per unit" } ], "docs": { @@ -2372,17 +4201,16 @@ } }, { - "name": "BulkAdjustProductPropertiesByFilterSyncOptions", + "name": "GetCollectionBySlugRequest", "members": [ { - "name": "adjust", - "optional": true, + "name": "slug", "type": [ { - "referenceType": "wix-stores-v2.Products.AdjustValue" + "nativeType": "string" } ], - "doc": "Numerical property to adjust." + "doc": "Slug of the collection to retrieve." } ], "docs": { @@ -2392,26 +4220,17 @@ } }, { - "name": "BulkAdjustProductPropertiesByFilterSyncRequest", + "name": "GetCollectionBySlugResponse", "members": [ { - "name": "adjust", + "name": "collection", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.AdjustValue" - } - ], - "doc": "Numerical property to adjust." - }, - { - "name": "filter", - "type": [ - { - "nativeType": "Object" + "referenceType": "wix-stores-v2.Products.Collection" } ], - "doc": "Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/stores/stores-catalog/filter-and-sort)." + "doc": "The requested collection." } ], "docs": { @@ -2421,34 +4240,17 @@ } }, { - "name": "BulkAdjustProductPropertiesByFilterSyncResponse", + "name": "GetCollectionOptions", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.BulkActionMetadata" - } - ], - "doc": "Bulk action metadata." - }, - { - "name": "results", + "name": "includeNumberOfProducts", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.BulkProductResult" - } - ] - } + "nativeType": "boolean" } ], - "doc": "Items updated by bulk action." + "doc": "Whether to return the `collection.numberOfProducts` field in the response.\nDefaults to `false`, in which case the value of `collection.numberOfProducts` will be `0`." } ], "docs": { @@ -2458,33 +4260,26 @@ } }, { - "name": "BulkAdjustProductPropertiesRequest", + "name": "GetCollectionRequest", "members": [ { - "name": "adjust", - "optional": true, + "name": "_id", "type": [ { - "referenceType": "wix-stores-v2.Products.AdjustValue" + "nativeType": "string" } ], - "doc": "Numerical property to adjust." + "doc": "Requested collection ID." }, { - "name": "ids", + "name": "includeNumberOfProducts", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "boolean" } ], - "doc": "Product IDs." + "doc": "Whether to return the `collection.numberOfProducts` field in the response.\nDefaults to `false`, in which case the value of `collection.numberOfProducts` will be `0`." } ], "docs": { @@ -2494,34 +4289,17 @@ } }, { - "name": "BulkAdjustProductPropertiesResponse", + "name": "GetCollectionResponse", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.BulkActionMetadata" - } - ], - "doc": "Bulk action metadata." - }, - { - "name": "results", + "name": "collection", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.BulkProductResult" - } - ] - } + "referenceType": "wix-stores-v2.Products.Collection" } ], - "doc": "Bulk action results." + "doc": "The requested collection." } ], "docs": { @@ -2531,23 +4309,17 @@ } }, { - "name": "BulkDeleteProductsRequest", + "name": "GetProductOptions", "members": [ { - "name": "ids", + "name": "includeMerchantSpecificData", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "boolean" } ], - "doc": "IDs of the products to be deleted." + "doc": "Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products." } ], "docs": { @@ -2557,26 +4329,17 @@ } }, { - "name": "BulkDeleteProductsResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkProductResult", + "name": "GetProductPlatformizedOptions", "members": [ { - "name": "itemMetadata", + "name": "includeMerchantSpecificData", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.ItemMetadata" + "nativeType": "boolean" } ], - "doc": "Item metadata." + "doc": "Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products." } ], "docs": { @@ -2586,34 +4349,26 @@ } }, { - "name": "BulkQueryCustomFieldsRequest", + "name": "GetProductPlatformizedRequest", "members": [ { - "name": "names", - "optional": true, + "name": "_id", "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Requested field names." + "doc": "Requested product ID." }, { - "name": "query", + "name": "includeMerchantSpecificData", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Query" + "nativeType": "boolean" } ], - "doc": "Filter string." + "doc": "Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products." } ], "docs": { @@ -2623,47 +4378,46 @@ } }, { - "name": "BulkQueryCustomFieldsResponse", + "name": "GetProductPlatformizedResponse", "members": [ { - "name": "metadata", + "name": "product", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PagingMetadata" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "" - }, + "doc": "Requested product data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetProductRequest", + "members": [ { - "name": "productIdToCustomFields", - "optional": true, + "name": "_id", "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "referenceType": "wix-stores-v2.Products.CustomFieldsContainer" - } - ] - } + "nativeType": "string" } ], - "doc": "ProductId to Custom Fields Map packed in container." + "doc": "Requested product ID." }, { - "name": "totalResults", + "name": "includeMerchantSpecificData", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products." } ], "docs": { @@ -2673,20 +4427,30 @@ } }, { - "name": "BulkRemoveCustomFieldsOptions", + "name": "GetProductResponse", "members": [ { - "name": "filter", + "name": "product", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Filter string." - }, + "doc": "Requested product data." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetProductsRequest", + "members": [ { - "name": "names", + "name": "ids", "optional": true, "type": [ { @@ -2700,7 +4464,7 @@ } } ], - "doc": "Custom fields names." + "doc": "Requested product IDs." } ], "docs": { @@ -2710,20 +4474,10 @@ } }, { - "name": "BulkRemoveCustomFieldsRequest", + "name": "GetProductsResponse", "members": [ { - "name": "filter", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Filter string." - }, - { - "name": "names", + "name": "products", "optional": true, "type": [ { @@ -2731,13 +4485,13 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Product" } ] } } ], - "doc": "Custom fields names." + "doc": "" } ], "docs": { @@ -2747,8 +4501,18 @@ } }, { - "name": "BulkRemoveCustomFieldsResponse", - "members": [], + "name": "GetStoreVariantRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen. For example, `{productId}-{variantId}`." + } + ], "docs": { "description": [ "" @@ -2756,27 +4520,17 @@ } }, { - "name": "BulkSetCustomFieldsOptions", + "name": "GetStoreVariantResponse", "members": [ { - "name": "customFields", - "optional": true, - "type": [ - { - "nativeType": "Object" - } - ], - "doc": "Custom field that will be added, if a custom field with same name already exists, the value of the custom field will be overridden." - }, - { - "name": "filter", + "name": "variant", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.StoreVariant" } ], - "doc": "Filter string." + "doc": "The requested store variant." } ], "docs": { @@ -2786,27 +4540,47 @@ } }, { - "name": "BulkSetCustomFieldsRequest", + "name": "ItemMetadata", "members": [ { - "name": "customFields", + "name": "_id", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "Custom field that will be added, if a custom field with same name already exists, the value of the custom field will be overridden." + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." }, { - "name": "filter", + "name": "error", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.ApplicationError" } ], - "doc": "Filter string." + "doc": "Details about the error in case of failure." + }, + { + "name": "originalIndex", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." } ], "docs": { @@ -2816,26 +4590,27 @@ } }, { - "name": "BulkSetCustomFieldsResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkUpdateProductsByFilterSyncOptions", + "name": "Keyword", "members": [ { - "name": "set", + "name": "isMain", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.SetValue" + "nativeType": "boolean" } ], - "doc": "The field to update." + "doc": "Whether the keyword is the main focus keyword." + }, + { + "name": "term", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Keyword value." } ], "docs": { @@ -2845,26 +4620,34 @@ } }, { - "name": "BulkUpdateProductsByFilterSyncRequest", + "name": "Media", "members": [ { - "name": "filter", + "name": "items", + "optional": true, "type": [ { - "nativeType": "Object" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.MediaItem" + } + ] + } } ], - "doc": "Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/stores/stores-catalog/filter-and-sort)." + "doc": "Media (images, videos etc) associated with this product." }, { - "name": "set", + "name": "mainMedia", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.SetValue" + "referenceType": "wix-stores-v2.Products.MediaItem" } ], - "doc": "The field to update." + "doc": "Primary media (image, video etc) associated with this product." } ], "docs": { @@ -2874,20 +4657,20 @@ } }, { - "name": "BulkUpdateProductsByFilterSyncResponse", + "name": "MediaAssignmentToChoice", "members": [ { - "name": "bulkActionMetadata", + "name": "choice", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.BulkActionMetadata" + "nativeType": "string" } ], - "doc": "Bulk action metadata." + "doc": "Choice name." }, { - "name": "results", + "name": "mediaIds", "optional": true, "type": [ { @@ -2895,13 +4678,23 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.BulkProductResult" + "nativeType": "string" } ] } } ], - "doc": "Items updated by bulk action." + "doc": "Media IDs (available via the Query Product endpoint)." + }, + { + "name": "option", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option name." } ], "docs": { @@ -2911,35 +4704,50 @@ } }, { - "name": "BulkUpdateProductsRequest", + "name": "MediaDataForWrite", "members": [ { - "name": "ids", + "name": "choice", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-stores-v2.Products.OptionAndChoice" } ], - "doc": "Product IDs." + "doc": "Assign this media item to a specific product choice. Note that you may set media items for choices under only one option (e.g., if Colors blue, green, and red have media items, Sizes S, M, and L can't have media items assigned to them). You may clear existing media from choices with the [Remove Product Media From Choices](#removeproductmediafromchoices)." }, { - "name": "set", + "name": "mediaId", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.SetValue" + "nativeType": "string" } ], - "doc": "Field to update." + "doc": "Media ID." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media external URL (for new media items)." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaDataForWriteMediaSourceOneOf", + "members": [ + "mediaId", + "url" + ] + } + ] + }, "docs": { "description": [ "" @@ -2947,34 +4755,27 @@ } }, { - "name": "BulkUpdateProductsResponse", + "name": "MediaDataForWriteMediaSourceOneOf", "members": [ { - "name": "bulkActionMetadata", + "name": "mediaId", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.BulkActionMetadata" + "nativeType": "string" } ], - "doc": "Bulk action metadata." + "doc": "Media ID." }, { - "name": "results", + "name": "url", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.BulkProductResult" - } - ] - } + "nativeType": "string" } ], - "doc": "Bulk action results." + "doc": "Media external URL (for new media items)." } ], "docs": { @@ -2984,62 +4785,80 @@ } }, { - "name": "Choice", + "name": "MediaItem", "members": [ { - "name": "description", + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Media ID (for example, `\"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg\"`)." + }, + { + "name": "image", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.MediaItemUrlAndSize" } ], - "doc": "Choice description." + "doc": "Image data (URL, size)." }, { - "name": "inStock", - "readOnly": true, + "name": "mediaType", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Based on the customer’s choices, which (if any) variants that include the selected choices are in stock" + "doc": "Media item type (image, video, etc.)." }, { - "name": "media", - "readOnly": true, + "name": "thumbnail", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Media" + "referenceType": "wix-stores-v2.Products.MediaItemUrlAndSize" } ], - "doc": "Media items (images, videos) associated with this choice" + "doc": "Media item thumbnail details." }, { - "name": "value", + "name": "title", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Choice value." + "doc": "Media item title." }, { - "name": "visible", - "readOnly": true, + "name": "video", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.MediaItemVideo" } ], - "doc": "Based on the customer’s choices, which (if any) variants that include the selected choices are visible" + "doc": "Video data (URL, size)." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaItemItemOneOf", + "members": [ + "image", + "video" + ] + } + ] + }, "docs": { "description": [ "" @@ -3047,80 +4866,87 @@ } }, { - "name": "Collection", + "name": "MediaItemItemOneOf", "members": [ { - "name": "_id", - "readOnly": true, + "name": "image", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.MediaItemUrlAndSize" } ], - "doc": "Collection ID (generated automatically by the catalog)." + "doc": "Image data (URL, size)." }, { - "name": "description", + "name": "video", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.MediaItemVideo" } ], - "doc": "Collection description." - }, + "doc": "Video data (URL, size)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MediaItemUrlAndSize", + "members": [ { - "name": "media", - "readOnly": true, + "name": "altText", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Media" + "nativeType": "string" } ], - "doc": "Media items (images, videos etc) associated with this collection. Read only." + "doc": "Alt text. This text will be shown in case the image is not available." }, { - "name": "name", + "name": "format", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Collection name." + "doc": "Media format (mp4, png, etc.)." }, { - "name": "numberOfProducts", - "readOnly": true, + "name": "height", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Number of products in the collection. Read only." + "doc": "Media item height." }, { - "name": "slug", + "name": "url", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Collection slug." + "doc": "Media item URL." }, { - "name": "visible", + "name": "width", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`." + "doc": "Media item width." } ], "docs": { @@ -3130,10 +4956,10 @@ } }, { - "name": "CollectionChanged", + "name": "MediaItemVideo", "members": [ { - "name": "changedFields", + "name": "files", "optional": true, "type": [ { @@ -3141,23 +4967,23 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.MediaItemUrlAndSize" } ] } } ], - "doc": "List of collection fields that were changed." + "doc": "Data (URL, size) about each resolution for which this video is available." }, { - "name": "collectionId", + "name": "stillFrameMediaId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Collection ID (generated automatically by the catalog)." + "doc": "ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `\"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg\"`." } ], "docs": { @@ -3167,57 +4993,57 @@ } }, { - "name": "CollectionCreated", + "name": "NumericPropertyRange", "members": [ { - "name": "collectionId", + "name": "maxValue", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Collection ID (generated automatically by the catalog)." + "doc": "Maximum value." }, { - "name": "media", + "name": "minValue", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Media" + "nativeType": "number" } ], - "doc": "Media items (images, videos, etc.) associated with this collection." - }, + "doc": "Minimum value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "OptionAndChoice", + "members": [ { - "name": "name", + "name": "choice", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Collection name." + "doc": "Choice to add the media to." }, { - "name": "slug", + "name": "option", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Collection slug" - }, - { - "name": "visible", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Collection visible status" + "doc": "Option to add the media to." } ], "docs": { @@ -3227,17 +5053,27 @@ } }, { - "name": "CollectionDeleted", + "name": "PageUrl", "members": [ { - "name": "collectionId", + "name": "base", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the collection that was deleted." + "doc": "Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite)." + }, + { + "name": "path", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Path to the product page - e.g /product-page/a-product." } ], "docs": { @@ -3247,61 +5083,57 @@ } }, { - "name": "CostAndProfitData", + "name": "Paging", "members": [ { - "name": "formattedItemCost", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Item cost formatted with currency symbol." - }, - { - "name": "formattedProfit", - "readOnly": true, + "name": "limit", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Profit formatted with currency symbol." + "doc": "Amount of items to load per page" }, { - "name": "itemCost", + "name": "offset", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Item cost." - }, + "doc": "Number of items to skip in the display (relevant for all pages after the first)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PagingMetadata", + "members": [ { - "name": "profit", - "readOnly": true, + "name": "items", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Profit. Calculated by reducing `cost` from `discounted_price`." + "doc": "Amount of items to load per page" }, { - "name": "profitMargin", - "readOnly": true, + "name": "offset", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Profit Margin. Calculated by dividing `profit` by `discounted_price`.\nThe result is rounded to 4 decimal places." + "doc": "Number of items to skip in the display (relevant for all pages after the first)" } ], "docs": { @@ -3311,36 +5143,27 @@ } }, { - "name": "CreateCollectionRequest", + "name": "PagingWithBigLimit", "members": [ { - "name": "collection", + "name": "limit", + "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Collection" + "nativeType": "number" } ], - "doc": "Collection info." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateCollectionResponse", - "members": [ + "doc": "Amount of items to load per page" + }, { - "name": "collection", + "name": "offset", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Collection" + "nativeType": "number" } ], - "doc": "Collection." + "doc": "Number of items to skip in the display (relevant for all pages after the first)" } ], "docs": { @@ -3350,37 +5173,27 @@ } }, { - "name": "CreateProductRequest", + "name": "PercentageData", "members": [ { - "name": "product", + "name": "rate", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Product" + "nativeType": "number" } ], - "doc": "Product information." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateProductResponse", - "members": [ + "doc": "Percentage value, as a whole number (integer) between `-100` and `1000`.\n\nFor example:\n+ Pass `100` to increase value by 100% (multiply original value by 2).\n+ Pass `1000` to increase value by 1000% (multiply original value by 10).\n+ Pass `-50` to decrease value by 50% (original value is halved).\n" + }, { - "name": "product", + "name": "roundToInt", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Product" + "nativeType": "boolean" } ], - "doc": "" + "doc": "If `true`, result will be rounded to the nearest whole number.\nIf `false`, result will be rounded to 2 places after the decimal point." } ], "docs": { @@ -3390,29 +5203,40 @@ } }, { - "name": "CursorPaging", + "name": "PlatformMedia", "members": [ { - "name": "cursor", + "name": "image", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "" }, { - "name": "limit", + "name": "video", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items to load." + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPlatformMediaMediaOneOf", + "members": [ + "image", + "video" + ] + } + ] + }, "docs": { "description": [ "" @@ -3420,27 +5244,27 @@ } }, { - "name": "Cursors", + "name": "PlatformMediaMediaOneOf", "members": [ { - "name": "next", + "name": "image", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "" }, { - "name": "prev", + "name": "video", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "" } ], "docs": { @@ -3450,17 +5274,27 @@ } }, { - "name": "CustomFieldsContainer", + "name": "PlatformPaging", "members": [ { - "name": "customFields", + "name": "limit", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "number" } ], - "doc": "" + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." } ], "docs": { @@ -3470,56 +5304,47 @@ } }, { - "name": "CustomTextField", + "name": "PlatformPagingMetadata", "members": [ { - "name": "mandatory", + "name": "count", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether this text box is mandatory" + "doc": "The number of items returned in this response." }, { - "name": "maxLength", + "name": "cursors", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.Cursors" } ], - "doc": "Text box input max length" + "doc": "Cursors to navigate through result pages. Returned if cursor paging was used." }, { - "name": "title", + "name": "offset", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Text box title" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteCollectionRequest", - "members": [ + "doc": "The offset which was requested. Returned if offset paging was used." + }, { - "name": "_id", + "name": "total", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of the collection to delete." + "doc": "The total number of items that match the query. Returned if offset paging was used." } ], "docs": { @@ -3529,94 +5354,67 @@ } }, { - "name": "DeleteCollectionResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteProductOptionsRequest", + "name": "PlatformQuery", "members": [ { - "name": "_id", + "name": "cursorPaging", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.CursorPaging" } ], - "doc": "ID of the product with options to delete." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteProductOptionsResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteProductRequest", - "members": [ + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + }, { - "name": "_id", + "name": "filter", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Object" } ], - "doc": "ID of the product to delete." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteProductResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Discount", - "members": [ + "doc": "Filter object." + }, { - "name": "type", + "name": "paging", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PlatformPaging" } ], - "doc": "Discount type:\n+ `\"AMOUNT\"`\n+ `\"PERCENT\"`" + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." }, { - "name": "value", + "name": "sort", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Sorting" + } + ] + } } ], - "doc": "Discount value" + "doc": "Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPlatformQueryPagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, "docs": { "description": [ "" @@ -3624,38 +5422,27 @@ } }, { - "name": "FormattedPrice", + "name": "PlatformQueryPagingMethodOneOf", "members": [ { - "name": "discountedPrice", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned)" - }, - { - "name": "price", + "name": "cursorPaging", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.CursorPaging" } ], - "doc": "Product price formatted with the currency" + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." }, { - "name": "pricePerUnit", - "readOnly": true, + "name": "paging", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PlatformPaging" } ], - "doc": "Price per unit" + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." } ], "docs": { @@ -3665,56 +5452,37 @@ } }, { - "name": "GetCollectionBySlugRequest", + "name": "PreorderInfo", "members": [ { - "name": "slug", + "name": "enabled", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Slug of the collection to retrieve." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetCollectionBySlugResponse", - "members": [ + "doc": "Whether the item is available for preorder." + }, { - "name": "collection", + "name": "limit", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Collection" + "nativeType": "number" } ], - "doc": "The requested collection." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetCollectionOptions", - "members": [ + "doc": "Number of products that can be preordered after stock reaches zero." + }, { - "name": "includeNumberOfProducts", + "name": "message", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether to return the `collection.numberOfProducts` field in the response.\nDefaults to `false`, in which case the value of `collection.numberOfProducts` will be `0`." + "doc": "A message the buyer will see when the item is out of stock and preorder is enabled." } ], "docs": { @@ -3724,66 +5492,61 @@ } }, { - "name": "GetCollectionRequest", + "name": "PriceData", "members": [ { - "name": "_id", + "name": "currency", + "readOnly": true, + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Requested collection ID." + "doc": "Product price currency" }, { - "name": "includeNumberOfProducts", + "name": "discountedPrice", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether to return the `collection.numberOfProducts` field in the response.\nDefaults to `false`, in which case the value of `collection.numberOfProducts` will be `0`." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetCollectionResponse", - "members": [ + "doc": "Discounted product price (if no discounted price is set, the product price is returned)" + }, { - "name": "collection", + "name": "formatted", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Collection" + "referenceType": "wix-stores-v2.Products.FormattedPrice" } ], - "doc": "The requested collection." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetProductOptions", - "members": [ + "doc": "The product price and discounted price, formatted with the currency" + }, { - "name": "includeMerchantSpecificData", + "name": "price", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products." + "doc": "Product price" + }, + { + "name": "pricePerUnit", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Price per unit" } ], "docs": { @@ -3793,73 +5556,47 @@ } }, { - "name": "GetProductRequest", + "name": "PricePerUnitData", "members": [ { - "name": "_id", + "name": "baseMeasurementUnit", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Requested product ID." + "doc": "Base measurement unit" }, { - "name": "includeMerchantSpecificData", + "name": "baseQuantity", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetProductResponse", - "members": [ + "doc": "Base quantity" + }, { - "name": "product", + "name": "totalMeasurementUnit", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Product" + "nativeType": "string" } ], - "doc": "Requested product data." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetProductsRequest", - "members": [ + "doc": "Total measurement unit" + }, { - "name": "ids", + "name": "totalQuantity", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "number" } ], - "doc": "Requested product IDs." + "doc": "Total quantity" } ], "docs": { @@ -3869,10 +5606,32 @@ } }, { - "name": "GetProductsResponse", + "name": "Product", "members": [ { - "name": "products", + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the product was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID (generated automatically by the catalog)." + }, + { + "name": "additionalInfoSections", "optional": true, "type": [ { @@ -3880,468 +5639,373 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.Product" + "referenceType": "wix-stores-v2.Products.AdditionalInfoSection" } ] } } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetStoreVariantRequest", - "members": [ + "doc": "Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.)." + }, { - "name": "_id", + "name": "brand", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen. For example, `{productId}-{variantId}`." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetStoreVariantResponse", - "members": [ + "doc": "Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores)." + }, { - "name": "variant", + "name": "collectionIds", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.StoreVariant" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "The requested store variant." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ItemMetadata", - "members": [ + "doc": "A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs)." + }, { - "name": "_id", + "name": "convertedPriceData", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + "doc": "Price data, converted to the currency specified in request header." }, { - "name": "error", + "name": "costAndProfitData", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.ApplicationError" + "referenceType": "wix-stores-v2.Products.CostAndProfitData" } ], - "doc": "Details about the error in case of failure." + "doc": "Cost and profit data." }, { - "name": "originalIndex", + "name": "costRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Index of the item within the request array. Allows for correlation between request and response items." + "doc": "Product cost range. The minimum and maximum costs of all the variants." }, { - "name": "success", + "name": "customTextFields", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.CustomTextField" + } + ] + } } ], - "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Keyword", - "members": [ + "doc": "Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI." + }, { - "name": "isMain", + "name": "description", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the keyword is the main focus keyword." + "doc": "Product description." }, { - "name": "term", + "name": "discount", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Discount" } ], - "doc": "Keyword value." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Media", - "members": [ + "doc": "Discount deducted from the product's original price." + }, { - "name": "items", + "name": "inventoryItemId", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.MediaItem" - } - ] - } + "nativeType": "string" } ], - "doc": "Media (images, videos etc) associated with this product." + "doc": "Inventory item ID - ID referencing the inventory system." }, { - "name": "mainMedia", + "name": "lastUpdated", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.MediaItem" + "nativeType": "Date" } ], - "doc": "Primary media (image, video etc) associated with this product." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "MediaAssignmentToChoice", - "members": [ + "doc": "Date and time the product was last updated." + }, { - "name": "choice", + "name": "manageVariants", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Choice name." + "doc": "Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to `true`, can be reset to `false` only if no variants exist. You cannot set `manageVariants` to `true` if more than 300 variants are defined." }, { - "name": "mediaIds", + "name": "media", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-stores-v2.Products.Media" } ], - "doc": "Media IDs (available via the Query Product endpoint)." + "doc": "Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint)." }, { - "name": "option", + "name": "name", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Option name." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "MediaDataForWrite", - "members": [ + "doc": "Product name.\n\nMin: 1 character\nMax: 80 characters\n" + }, { - "name": "choice", + "name": "numericId", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.OptionAndChoice" + "nativeType": "string" } ], - "doc": "Assign this media item to a specific product choice. Note that you may set media items for choices under only one option (e.g., if Colors blue, green, and red have media items, Sizes S, M, and L can't have media items assigned to them). You may clear existing media from choices with the [Remove Product Media From Choices](#removeproductmediafromchoices)." + "doc": "Product’s unique numeric ID (assigned in ascending order).\nPrimarily used for sorting and filtering when crawling all products." }, { - "name": "mediaId", + "name": "price", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Media ID." + "doc": "Deprecated (use `priceData` instead)." }, { - "name": "url", + "name": "priceData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Media external URL (for new media items)." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfMediaDataForWriteMediaSourceOneOf", - "members": [ - "mediaId", - "url" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "MediaDataForWriteMediaSourceOneOf", - "members": [ + "doc": "Price data." + }, { - "name": "mediaId", + "name": "pricePerUnitData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PricePerUnitData" } ], - "doc": "Media ID." + "doc": "Price per unit data." }, { - "name": "url", + "name": "priceRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Media external URL (for new media items)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "MediaItem", - "members": [ + "doc": "Product price range. The minimum and maximum prices of all the variants." + }, { - "name": "_id", + "name": "productOptions", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.ProductOption" + } + ] + } } ], - "doc": "Media ID (for example, `\"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg\"`)." + "doc": "Options for this product." }, { - "name": "image", + "name": "productPageUrl", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.MediaItemUrlAndSize" + "referenceType": "wix-stores-v2.Products.PageUrl" } ], - "doc": "Image data (URL, size)." + "doc": "Product page URL for this product (generated automatically by the server)." }, { - "name": "mediaType", + "name": "productType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Media item type (image, video, etc.)." + "doc": "Currently, only creating physical products ( `\"productType\": \"physical\"` ) is supported via the API." }, { - "name": "thumbnail", + "name": "ribbon", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.MediaItemUrlAndSize" + "nativeType": "string" } ], - "doc": "Media item thumbnail details." + "doc": "Product ribbon. Used to highlight relevant information about a product. For example, \"Sale\", \"New Arrival\", \"Sold Out\"." }, { - "name": "title", + "name": "ribbons", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Ribbon" + } + ] + } } ], - "doc": "Media item title." + "doc": "Deprecated (use `ribbon` instead)." }, { - "name": "video", + "name": "seoData", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.MediaItemVideo" + "referenceType": "wix-stores-v2.Products.SeoSchema" } ], - "doc": "Video data (URL, size)." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfMediaItemItemOneOf", - "members": [ - "image", - "video" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "MediaItemItemOneOf", - "members": [ + "doc": "Custom SEO data for the product." + }, { - "name": "image", + "name": "sku", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.MediaItemUrlAndSize" + "nativeType": "string" } ], - "doc": "Image data (URL, size)." + "doc": "Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty." }, { - "name": "video", + "name": "slug", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.MediaItemVideo" + "nativeType": "string" } ], - "doc": "Video data (URL, size)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "MediaItemUrlAndSize", - "members": [ + "doc": "A friendly URL name (generated automatically by the catalog when a product is created), can be updated." + }, { - "name": "altText", + "name": "stock", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Stock" } ], - "doc": "Alt text. This text will be shown in case the image is not available." + "doc": "Product inventory status (in future this will be writable via Inventory API)." }, { - "name": "format", + "name": "variants", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Variant" + } + ] + } } ], - "doc": "Media format (mp4, png, etc.)." + "doc": "Product variants, will be provided if the the request was sent with the includeVariants flag." }, { - "name": "height", + "name": "visible", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Media item height." + "doc": "Whether the product is visible to site visitors." }, { - "name": "url", + "name": "weight", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Media item URL." + "doc": "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 will be set per variant, and this field will be empty." }, { - "name": "width", + "name": "weightRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Media item width." + "doc": "Product weight range. The minimum and maximum weights of all the variants." } ], "docs": { @@ -4351,10 +6015,10 @@ } }, { - "name": "MediaItemVideo", + "name": "ProductChanged", "members": [ { - "name": "files", + "name": "changedFields", "optional": true, "type": [ { @@ -4362,23 +6026,23 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.MediaItemUrlAndSize" + "nativeType": "string" } ] } } ], - "doc": "Data (URL, size) about each resolution for which this video is available." + "doc": "List of product fields that were changed." }, { - "name": "stillFrameMediaId", + "name": "productId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `\"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg\"`." + "doc": "Product ID." } ], "docs": { @@ -4388,87 +6052,97 @@ } }, { - "name": "NumericPropertyRange", + "name": "ProductCreated", "members": [ { - "name": "maxValue", + "name": "brand", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Maximum value." + "doc": "Product brand." }, { - "name": "minValue", + "name": "costAndProfitData", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.CostAndProfitData" } ], - "doc": "Minimum value." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "OptionAndChoice", - "members": [ + "doc": "Cost and profit data" + }, { - "name": "choice", + "name": "media", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Media" } ], - "doc": "Choice to add the media to." + "doc": "Media items (images, videos, etc.) associated with this product." }, { - "name": "option", + "name": "name", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Option to add the media to." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "PageUrl", - "members": [ + "doc": "Product name." + }, { - "name": "base", + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PriceData" + } + ], + "doc": "Product price." + }, + { + "name": "productId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite)." + "doc": "Product ID (generated automatically by the catalog)." }, { - "name": "path", + "name": "productPageUrl", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PageUrl" + } + ], + "doc": "Product page URL for this product (generated automatically by the server)." + }, + { + "name": "sku", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Path to the product page - e.g /product-page/a-product." + "doc": "Product stock keeping unit (SKU). If variants are being managed, this will be empty." + }, + { + "name": "visible", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the product is visible to customers." } ], "docs": { @@ -4478,27 +6152,17 @@ } }, { - "name": "Paging", + "name": "ProductDeleted", "members": [ { - "name": "limit", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Amount of items to load per page" - }, - { - "name": "offset", + "name": "productId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items to skip in the display (relevant for all pages after the first)" + "doc": "ID of the product that was deleted." } ], "docs": { @@ -4508,27 +6172,45 @@ } }, { - "name": "PagingMetadata", + "name": "ProductOption", "members": [ { - "name": "items", + "name": "choices", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Choice" + } + ] + } } ], - "doc": "Amount of items to load per page" + "doc": "Choices available for this option." }, { - "name": "offset", + "name": "name", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items to skip in the display (relevant for all pages after the first)" + "doc": "Option name." + }, + { + "name": "optionType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Option type - color or other(drop down)" } ], "docs": { @@ -4538,27 +6220,36 @@ } }, { - "name": "PagingWithBigLimit", + "name": "ProductOptionsAvailabilityRequest", "members": [ { - "name": "limit", - "optional": true, + "name": "_id", "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Amount of items to load per page" + "doc": "Requested product ID." }, { - "name": "offset", + "name": "options", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } } ], - "doc": "Number of items to skip in the display (relevant for all pages after the first)" + "doc": "Array containing the selected options. For example, `[\"color\": \"Blue\", \"size\": \"Large\"]`." } ], "docs": { @@ -4568,70 +6259,56 @@ } }, { - "name": "PercentageData", + "name": "ProductOptionsAvailabilityResponse", "members": [ { - "name": "rate", + "name": "availableForPurchase", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Percentage value, as a whole number (integer) between `-100`` and `1000``.\nFor example, pass `100`` to increase value by 100% (multiply original value by 2)." + "doc": "Whether all the selected choices result in a visible, in-stock variant." }, { - "name": "roundToInt", + "name": "media", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.Media" } ], - "doc": "If `true`, result will be rounded to the nearest whole number.\nIf `false`, result will be rounded to 2 places after the decimal point." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "PlatformMedia", - "members": [ + "doc": "Information about media items (images, videos, etc.) associated with this choice." + }, { - "name": "image", + "name": "productOptions", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.ProductOption" + } + ] + } } ], - "doc": "" + "doc": "Options information (color, size, etc.) for this product, with the inventory and visibility fields updated based on the provided choices." }, { - "name": "video", + "name": "selectedVariant", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.VariantData" } ], - "doc": "" + "doc": "Variant information, given that all the choices were provided." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfPlatformMediaMediaOneOf", - "members": [ - "image", - "video" - ] - } - ] - }, "docs": { "description": [ "" @@ -4639,29 +6316,40 @@ } }, { - "name": "PlatformMediaMediaOneOf", + "name": "PropertyAdjustmentData", "members": [ { - "name": "image", + "name": "amount", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "" + "doc": "Adjust by amount." }, { - "name": "video", + "name": "percentage", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PercentageData" } ], - "doc": "" + "doc": "Adjust by percentage." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPropertyAdjustmentDataByOneOf", + "members": [ + "amount", + "percentage" + ] + } + ] + }, "docs": { "description": [ "" @@ -4669,27 +6357,27 @@ } }, { - "name": "PlatformPaging", + "name": "PropertyAdjustmentDataByOneOf", "members": [ { - "name": "limit", + "name": "amount", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Adjust by amount." }, { - "name": "offset", + "name": "percentage", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.PercentageData" } ], - "doc": "Number of items to skip in the current sort order." + "doc": "Adjust by percentage." } ], "docs": { @@ -4699,47 +6387,37 @@ } }, { - "name": "PlatformPagingMetadata", + "name": "Query", "members": [ { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "The number of items returned in this response." - }, - { - "name": "cursors", + "name": "filter", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Cursors" + "nativeType": "string" } ], - "doc": "Cursors to navigate through result pages. Returned if cursor paging was used." + "doc": "Filter string" }, { - "name": "offset", + "name": "paging", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.Paging" } ], - "doc": "The offset which was requested. Returned if offset paging was used." + "doc": "" }, { - "name": "total", + "name": "sort", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The total number of items that match the query. Returned if offset paging was used." + "doc": "Sort string" } ], "docs": { @@ -4749,67 +6427,59 @@ } }, { - "name": "PlatformQuery", + "name": "QueryCollectionsOptions", "members": [ { - "name": "cursorPaging", + "name": "includeDescription", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.CursorPaging" + "nativeType": "boolean" } ], - "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + "doc": "Wether to include collection description in the response. When `false` is passed, `collection.description` will return null." }, { - "name": "filter", + "name": "includeNumberOfProducts", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "boolean" } ], - "doc": "Filter object." + "doc": "Whether number of products should be included in the response." }, { - "name": "paging", + "name": "query", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformPaging" + "referenceType": "wix-stores-v2.Products.Query" } ], - "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." - }, + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryCollectionsPlatformizedRequest", + "members": [ { - "name": "sort", + "name": "query", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.Sorting" - } - ] - } + "referenceType": "wix-stores-v2.Products.PlatformQuery" } ], - "doc": "Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`." + "doc": "" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfPlatformQueryPagingMethodOneOf", - "members": [ - "cursorPaging", - "paging" - ] - } - ] - }, "docs": { "description": [ "" @@ -4817,27 +6487,34 @@ } }, { - "name": "PlatformQueryPagingMethodOneOf", + "name": "QueryCollectionsPlatformizedResponse", "members": [ { - "name": "cursorPaging", + "name": "collections", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.CursorPaging" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Collection" + } + ] + } } ], - "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." + "doc": "" }, { - "name": "paging", + "name": "metadata", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformPaging" + "referenceType": "wix-stores-v2.Products.PlatformPagingMetadata" } ], - "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." + "doc": "" } ], "docs": { @@ -4847,37 +6524,37 @@ } }, { - "name": "PreorderInfo", + "name": "QueryCollectionsRequest", "members": [ { - "name": "enabled", + "name": "includeDescription", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the item is available for preorder." + "doc": "Wether to include collection description in the response. When `false` is passed, `collection.description` will return null." }, { - "name": "limit", + "name": "includeNumberOfProducts", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Number of products that can be preordered after stock reaches zero." + "doc": "Whether number of products should be included in the response." }, { - "name": "message", + "name": "query", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Query" } ], - "doc": "A message the buyer will see when the item is out of stock and preorder is enabled." + "doc": "Query options." } ], "docs": { @@ -4887,61 +6564,44 @@ } }, { - "name": "PriceData", + "name": "QueryCollectionsResponse", "members": [ { - "name": "currency", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Product price currency" - }, - { - "name": "discountedPrice", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Discounted product price (if no discounted price is set, the product price is returned)" - }, - { - "name": "formatted", - "readOnly": true, + "name": "collections", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.FormattedPrice" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Collection" + } + ] + } } ], - "doc": "The product price and discounted price, formatted with the currency" + "doc": "List of collections." }, { - "name": "price", + "name": "metadata", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.PagingMetadata" } ], - "doc": "Product price" + "doc": "Details on the paged set of results returned." }, { - "name": "pricePerUnit", - "readOnly": true, + "name": "totalResults", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Price per unit" + "doc": "Total number of results returned." } ], "docs": { @@ -4951,47 +6611,54 @@ } }, { - "name": "PricePerUnitData", + "name": "QueryCustomFieldsRequest", "members": [ { - "name": "baseMeasurementUnit", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Base measurement unit" - }, - { - "name": "baseQuantity", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Base quantity" + "doc": "Requested product ID." }, { - "name": "totalMeasurementUnit", + "name": "names", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Total measurement unit" - }, + "doc": "Requested field names." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryCustomFieldsResponse", + "members": [ { - "name": "totalQuantity", + "name": "customFields", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Object" } ], - "doc": "Total quantity" + "doc": "" } ], "docs": { @@ -5001,32 +6668,50 @@ } }, { - "name": "Product", + "name": "QueryProductVariantsOptions", "members": [ { - "name": "_createdDate", - "readOnly": true, + "name": "choices", "optional": true, "type": [ { - "nativeType": "Date" + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } } ], - "doc": "Date and time the product was created." + "doc": "The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).\nYou may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (not relevant when passing variant IDs)." }, { - "name": "_id", - "readOnly": true, + "name": "includeMerchantSpecificData", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Product ID (generated automatically by the catalog)." + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." }, { - "name": "additionalInfoSections", + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.Paging" + } + ], + "doc": "" + }, + { + "name": "variantIds", "optional": true, "type": [ { @@ -5034,33 +6719,44 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.AdditionalInfoSection" + "nativeType": "string" } ] } } ], - "doc": "Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.)." - }, + "doc": "List of variant IDs (not relevant when passing choices)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductVariantsRequest", + "members": [ { - "name": "brand", - "optional": true, + "name": "_id", "type": [ { "nativeType": "string" } ], - "doc": "Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores)." + "doc": "Requested product ID." }, { - "name": "collectionIds", - "readOnly": true, + "name": "choices", "optional": true, "type": [ { "complexType": { - "nativeType": "Array", + "nativeType": "Record", "typeParams": [ + { + "nativeType": "string" + }, { "nativeType": "string" } @@ -5068,43 +6764,30 @@ } } ], - "doc": "A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs)." - }, - { - "name": "convertedPriceData", - "readOnly": true, - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.PriceData" - } - ], - "doc": "Price data, converted to the currency specified in request header." + "doc": "The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).\nYou may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (not relevant when passing variant IDs)." }, { - "name": "costAndProfitData", + "name": "includeMerchantSpecificData", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.CostAndProfitData" + "nativeType": "boolean" } ], - "doc": "Cost and profit data." + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." }, { - "name": "costRange", - "readOnly": true, + "name": "paging", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.NumericPropertyRange" + "referenceType": "wix-stores-v2.Products.Paging" } ], - "doc": "Product cost range. The minimum and maximum costs of all the variants." + "doc": "" }, { - "name": "customTextFields", - "readOnly": true, + "name": "variantIds", "optional": true, "type": [ { @@ -5112,191 +6795,240 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.CustomTextField" + "nativeType": "string" } ] } } ], - "doc": "Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI." - }, - { - "name": "description", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Product description." - }, + "doc": "List of variant IDs (not relevant when passing choices)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductVariantsResponse", + "members": [ { - "name": "discount", + "name": "metadata", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Discount" + "referenceType": "wix-stores-v2.Products.PagingMetadata" } ], - "doc": "Discount deducted from the product's original price." + "doc": "" }, { - "name": "inventoryItemId", - "readOnly": true, + "name": "totalResults", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Inventory item ID - ID referencing the inventory system." + "doc": "" }, { - "name": "lastUpdated", - "readOnly": true, + "name": "variants", "optional": true, "type": [ { - "nativeType": "Date" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Variant" + } + ] + } } ], - "doc": "Date and time the product was last updated." - }, + "doc": "List of variants based on the specified filters and sorting." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductsNonPlatformizedOptions", + "members": [ { - "name": "manageVariants", + "name": "includeHiddenProducts", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to `true`, can be reset to `false` only if no variants exist. You cannot set `manageVariants` to `true` if more than 300 variants are defined." + "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." }, { - "name": "media", - "readOnly": true, + "name": "includeMerchantSpecificData", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Media" + "nativeType": "boolean" } ], - "doc": "Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint)." + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." }, { - "name": "name", + "name": "includeVariants", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Product name.\n\nMin: 1 character\nMax: 80 characters\n" + "doc": "Whether variants should be included in the response." }, { - "name": "numericId", - "readOnly": true, + "name": "query", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Query" } ], - "doc": "Product’s unique numeric ID (assigned in ascending order).\nPrimarily used for sorting and filtering when crawling all products." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductsPlatformizedRequest", + "members": [ { - "name": "price", - "readOnly": true, + "name": "query", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" + "referenceType": "wix-stores-v2.Products.PlatformQuery" } ], - "doc": "Deprecated (use `priceData` instead)." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductsPlatformizedResponse", + "members": [ { - "name": "priceData", + "name": "metadata", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" + "referenceType": "wix-stores-v2.Products.PlatformPagingMetadata" } ], - "doc": "Price data." + "doc": "" }, { - "name": "pricePerUnitData", + "name": "products", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PricePerUnitData" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Product" + } + ] + } } ], - "doc": "Price per unit data." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductsRequest", + "members": [ { - "name": "priceRange", - "readOnly": true, + "name": "includeHiddenProducts", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.NumericPropertyRange" + "nativeType": "boolean" } ], - "doc": "Product price range. The minimum and maximum prices of all the variants." + "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." }, { - "name": "productOptions", + "name": "includeMerchantSpecificData", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.ProductOption" - } - ] - } + "nativeType": "boolean" } ], - "doc": "Options for this product." + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." }, { - "name": "productPageUrl", - "readOnly": true, + "name": "includeVariants", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PageUrl" + "nativeType": "boolean" } ], - "doc": "Product page URL for this product (generated automatically by the server)." + "doc": "Whether variants should be included in the response." }, { - "name": "productType", + "name": "query", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Query" } ], - "doc": "Currently, only creating physical products ( `\"productType\": \"physical\"` ) is supported via the API." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductsResponse", + "members": [ { - "name": "ribbon", + "name": "metadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PagingMetadata" } ], - "doc": "Product ribbon. Used to highlight relevant information about a product. For example, \"Sale\", \"New Arrival\", \"Sold Out\"." + "doc": "" }, { - "name": "ribbons", - "readOnly": true, + "name": "products", "optional": true, "type": [ { @@ -5304,103 +7036,123 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.Ribbon" + "referenceType": "wix-stores-v2.Products.Product" } ] } } ], - "doc": "Deprecated (use `ribbon` instead)." + "doc": "" }, { - "name": "seoData", + "name": "totalResults", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.SeoSchema" + "nativeType": "number" } ], - "doc": "Custom SEO data for the product." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductsWithBigPageLimitOptions", + "members": [ { - "name": "sku", + "name": "includeHiddenProducts", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty." + "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." }, { - "name": "slug", + "name": "includeMerchantSpecificData", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "A friendly URL name (generated automatically by the catalog when a product is created), can be updated." + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." }, { - "name": "stock", - "readOnly": true, + "name": "includeVariants", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Stock" + "nativeType": "boolean" } ], - "doc": "Product inventory status (in future this will be writable via Inventory API)." + "doc": "Whether variants should be included in the response." }, { - "name": "variants", - "readOnly": true, + "name": "query", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.Variant" - } - ] - } + "referenceType": "wix-stores-v2.Products.QueryWithBigPageLimit" } ], - "doc": "Product variants, will be provided if the the request was sent with the includeVariants flag." + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryProductsWithBigPageLimitRequest", + "members": [ + { + "name": "includeHiddenProducts", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." }, { - "name": "visible", + "name": "includeMerchantSpecificData", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the product is visible to site visitors." + "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." }, { - "name": "weight", + "name": "includeVariants", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "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 will be set per variant, and this field will be empty." + "doc": "Whether variants should be included in the response." }, { - "name": "weightRange", - "readOnly": true, + "name": "query", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.NumericPropertyRange" + "referenceType": "wix-stores-v2.Products.QueryWithBigPageLimit" } ], - "doc": "Product weight range. The minimum and maximum weights of all the variants." + "doc": "" } ], "docs": { @@ -5410,34 +7162,26 @@ } }, { - "name": "ProductChanged", + "name": "QueryStoreVariantsOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryStoreVariantsRequest", "members": [ { - "name": "changedFields", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "List of product fields that were changed." - }, - { - "name": "productId", + "name": "query", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PlatformQuery" } ], - "doc": "Product ID." + "doc": "Query options." } ], "docs": { @@ -5447,97 +7191,134 @@ } }, { - "name": "ProductCreated", + "name": "QueryStoreVariantsResponse", "members": [ { - "name": "brand", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Product brand." - }, - { - "name": "costAndProfitData", + "name": "metadata", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.CostAndProfitData" + "referenceType": "wix-stores-v2.Products.PlatformPagingMetadata" } ], - "doc": "Cost and profit data" + "doc": "Details on the paged set of results returned." }, { - "name": "media", + "name": "variants", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Media" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.StoreVariant" + } + ] + } } ], - "doc": "Media items (images, videos, etc.) associated with this product." - }, + "doc": "List of variants based on the specified filters and sorting." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryStoreVariantsWithBigLimitOptions", + "members": [ { - "name": "name", + "name": "query", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.UnlimitedPlatformQuery" } ], - "doc": "Product name." - }, + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryStoreVariantsWithBigLimitRequest", + "members": [ { - "name": "price", + "name": "query", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" + "referenceType": "wix-stores-v2.Products.UnlimitedPlatformQuery" } ], - "doc": "Product price." - }, + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryWithBigPageLimit", + "members": [ { - "name": "productId", + "name": "filter", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product ID (generated automatically by the catalog)." + "doc": "Filter string" }, { - "name": "productPageUrl", + "name": "paging", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PageUrl" + "referenceType": "wix-stores-v2.Products.PagingWithBigLimit" } ], - "doc": "Product page URL for this product (generated automatically by the server)." + "doc": "" }, { - "name": "sku", + "name": "sort", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product stock keeping unit (SKU). If variants are being managed, this will be empty." - }, + "doc": "Sort string" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ReCloneStoreOptions", + "members": [ { - "name": "visible", + "name": "originalMetasiteId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the product is visible to customers." + "doc": "" } ], "docs": { @@ -5547,17 +7328,26 @@ } }, { - "name": "ProductDeleted", + "name": "ReCloneStoreRequest", "members": [ { - "name": "productId", + "name": "metasiteId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of value" + }, + { + "name": "originalMetasiteId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the product that was deleted." + "doc": "" } ], "docs": { @@ -5567,10 +7357,19 @@ } }, { - "name": "ProductOption", + "name": "ReCloneStoreResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveCustomFieldsOptions", "members": [ { - "name": "choices", + "name": "names", "optional": true, "type": [ { @@ -5578,34 +7377,77 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.Choice" + "nativeType": "string" } ] } } ], - "doc": "Choices available for this option." - }, + "doc": "Custom fields to be removed (by name)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveCustomFieldsRequest", + "members": [ { - "name": "name", - "optional": true, + "name": "_id", "type": [ { "nativeType": "string" } ], - "doc": "Option name." + "doc": "Product ID." }, { - "name": "optionType", - "readOnly": true, + "name": "names", "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Custom fields to be removed (by name)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveCustomFieldsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveProductBrandRequest", + "members": [ + { + "name": "_id", "type": [ { "nativeType": "string" } ], - "doc": "Option type - color or other(drop down)" + "doc": "Product ID." } ], "docs": { @@ -5615,7 +7457,16 @@ } }, { - "name": "ProductOptionsAvailabilityRequest", + "name": "RemoveProductBrandResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveProductMediaFromChoicesRequest", "members": [ { "name": "_id", @@ -5624,27 +7475,24 @@ "nativeType": "string" } ], - "doc": "Requested product ID." + "doc": "Product ID from whose choices to remove media items." }, { - "name": "options", + "name": "media", "optional": true, "type": [ { "complexType": { - "nativeType": "Record", + "nativeType": "Array", "typeParams": [ { - "nativeType": "string" - }, - { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.MediaAssignmentToChoice" } ] } } ], - "doc": "Set of key-value pairs. Array containing the selected options (e.g, color: Blue, size: Large)." + "doc": "Media to remove from choices. If an empty array is passed, all media will be removed from all choices for the given product." } ], "docs": { @@ -5654,30 +7502,28 @@ } }, { - "name": "ProductOptionsAvailabilityResponse", + "name": "RemoveProductMediaFromChoicesResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveProductMediaRequest", "members": [ { - "name": "availableForPurchase", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether all the selected choices result in a visible, in-stock variant." - }, - { - "name": "media", - "optional": true, + "name": "_id", "type": [ { - "referenceType": "wix-stores-v2.Products.Media" + "nativeType": "string" } ], - "doc": "Information about media items (images, videos, etc.) associated with this choice." + "doc": "Product ID." }, { - "name": "productOptions", + "name": "mediaIds", "optional": true, "type": [ { @@ -5685,23 +7531,41 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.ProductOption" + "nativeType": "string" } ] } } ], - "doc": "Options information (color, size, etc.) for this product, with the inventory and visibility fields updated based on the provided choices." - }, + "doc": "List of media IDs to remove. Pass an empty array to delete all media items for the product." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveProductMediaResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveProductRibbonRequest", + "members": [ { - "name": "selectedVariant", - "optional": true, + "name": "_id", "type": [ { - "referenceType": "wix-stores-v2.Products.VariantData" + "nativeType": "string" } ], - "doc": "Variant information, given that all the choices were provided." + "doc": "Product ID." } ], "docs": { @@ -5711,40 +7575,52 @@ } }, { - "name": "PropertyAdjustmentData", + "name": "RemoveProductRibbonResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RemoveProductsFromCollectionRequest", "members": [ { - "name": "amount", - "optional": true, + "name": "_id", "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Adjust by amount." + "doc": "ID of the collection from which to remove products." }, { - "name": "percentage", - "optional": true, + "name": "productIds", "type": [ { - "referenceType": "wix-stores-v2.Products.PercentageData" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Adjust by percentage." + "doc": "IDs of the products to remove from the collection." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfPropertyAdjustmentDataByOneOf", - "members": [ - "amount", - "percentage" - ] - } + "docs": { + "description": [ + "" ] - }, + } + }, + { + "name": "RemoveProductsFromCollectionResponse", + "members": [], "docs": { "description": [ "" @@ -5752,27 +7628,16 @@ } }, { - "name": "PropertyAdjustmentDataByOneOf", + "name": "ResetAllVariantDataRequest", "members": [ { - "name": "amount", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Adjust by amount." - }, - { - "name": "percentage", - "optional": true, + "name": "_id", "type": [ { - "referenceType": "wix-stores-v2.Products.PercentageData" + "nativeType": "string" } ], - "doc": "Adjust by percentage." + "doc": "Product ID." } ], "docs": { @@ -5782,37 +7647,26 @@ } }, { - "name": "Query", + "name": "ResetAllVariantDataResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Ribbon", "members": [ { - "name": "filter", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Filter string" - }, - { - "name": "paging", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.Paging" - } - ], - "doc": "" - }, - { - "name": "sort", + "name": "text", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Sort string" + "doc": "Ribbon text" } ], "docs": { @@ -5822,57 +7676,54 @@ } }, { - "name": "QueryCollectionsOptions", + "name": "SeoSchema", "members": [ { - "name": "includeDescription", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Wether to include collection description in the response. When `false` is passed, `collection.description` will return null." - }, - { - "name": "includeNumberOfProducts", + "name": "settings", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.Settings" } ], - "doc": "Whether number of products should be included in the response." + "doc": "SEO general settings." }, { - "name": "query", + "name": "tags", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Query" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Tag" + } + ] + } } ], - "doc": "Query options." + "doc": "SEO tag information." } ], "docs": { "description": [ - "" + "The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.\nThe search engines use this information for ranking purposes, or to display snippets in the search results.\nThis data will override other sources of tags (for example patterns) and will be included in the section of the HTML document, while not being displayed on the page itself." ] } }, { - "name": "QueryCollectionsPlatformizedRequest", + "name": "SetCustomFieldsOptions", "members": [ { - "name": "query", + "name": "customFields", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformQuery" + "nativeType": "Object" } ], - "doc": "" + "doc": "Custom field that will be added, if a custom field with the same name already exists, the value of the custom field will be overridden." } ], "docs": { @@ -5882,34 +7733,26 @@ } }, { - "name": "QueryCollectionsPlatformizedResponse", + "name": "SetCustomFieldsRequest", "members": [ { - "name": "collections", - "optional": true, + "name": "_id", "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.Collection" - } - ] - } + "nativeType": "string" } ], - "doc": "" + "doc": "Product ID." }, { - "name": "metadata", + "name": "customFields", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformPagingMetadata" + "nativeType": "Object" } ], - "doc": "" + "doc": "Custom field that will be added, if a custom field with the same name already exists, the value of the custom field will be overridden." } ], "docs": { @@ -5919,39 +7762,82 @@ } }, { - "name": "QueryCollectionsRequest", + "name": "SetCustomFieldsResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SetValue", "members": [ { - "name": "includeDescription", + "name": "brand", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Wether to include collection description in the response. When `false` is passed, `collection.description` will return null." + "doc": "Set product brand. Pass empty string to remove existing brand." }, { - "name": "includeNumberOfProducts", + "name": "cost", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether number of products should be included in the response." + "doc": "Set product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be set per variant." }, { - "name": "query", + "name": "price", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Query" + "nativeType": "number" } ], - "doc": "Query options." + "doc": "Set product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariant prices will be calculated according to the set product price.\nIf variant price is negative after setting new price, the update will fail." + }, + { + "name": "ribbon", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Set product ribbon. Pass empty string to remove existing ribbon." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Set product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be set per variant." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSetValueValueOneOf", + "members": [ + "brand", + "cost", + "price", + "ribbon", + "weight" + ] + } + ] + }, "docs": { "description": [ "" @@ -5959,44 +7845,57 @@ } }, { - "name": "QueryCollectionsResponse", + "name": "SetValueValueOneOf", "members": [ { - "name": "collections", + "name": "brand", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.Collection" - } - ] - } + "nativeType": "string" } ], - "doc": "List of collections." + "doc": "Set product brand. Pass empty string to remove existing brand." }, { - "name": "metadata", + "name": "cost", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PagingMetadata" + "nativeType": "number" } ], - "doc": "Details on the paged set of results returned." + "doc": "Set product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be set per variant." }, { - "name": "totalResults", + "name": "price", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Total number of results returned." + "doc": "Set product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariant prices will be calculated according to the set product price.\nIf variant price is negative after setting new price, the update will fail." + }, + { + "name": "ribbon", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Set product ribbon. Pass empty string to remove existing ribbon." + }, + { + "name": "weight", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Set product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be set per variant." } ], "docs": { @@ -6006,20 +7905,10 @@ } }, { - "name": "QueryCustomFieldsRequest", + "name": "Settings", "members": [ { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Requested product ID." - }, - { - "name": "names", + "name": "keywords", "optional": true, "type": [ { @@ -6027,13 +7916,23 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Keyword" } ] } } ], - "doc": "Requested field names." + "doc": "User-selected keyword terms for a specific page." + }, + { + "name": "preventAutoRedirect", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.\n\nDefault: `false` (Auto Redirect is enabled.)\n" } ], "docs": { @@ -6043,17 +7942,27 @@ } }, { - "name": "QueryCustomFieldsResponse", + "name": "Sorting", "members": [ { - "name": "customFields", + "name": "fieldName", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "" + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." } ], "docs": { @@ -6063,64 +7972,47 @@ } }, { - "name": "QueryProductVariantsOptions", + "name": "Stock", "members": [ { - "name": "choices", + "name": "inStock", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "string" - } - ] - } + "nativeType": "boolean" } ], - "doc": "The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).\nYou may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (not relevant when passing variant IDs)." + "doc": "Whether the product is currently in stock (relevant only when tracking manually)\nDeprecated (use `inventoryStatus` instead)" }, { - "name": "includeMerchantSpecificData", + "name": "inventoryStatus", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + "doc": "The current status of the inventory\n+ `IN_STOCK` - In stock\n+ `OUT_OF_STOCK` - Not in stock\n+ `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock" }, { - "name": "paging", + "name": "quantity", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Paging" + "nativeType": "number" } ], - "doc": "" + "doc": "Quantity currently left in inventory" }, { - "name": "variantIds", + "name": "trackInventory", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "boolean" } ], - "doc": "List of variant IDs (not relevant when passing choices)." + "doc": "Whether inventory is being tracked" } ], "docs": { @@ -6130,16 +8022,17 @@ } }, { - "name": "QueryProductVariantsRequest", + "name": "StoreVariant", "members": [ { "name": "_id", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Requested product ID." + "doc": "Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen: {productId}.{variantId}." }, { "name": "choices", @@ -6159,91 +8052,115 @@ } } ], - "doc": "The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).\nYou may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (not relevant when passing variant IDs)." + "doc": "The selected options of this variant. For example, `{\"Color\": \"Blue\", \"Size\": \"Large\"}`." }, { - "name": "includeMerchantSpecificData", + "name": "collectionIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Collections that include this variant." + }, + { + "name": "managedVariant", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + "doc": "Whether the variant is managed or represents a product." }, { - "name": "paging", + "name": "media", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Paging" + "referenceType": "wix-stores-v2.Products.PlatformMedia" } ], - "doc": "" + "doc": "Media items (images, videos) associated with this variant." }, { - "name": "variantIds", + "name": "preorderInfo", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-stores-v2.Products.PreorderInfo" } ], - "doc": "List of variant IDs (not relevant when passing choices)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryProductVariantsResponse", - "members": [ + "doc": "Preorder information." + }, { - "name": "metadata", + "name": "productId", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PagingMetadata" + "nativeType": "string" } ], - "doc": "" + "doc": "Product ID." }, { - "name": "totalResults", + "name": "productName", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "" + "doc": "Product name." }, { - "name": "variants", + "name": "sku", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.Variant" - } - ] - } + "nativeType": "string" } ], - "doc": "List of variants based on the specified filters and sorting." + "doc": "Variant SKU (stock keeping unit)." + }, + { + "name": "stock", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.VariantStock" + } + ], + "doc": "Variant inventory status." + }, + { + "name": "variantId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant ID." + }, + { + "name": "variantName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Variant name." } ], "docs": { @@ -6253,47 +8170,67 @@ } }, { - "name": "QueryProductsNonPlatformizedOptions", + "name": "Tag", "members": [ { - "name": "includeHiddenProducts", + "name": "children", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." + "doc": "SEO tag inner content. For example, ` inner content `." }, { - "name": "includeMerchantSpecificData", + "name": "custom", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + "doc": "Whether the tag is a custom tag." }, { - "name": "includeVariants", + "name": "disabled", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether variants should be included in the response." + "doc": "Whether the tag is disabled." }, { - "name": "query", + "name": "meta", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Query" + "nativeType": "Object" } ], - "doc": "" + "doc": "SEO tag meta data. For example, `{height: 300, width: 240}`." + }, + { + "name": "props", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.\nFor example: `{'name': 'description', 'content': 'the description itself'}`." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "SEO tag type.\n\nSupported values: `title`, `meta`, `script`, `link`.\n" } ], "docs": { @@ -6303,151 +8240,155 @@ } }, { - "name": "QueryProductsPlatformizedRequest", + "name": "UnlimitedPlatformCursorPaging", "members": [ { - "name": "query", + "name": "cursor", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformQuery" + "nativeType": "string" } ], - "doc": "" + "doc": "Cursor returned in last query response. Should not be provided on first page request" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of items to load.\nCursor token returned in the query response. To be used on the next query request, but not the first query request." } ], "docs": { "description": [ - "" + "Don't use it unless you have to and know what you do. Prefer PlatformCursorPaging or wix.common.CursorPaging other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." ] } }, { - "name": "QueryProductsPlatformizedResponse", + "name": "UnlimitedPlatformPaging", "members": [ { - "name": "metadata", + "name": "limit", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformPagingMetadata" + "nativeType": "number" } ], - "doc": "" + "doc": "Number of items to load." }, { - "name": "products", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.Product" - } - ] - } + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" } ], - "doc": "" + "doc": "Number of items to skip in the current sort order." } ], "docs": { "description": [ - "" + "Don't use it unless you have to and know what you do. Prefer PlatformPaging or wix.common.Paging other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." ] } }, { - "name": "QueryProductsRequest", + "name": "UnlimitedPlatformQuery", "members": [ { - "name": "includeHiddenProducts", + "name": "cursorPaging", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.UnlimitedPlatformCursorPaging" } ], - "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." }, { - "name": "includeMerchantSpecificData", + "name": "filter", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "Object" } ], - "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + "doc": "Filter object." }, { - "name": "includeVariants", + "name": "paging", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.UnlimitedPlatformPaging" } ], - "doc": "Whether variants should be included in the response." + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." }, { - "name": "query", + "name": "sort", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Query" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Sorting" + } + ] + } } ], - "doc": "" + "doc": "Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfUnlimitedPlatformQueryPagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, "docs": { "description": [ - "" + "Don't use it unless you have to and know what you do. Prefer PlatformQuery other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." ] } }, { - "name": "QueryProductsResponse", + "name": "UnlimitedPlatformQueryPagingMethodOneOf", "members": [ { - "name": "metadata", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.PagingMetadata" - } - ], - "doc": "" - }, - { - "name": "products", + "name": "cursorPaging", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.Product" - } - ] - } + "referenceType": "wix-stores-v2.Products.UnlimitedPlatformCursorPaging" } ], - "doc": "" + "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." }, { - "name": "totalResults", + "name": "paging", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.UnlimitedPlatformPaging" } ], - "doc": "" + "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." } ], "docs": { @@ -6457,97 +8398,80 @@ } }, { - "name": "QueryProductsWithBigPageLimitOptions", + "name": "UpdateCollection", "members": [ { - "name": "includeHiddenProducts", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." + "doc": "Collection ID (generated automatically by the catalog)." }, { - "name": "includeMerchantSpecificData", + "name": "description", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + "doc": "Collection description." }, { - "name": "includeVariants", + "name": "media", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.Media" } ], - "doc": "Whether variants should be included in the response." + "doc": "Media items (images, videos etc) associated with this collection. Read only." }, { - "name": "query", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.QueryWithBigPageLimit" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryProductsWithBigPageLimitRequest", - "members": [ - { - "name": "includeHiddenProducts", + "name": "name", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether hidden products should be included in the response. Requires permissions to manage products." + "doc": "Collection name." }, { - "name": "includeMerchantSpecificData", + "name": "numberOfProducts", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether merchant specific data should be included in the response. Requires permissions to manage products." + "doc": "Number of products in the collection. Read only." }, { - "name": "includeVariants", + "name": "slug", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether variants should be included in the response." + "doc": "Collection slug." }, { - "name": "query", + "name": "visible", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.QueryWithBigPageLimit" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`." } ], "docs": { @@ -6557,8 +8481,18 @@ } }, { - "name": "QueryStoreVariantsOptions", - "members": [], + "name": "UpdateCollectionRequest", + "members": [ + { + "name": "collection", + "type": [ + { + "referenceType": "wix-stores-v2.Products.Collection" + } + ], + "doc": "Collection info." + } + ], "docs": { "description": [ "" @@ -6566,17 +8500,17 @@ } }, { - "name": "QueryStoreVariantsRequest", + "name": "UpdateCollectionResponse", "members": [ { - "name": "query", + "name": "collection", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformQuery" + "referenceType": "wix-stores-v2.Products.Collection" } ], - "doc": "Query options." + "doc": "Updated collection." } ], "docs": { @@ -6586,20 +8520,32 @@ } }, { - "name": "QueryStoreVariantsResponse", + "name": "UpdateProduct", "members": [ { - "name": "metadata", + "name": "_createdDate", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformPagingMetadata" + "nativeType": "Date" } ], - "doc": "Details on the paged set of results returned." + "doc": "Date and time the product was created." }, { - "name": "variants", + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID (generated automatically by the catalog)." + }, + { + "name": "additionalInfoSections", "optional": true, "type": [ { @@ -6607,106 +8553,77 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.StoreVariant" + "referenceType": "wix-stores-v2.Products.AdditionalInfoSection" } ] } } ], - "doc": "List of variants based on the specified filters and sorting." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryStoreVariantsWithBigLimitOptions", - "members": [ + "doc": "Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.)." + }, { - "name": "query", + "name": "brand", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.UnlimitedPlatformQuery" + "nativeType": "string" } ], - "doc": "Query options." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryStoreVariantsWithBigLimitRequest", - "members": [ + "doc": "Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores)." + }, { - "name": "query", + "name": "collectionIds", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.UnlimitedPlatformQuery" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } - ], - "doc": "Query options." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryWithBigPageLimit", - "members": [ + ], + "doc": "A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs)." + }, { - "name": "filter", + "name": "convertedPriceData", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Filter string" + "doc": "Price data, converted to the currency specified in request header." }, { - "name": "paging", + "name": "costAndProfitData", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PagingWithBigLimit" + "referenceType": "wix-stores-v2.Products.CostAndProfitData" } ], - "doc": "" + "doc": "Cost and profit data." }, { - "name": "sort", + "name": "costRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Sort string" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveCustomFieldsOptions", - "members": [ + "doc": "Product cost range. The minimum and maximum costs of all the variants." + }, { - "name": "names", + "name": "customTextFields", + "readOnly": true, "optional": true, "type": [ { @@ -6714,319 +8631,191 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.CustomTextField" } ] } } ], - "doc": "Custom fields to be removed (by name)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveCustomFieldsRequest", - "members": [ + "doc": "Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI." + }, { - "name": "_id", + "name": "description", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product ID." + "doc": "Product description." }, { - "name": "names", + "name": "discount", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-stores-v2.Products.Discount" } ], - "doc": "Custom fields to be removed (by name)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveCustomFieldsResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductBrandRequest", - "members": [ + "doc": "Discount deducted from the product's original price." + }, { - "name": "_id", + "name": "inventoryItemId", + "readOnly": true, + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product ID." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductBrandResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductMediaFromChoicesRequest", - "members": [ + "doc": "Inventory item ID - ID referencing the inventory system." + }, { - "name": "_id", + "name": "lastUpdated", + "readOnly": true, + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Product ID from whose choices to remove media items." + "doc": "Date and time the product was last updated." + }, + { + "name": "manageVariants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to `true`, can be reset to `false` only if no variants exist. You cannot set `manageVariants` to `true` if more than 300 variants are defined." }, { "name": "media", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.MediaAssignmentToChoice" - } - ] - } + "referenceType": "wix-stores-v2.Products.Media" } ], - "doc": "Media to remove from choices. If an empty array is passed, all media will be removed from all choices for the given product." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductMediaFromChoicesResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductMediaRequest", - "members": [ + "doc": "Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint)." + }, { - "name": "_id", + "name": "name", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product ID." + "doc": "Product name.\n\nMin: 1 character\nMax: 80 characters\n" }, { - "name": "mediaIds", + "name": "numericId", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "List of media IDs to remove. Pass an empty array to delete all media items for the product." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductMediaResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductRibbonRequest", - "members": [ + "doc": "Product’s unique numeric ID (assigned in ascending order).\nPrimarily used for sorting and filtering when crawling all products." + }, { - "name": "_id", + "name": "price", + "readOnly": true, + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Product ID." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductRibbonResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductsFromCollectionRequest", - "members": [ + "doc": "Deprecated (use `priceData` instead)." + }, + { + "name": "priceData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PriceData" + } + ], + "doc": "Price data." + }, + { + "name": "pricePerUnitData", + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.PricePerUnitData" + } + ], + "doc": "Price per unit data." + }, { - "name": "_id", + "name": "priceRange", + "readOnly": true, + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "ID of the collection from which to remove products." + "doc": "Product price range. The minimum and maximum prices of all the variants." }, { - "name": "productIds", + "name": "productOptions", + "optional": true, "type": [ { "complexType": { "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.ProductOption" } ] } } ], - "doc": "IDs of the products to remove from the collection." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "RemoveProductsFromCollectionResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ResetAllVariantDataRequest", - "members": [ + "doc": "Options for this product." + }, { - "name": "_id", + "name": "productPageUrl", + "readOnly": true, + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PageUrl" } ], - "doc": "Product ID." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ResetAllVariantDataResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Ribbon", - "members": [ + "doc": "Product page URL for this product (generated automatically by the server)." + }, { - "name": "text", + "name": "productType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Ribbon text" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "SeoSchema", - "members": [ + "doc": "Currently, only creating physical products ( `\"productType\": \"physical\"` ) is supported via the API." + }, { - "name": "settings", + "name": "ribbon", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Settings" + "nativeType": "string" } ], - "doc": "SEO general settings." + "doc": "Product ribbon. Used to highlight relevant information about a product. For example, \"Sale\", \"New Arrival\", \"Sold Out\"." }, { - "name": "tags", + "name": "ribbons", + "readOnly": true, "optional": true, "type": [ { @@ -7034,147 +8823,105 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.Tag" + "referenceType": "wix-stores-v2.Products.Ribbon" } ] } } ], - "doc": "SEO tag information." - } - ], - "docs": { - "description": [ - "The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.\nThe search engines use this information for ranking purposes, or to display snippets in the search results.\nThis data will override other sources of tags (for example patterns) and will be included in the section of the HTML document, while not being displayed on the page itself." - ] - } - }, - { - "name": "SetCustomFieldsOptions", - "members": [ + "doc": "Deprecated (use `ribbon` instead)." + }, { - "name": "customFields", + "name": "seoData", "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-stores-v2.Products.SeoSchema" } ], - "doc": "Custom field that will be added, if a custom field with the same name already exists, the value of the custom field will be overridden." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "SetCustomFieldsRequest", - "members": [ + "doc": "Custom SEO data for the product." + }, { - "name": "_id", + "name": "sku", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product ID." + "doc": "Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty." }, { - "name": "customFields", + "name": "slug", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "Custom field that will be added, if a custom field with the same name already exists, the value of the custom field will be overridden." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "SetCustomFieldsResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "SetValue", - "members": [ + "doc": "A friendly URL name (generated automatically by the catalog when a product is created), can be updated." + }, { - "name": "brand", + "name": "stock", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Stock" } ], - "doc": "Set product brand. Pass empty string to remove existing brand." + "doc": "Product inventory status (in future this will be writable via Inventory API)." }, { - "name": "cost", + "name": "variants", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Variant" + } + ] + } } ], - "doc": "Set product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be set per variant." + "doc": "Product variants, will be provided if the the request was sent with the includeVariants flag." }, { - "name": "price", + "name": "visible", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Set product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariant prices will be calculated according to the set product price.\nIf variant price is negative after setting new price, the update will fail." + "doc": "Whether the product is visible to site visitors." }, { - "name": "ribbon", + "name": "weight", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Set product ribbon. Pass empty string to remove existing ribbon." + "doc": "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 will be set per variant, and this field will be empty." }, { - "name": "weight", + "name": "weightRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Set product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be set per variant." + "doc": "Product weight range. The minimum and maximum weights of all the variants." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfSetValueValueOneOf", - "members": [ - "brand", - "cost", - "price", - "ribbon", - "weight" - ] - } - ] - }, "docs": { "description": [ "" @@ -7182,8 +8929,47 @@ } }, { - "name": "SetValueValueOneOf", + "name": "UpdateProductPlatformizedProduct", "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the product was created." + }, + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Product ID (generated automatically by the catalog)." + }, + { + "name": "additionalInfoSections", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.AdditionalInfoSection" + } + ] + } + } + ], + "doc": "Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.)." + }, { "name": "brand", "optional": true, @@ -7192,60 +8978,61 @@ "nativeType": "string" } ], - "doc": "Set product brand. Pass empty string to remove existing brand." + "doc": "Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores)." }, { - "name": "cost", + "name": "collectionIds", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Set product cost of goods.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\ncost of goods will be set per variant." + "doc": "A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs)." }, { - "name": "price", + "name": "convertedPriceData", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Set product price.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nvariant prices will be calculated according to the set product price.\nIf variant price is negative after setting new price, the update will fail." + "doc": "Price data, converted to the currency specified in request header." }, { - "name": "ribbon", + "name": "costAndProfitData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.CostAndProfitData" } ], - "doc": "Set product ribbon. Pass empty string to remove existing ribbon." + "doc": "Cost and profit data." }, { - "name": "weight", + "name": "costRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Set product weight.\nIf [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,\nweight will be set per variant." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Settings", - "members": [ + "doc": "Product cost range. The minimum and maximum costs of all the variants." + }, { - "name": "keywords", + "name": "customTextFields", + "readOnly": true, "optional": true, "type": [ { @@ -7253,321 +9040,295 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.Keyword" + "referenceType": "wix-stores-v2.Products.CustomTextField" } ] } } ], - "doc": "User-selected keyword terms for a specific page." + "doc": "Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI." }, { - "name": "preventAutoRedirect", + "name": "description", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.\n\nDefault: `false` (Auto Redirect is enabled.)\n" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Sorting", - "members": [ + "doc": "Product description." + }, { - "name": "fieldName", + "name": "discount", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Discount" } ], - "doc": "Name of the field to sort by." + "doc": "Discount deducted from the product's original price." }, { - "name": "order", + "name": "inventoryItemId", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Sort order." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Stock", - "members": [ + "doc": "Inventory item ID - ID referencing the inventory system." + }, { - "name": "inStock", + "name": "lastUpdated", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "Date" } ], - "doc": "Whether the product is currently in stock (relevant only when tracking manually)\nDeprecated (use `inventoryStatus` instead)" + "doc": "Date and time the product was last updated." }, { - "name": "inventoryStatus", + "name": "manageVariants", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "The current status of the inventory\n+ `IN_STOCK` - In stock\n+ `OUT_OF_STOCK` - Not in stock\n+ `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock" + "doc": "Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to `true`, can be reset to `false` only if no variants exist. You cannot set `manageVariants` to `true` if more than 300 variants are defined." }, { - "name": "quantity", + "name": "media", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.Media" } ], - "doc": "Quantity currently left in inventory" + "doc": "Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint)." }, { - "name": "trackInventory", + "name": "name", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether inventory is being tracked" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "StoreVariant", - "members": [ + "doc": "Product name.\n\nMin: 1 character\nMax: 80 characters\n" + }, { - "name": "_id", + "name": "numericId", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen: {productId}.{variantId}." + "doc": "Product’s unique numeric ID (assigned in ascending order).\nPrimarily used for sorting and filtering when crawling all products." }, { - "name": "choices", + "name": "price", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "The selected options of this variant. For example, `{\"Color\": \"Blue\", \"Size\": \"Large\"}`." + "doc": "Deprecated (use `priceData` instead)." }, { - "name": "collectionIds", + "name": "priceData", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Collections that include this variant." + "doc": "Price data." }, { - "name": "managedVariant", + "name": "pricePerUnitData", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.PricePerUnitData" } ], - "doc": "Whether the variant is managed or represents a product." + "doc": "Price per unit data." }, { - "name": "media", + "name": "priceRange", "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PlatformMedia" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Media items (images, videos) associated with this variant." + "doc": "Product price range. The minimum and maximum prices of all the variants." }, { - "name": "preorderInfo", + "name": "productOptions", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PreorderInfo" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.ProductOption" + } + ] + } } ], - "doc": "Preorder information." + "doc": "Options for this product." }, { - "name": "productId", + "name": "productPageUrl", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PageUrl" } ], - "doc": "Product ID." + "doc": "Product page URL for this product (generated automatically by the server)." }, { - "name": "productName", + "name": "productType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product name." + "doc": "Currently, only creating physical products ( `\"productType\": \"physical\"` ) is supported via the API." }, { - "name": "sku", + "name": "ribbon", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Variant SKU (stock keeping unit)." + "doc": "Product ribbon. Used to highlight relevant information about a product. For example, \"Sale\", \"New Arrival\", \"Sold Out\"." }, { - "name": "stock", + "name": "ribbons", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.VariantStock" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Ribbon" + } + ] + } } ], - "doc": "Variant inventory status." + "doc": "Deprecated (use `ribbon` instead)." }, { - "name": "variantId", + "name": "seoData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.SeoSchema" } ], - "doc": "Variant ID." + "doc": "Custom SEO data for the product." }, { - "name": "variantName", + "name": "sku", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Variant name." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Tag", - "members": [ + "doc": "Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty." + }, { - "name": "children", + "name": "slug", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "SEO tag inner content. For example, ` inner content `." + "doc": "A friendly URL name (generated automatically by the catalog when a product is created), can be updated." }, { - "name": "custom", + "name": "stock", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.Stock" } ], - "doc": "Whether the tag is a custom tag." + "doc": "Product inventory status (in future this will be writable via Inventory API)." }, { - "name": "disabled", + "name": "variants", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.Variant" + } + ] + } } ], - "doc": "Whether the tag is disabled." + "doc": "Product variants, will be provided if the the request was sent with the includeVariants flag." }, { - "name": "meta", + "name": "visible", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "boolean" } ], - "doc": "SEO tag meta data. For example, `{height: 300, width: 240}`." + "doc": "Whether the product is visible to site visitors." }, { - "name": "props", + "name": "weight", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "number" } ], - "doc": "A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.\nFor example: `{'name': 'description', 'content': 'the description itself'}`." + "doc": "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 will be set per variant, and this field will be empty." }, { - "name": "type", + "name": "weightRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "SEO tag type.\n\nSupported values: `title`, `meta`, `script`, `link`.\n" + "doc": "Product weight range. The minimum and maximum weights of all the variants." } ], "docs": { @@ -7577,100 +9338,124 @@ } }, { - "name": "UnlimitedPlatformCursorPaging", + "name": "UpdateProductPlatformizedRequest", "members": [ { - "name": "cursor", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Cursor returned in last query response. Should not be provided on first page request" - }, - { - "name": "limit", - "optional": true, + "name": "product", "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "The number of items to load.\nCursor token returned in the query response. To be used on the next query request, but not the first query request." + "doc": "" } ], "docs": { "description": [ - "Don't use it unless you have to and know what you do. Prefer PlatformCursorPaging or wix.common.CursorPaging other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." + "" ] } }, { - "name": "UnlimitedPlatformPaging", + "name": "UpdateProductPlatformizedResponse", "members": [ { - "name": "limit", + "name": "product", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Number of items to load." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateProductRequest", + "members": [ { - "name": "offset", - "optional": true, + "name": "product", "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Number of items to skip in the current sort order." + "doc": "" } ], "docs": { "description": [ - "Don't use it unless you have to and know what you do. Prefer PlatformPaging or wix.common.Paging other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." + "" ] } }, { - "name": "UnlimitedPlatformQuery", + "name": "UpdateProductResponse", "members": [ { - "name": "cursorPaging", + "name": "product", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.UnlimitedPlatformCursorPaging" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateVariantsRequest", + "members": [ { - "name": "filter", - "optional": true, + "name": "_id", "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "Filter object." + "doc": "ID of the product with managed variants." }, { - "name": "paging", + "name": "variants", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.UnlimitedPlatformPaging" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.VariantOverride" + } + ] + } } ], - "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." - }, + "doc": "Variant info to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateVariantsResponse", + "members": [ { - "name": "sort", + "name": "variants", "optional": true, "type": [ { @@ -7678,54 +9463,53 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.Sorting" + "referenceType": "wix-stores-v2.Products.Variant" } ] } } ], - "doc": "Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`." + "doc": "List of the product's variants." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfUnlimitedPlatformQueryPagingMethodOneOf", - "members": [ - "cursorPaging", - "paging" - ] - } - ] - }, "docs": { "description": [ - "Don't use it unless you have to and know what you do. Prefer PlatformQuery other than this.\nIt doesn't have max validation for limit but we still MUST have it so implement required validation in your code." + "" ] } }, { - "name": "UnlimitedPlatformQueryPagingMethodOneOf", + "name": "V1CreateProductPlatformizedRequest", "members": [ { - "name": "cursorPaging", + "name": "product", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.UnlimitedPlatformCursorPaging" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`." - }, + "doc": "Product information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "V1CreateProductPlatformizedResponse", + "members": [ { - "name": "paging", + "name": "product", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.UnlimitedPlatformPaging" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Pointer to page of results using offset. Cannot be used together with `cursorPaging`." + "doc": "" } ], "docs": { @@ -7735,80 +9519,16 @@ } }, { - "name": "UpdateCollection", + "name": "V1DeleteProductPlatformizedRequest", "members": [ { "name": "_id", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Collection ID (generated automatically by the catalog)." - }, - { - "name": "description", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Collection description." - }, - { - "name": "media", - "readOnly": true, - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.Media" - } - ], - "doc": "Media items (images, videos etc) associated with this collection. Read only." - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Collection name." - }, - { - "name": "numberOfProducts", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Number of products in the collection. Read only." - }, - { - "name": "slug", - "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Collection slug." - }, - { - "name": "visible", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`." + "doc": "ID of the product to delete." } ], "docs": { @@ -7818,16 +9538,25 @@ } }, { - "name": "UpdateCollectionRequest", + "name": "V1DeleteProductPlatformizedResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "V1UpdateProductPlatformizedRequest", "members": [ { - "name": "collection", + "name": "product", "type": [ { - "referenceType": "wix-stores-v2.Products.Collection" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Collection info." + "doc": "" } ], "docs": { @@ -7837,17 +9566,17 @@ } }, { - "name": "UpdateCollectionResponse", + "name": "V1UpdateProductPlatformizedResponse", "members": [ { - "name": "collection", + "name": "product", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Collection" + "referenceType": "wix-stores-v2.Products.Product" } ], - "doc": "Updated collection." + "doc": "" } ], "docs": { @@ -7857,66 +9586,29 @@ } }, { - "name": "UpdateProduct", + "name": "Variant", "members": [ - { - "name": "_createdDate", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Date and time the product was created." - }, { "name": "_id", - "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product ID (generated automatically by the catalog)." + "doc": "Requested Variant ID" }, { - "name": "additionalInfoSections", + "name": "choices", "optional": true, "type": [ { "complexType": { - "nativeType": "Array", + "nativeType": "Record", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.AdditionalInfoSection" - } - ] - } - } - ], - "doc": "Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.)." - }, - { - "name": "brand", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores)." - }, - { - "name": "collectionIds", - "readOnly": true, - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ + "nativeType": "string" + }, { "nativeType": "string" } @@ -7924,43 +9616,41 @@ } } ], - "doc": "A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs)." + "doc": "Specific choices within a selection, as option-choice key-value pairs" }, { - "name": "convertedPriceData", + "name": "stock", "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" - } - ], - "doc": "Price data, converted to the currency specified in request header." - }, - { - "name": "costAndProfitData", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.CostAndProfitData" + "referenceType": "wix-stores-v2.Products.VariantStock" } ], - "doc": "Cost and profit data." + "doc": "Variant inventory status." }, { - "name": "costRange", - "readOnly": true, + "name": "variant", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.NumericPropertyRange" + "referenceType": "wix-stores-v2.Products.VariantDataWithNoStock" } ], - "doc": "Product cost range. The minimum and maximum costs of all the variants." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "VariantChanged", + "members": [ { - "name": "customTextFields", - "readOnly": true, + "name": "changedFields", "optional": true, "type": [ { @@ -7968,250 +9658,258 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.CustomTextField" + "nativeType": "string" } ] } } ], - "doc": "Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI." - }, - { - "name": "description", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Product description." + "doc": "List of variant fields that were changed." }, { - "name": "discount", + "name": "choices", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Discount" + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } } ], - "doc": "Discount deducted from the product's original price." + "doc": "" }, { - "name": "inventoryItemId", - "readOnly": true, + "name": "variantId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Inventory item ID - ID referencing the inventory system." - }, + "doc": "Variant ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "VariantData", + "members": [ { - "name": "lastUpdated", + "name": "convertedPriceData", "readOnly": true, "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Date and time the product was last updated." + "doc": "Variant price data converted to currency provided in header." }, { - "name": "manageVariants", + "name": "inStock", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to `true`, can be reset to `false` only if no variants exist. You cannot set `manageVariants` to `true` if more than 300 variants are defined." + "doc": "Whether the product is currently in stock (relevant only when tracking manually)." }, { - "name": "media", - "readOnly": true, + "name": "price", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Media" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint)." + "doc": "Variant price." }, { - "name": "name", + "name": "quantity", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Product name.\n\nMin: 1 character\nMax: 80 characters\n" + "doc": "Quantity currently in inventory (relevant only when tracking by inventory)." }, { - "name": "numericId", - "readOnly": true, + "name": "sku", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Product’s unique numeric ID (assigned in ascending order).\nPrimarily used for sorting and filtering when crawling all products." + "doc": "Variant SKU (stock keeping unit)." }, { - "name": "price", - "readOnly": true, + "name": "visible", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" + "nativeType": "boolean" } ], - "doc": "Deprecated (use `priceData` instead)." + "doc": "Whether the variant is visible to customers." }, { - "name": "priceData", + "name": "weight", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" + "nativeType": "number" } ], - "doc": "Price data." - }, + "doc": "Variant weight." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "VariantDataWithNoStock", + "members": [ { - "name": "pricePerUnitData", + "name": "convertedPriceData", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PricePerUnitData" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Price per unit data." + "doc": "Variant price data, converted to currency requested in header." }, { - "name": "priceRange", - "readOnly": true, + "name": "costAndProfitData", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.NumericPropertyRange" + "referenceType": "wix-stores-v2.Products.CostAndProfitData" } ], - "doc": "Product price range. The minimum and maximum prices of all the variants." + "doc": "Cost and profit data." }, { - "name": "productOptions", + "name": "priceData", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.ProductOption" - } - ] - } + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Options for this product." + "doc": "Variant price." }, { - "name": "productPageUrl", - "readOnly": true, + "name": "sku", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PageUrl" + "nativeType": "string" } ], - "doc": "Product page URL for this product (generated automatically by the server)." + "doc": "Variant SKU (stock keeping unit)." }, { - "name": "productType", + "name": "visible", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Currently, only creating physical products ( `\"productType\": \"physical\"` ) is supported via the API." + "doc": "Whether the variant is visible to customers." }, { - "name": "ribbon", + "name": "weight", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Product ribbon. Used to highlight relevant information about a product. For example, \"Sale\", \"New Arrival\", \"Sold Out\"." - }, + "doc": "Variant weight." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "VariantOverride", + "members": [ { - "name": "ribbons", - "readOnly": true, + "name": "choices", "optional": true, "type": [ { "complexType": { - "nativeType": "Array", + "nativeType": "Record", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.Ribbon" + "nativeType": "string" + }, + { + "nativeType": "string" } ] } } ], - "doc": "Deprecated (use `ribbon` instead)." + "doc": "The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice). You may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (Not relevant when passing variant IDs)" }, { - "name": "seoData", + "name": "cost", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.SeoSchema" + "nativeType": "number" } ], - "doc": "Custom SEO data for the product." + "doc": "Variant cost of goods" }, { - "name": "sku", + "name": "price", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty." + "doc": "Variant price" }, { - "name": "slug", + "name": "sku", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "A friendly URL name (generated automatically by the catalog when a product is created), can be updated." - }, - { - "name": "stock", - "readOnly": true, - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.Stock" - } - ], - "doc": "Product inventory status (in future this will be writable via Inventory API)." + "doc": "Variant SKU (stock keeping unit)" }, { - "name": "variants", - "readOnly": true, + "name": "variantIds", "optional": true, "type": [ { @@ -8219,13 +9917,13 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.Variant" + "nativeType": "string" } ] } } ], - "doc": "Product variants, will be provided if the the request was sent with the includeVariants flag." + "doc": "List of variant IDs\n(Not relevant when passing choices)" }, { "name": "visible", @@ -8235,7 +9933,7 @@ "nativeType": "boolean" } ], - "doc": "Whether the product is visible to site visitors." + "doc": "Whether the variant is visible to customers" }, { "name": "weight", @@ -8245,18 +9943,7 @@ "nativeType": "number" } ], - "doc": "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 will be set per variant, and this field will be empty." - }, - { - "name": "weightRange", - "readOnly": true, - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.NumericPropertyRange" - } - ], - "doc": "Product weight range. The minimum and maximum weights of all the variants." + "doc": "Variant weight" } ], "docs": { @@ -8266,36 +9953,37 @@ } }, { - "name": "UpdateProductRequest", + "name": "VariantStock", "members": [ { - "name": "product", + "name": "inStock", + "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Product" + "nativeType": "boolean" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "UpdateProductResponse", - "members": [ + "doc": "Whether the product is currently in stock (relevant only when tracking manually)." + }, { - "name": "product", + "name": "quantity", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.Product" + "nativeType": "number" } ], - "doc": "" + "doc": "Quantity currently left in inventory." + }, + { + "name": "trackQuantity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether inventory is being tracked." } ], "docs": { @@ -8305,16 +9993,17 @@ } }, { - "name": "UpdateVariantsRequest", + "name": "VariantsChanged", "members": [ { - "name": "_id", + "name": "productId", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the product with managed variants." + "doc": "Product ID." }, { "name": "variants", @@ -8325,13 +10014,13 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.VariantOverride" + "referenceType": "wix-stores-v2.Products.VariantChanged" } ] } } ], - "doc": "Variant info to update." + "doc": "List of variants that were changed." } ], "docs": { @@ -8341,24 +10030,47 @@ } }, { - "name": "UpdateVariantsResponse", + "name": "VideoResolution", "members": [ { - "name": "variants", + "name": "format", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-stores-v2.Products.Variant" - } - ] - } + "nativeType": "string" } ], - "doc": "List of the product's variants." + "doc": "Video format for example, mp4, hls." + }, + { + "name": "height", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Video height." + }, + { + "name": "url", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Video URL." + }, + { + "name": "width", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Video width." } ], "docs": { @@ -8368,71 +10080,60 @@ } }, { - "name": "Variant", + "name": "WriteProxyUpdateProductPlatformizedProduct", "members": [ + { + "name": "_createdDate", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Date and time the product was created." + }, { "name": "_id", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Requested Variant ID" + "doc": "Product ID (generated automatically by the catalog)." }, { - "name": "choices", + "name": "additionalInfoSections", "optional": true, "type": [ { "complexType": { - "nativeType": "Record", + "nativeType": "Array", "typeParams": [ { - "nativeType": "string" - }, - { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.AdditionalInfoSection" } ] } } ], - "doc": "Specific choices within a selection, as option-choice key-value pairs" + "doc": "Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.)." }, { - "name": "stock", - "readOnly": true, + "name": "brand", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.VariantStock" + "nativeType": "string" } ], - "doc": "Variant inventory status." + "doc": "Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores)." }, { - "name": "variant", - "optional": true, - "type": [ - { - "referenceType": "wix-stores-v2.Products.VariantDataWithNoStock" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "VariantChanged", - "members": [ - { - "name": "changedFields", + "name": "collectionIds", + "readOnly": true, "optional": true, "type": [ { @@ -8446,252 +10147,235 @@ } } ], - "doc": "List of variant fields that were changed." + "doc": "A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs)." }, { - "name": "choices", + "name": "convertedPriceData", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "" + "doc": "Price data, converted to the currency specified in request header." }, { - "name": "variantId", + "name": "costAndProfitData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.CostAndProfitData" } ], - "doc": "Variant ID." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "VariantData", - "members": [ + "doc": "Cost and profit data." + }, + { + "name": "costRange", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" + } + ], + "doc": "Product cost range. The minimum and maximum costs of all the variants." + }, { - "name": "convertedPriceData", + "name": "customTextFields", "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-stores-v2.Products.CustomTextField" + } + ] + } } ], - "doc": "Variant price data converted to currency provided in header." + "doc": "Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI." }, { - "name": "inStock", + "name": "description", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the product is currently in stock (relevant only when tracking manually)." + "doc": "Product description." }, { - "name": "price", + "name": "discount", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" + "referenceType": "wix-stores-v2.Products.Discount" } ], - "doc": "Variant price." + "doc": "Discount deducted from the product's original price." }, { - "name": "quantity", + "name": "inventoryItemId", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Quantity currently in inventory (relevant only when tracking by inventory)." + "doc": "Inventory item ID - ID referencing the inventory system." }, { - "name": "sku", + "name": "lastUpdated", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Variant SKU (stock keeping unit)." + "doc": "Date and time the product was last updated." }, { - "name": "visible", + "name": "manageVariants", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the variant is visible to customers." + "doc": "Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to `true`, can be reset to `false` only if no variants exist. You cannot set `manageVariants` to `true` if more than 300 variants are defined." }, { - "name": "weight", + "name": "media", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.Media" } ], - "doc": "Variant weight." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "VariantDataWithNoStock", - "members": [ + "doc": "Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint)." + }, { - "name": "convertedPriceData", - "readOnly": true, + "name": "name", "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.PriceData" + "nativeType": "string" } ], - "doc": "Variant price data, converted to currency requested in header." + "doc": "Product name.\n\nMin: 1 character\nMax: 80 characters\n" }, { - "name": "costAndProfitData", + "name": "numericId", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-stores-v2.Products.CostAndProfitData" + "nativeType": "string" } ], - "doc": "Cost and profit data." + "doc": "Product’s unique numeric ID (assigned in ascending order).\nPrimarily used for sorting and filtering when crawling all products." }, { - "name": "priceData", + "name": "price", + "readOnly": true, "optional": true, "type": [ { "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Variant price." + "doc": "Deprecated (use `priceData` instead)." }, { - "name": "sku", + "name": "priceData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.PriceData" } ], - "doc": "Variant SKU (stock keeping unit)." + "doc": "Price data." }, { - "name": "visible", + "name": "pricePerUnitData", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.PricePerUnitData" } ], - "doc": "Whether the variant is visible to customers." + "doc": "Price per unit data." }, { - "name": "weight", + "name": "priceRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Variant weight." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "VariantOverride", - "members": [ + "doc": "Product price range. The minimum and maximum prices of all the variants." + }, { - "name": "choices", + "name": "productOptions", "optional": true, "type": [ { "complexType": { - "nativeType": "Record", + "nativeType": "Array", "typeParams": [ { - "nativeType": "string" - }, - { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.ProductOption" } ] } } ], - "doc": "The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice). You may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (Not relevant when passing variant IDs)" + "doc": "Options for this product." }, { - "name": "cost", + "name": "productPageUrl", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.PageUrl" } ], - "doc": "Variant cost of goods" + "doc": "Product page URL for this product (generated automatically by the server)." }, { - "name": "price", + "name": "productType", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Variant price" + "doc": "Currently, only creating physical products ( `\"productType\": \"physical\"` ) is supported via the API." }, { - "name": "sku", + "name": "ribbon", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Variant SKU (stock keeping unit)" + "doc": "Product ribbon. Used to highlight relevant information about a product. For example, \"Sale\", \"New Arrival\", \"Sold Out\"." }, { - "name": "variantIds", + "name": "ribbons", + "readOnly": true, "optional": true, "type": [ { @@ -8699,96 +10383,58 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Ribbon" } ] } } ], - "doc": "List of variant IDs\n(Not relevant when passing choices)" + "doc": "Deprecated (use `ribbon` instead)." }, { - "name": "visible", + "name": "seoData", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-stores-v2.Products.SeoSchema" } ], - "doc": "Whether the variant is visible to customers" + "doc": "Custom SEO data for the product." }, { - "name": "weight", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Variant weight" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "VariantStock", - "members": [ - { - "name": "inStock", + "name": "sku", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the product is currently in stock (relevant only when tracking manually)." + "doc": "Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty." }, { - "name": "quantity", + "name": "slug", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Quantity currently left in inventory." + "doc": "A friendly URL name (generated automatically by the catalog when a product is created), can be updated." }, { - "name": "trackQuantity", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether inventory is being tracked." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "VariantsChanged", - "members": [ - { - "name": "productId", + "name": "stock", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-stores-v2.Products.Stock" } ], - "doc": "Product ID." + "doc": "Product inventory status (in future this will be writable via Inventory API)." }, { "name": "variants", + "readOnly": true, "optional": true, "type": [ { @@ -8796,63 +10442,44 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-stores-v2.Products.VariantChanged" + "referenceType": "wix-stores-v2.Products.Variant" } ] } } ], - "doc": "List of variants that were changed." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "VideoResolution", - "members": [ - { - "name": "format", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Video format for example, mp4, hls." + "doc": "Product variants, will be provided if the the request was sent with the includeVariants flag." }, { - "name": "height", + "name": "visible", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Video height." + "doc": "Whether the product is visible to site visitors." }, { - "name": "url", + "name": "weight", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Video URL." + "doc": "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 will be set per variant, and this field will be empty." }, { - "name": "width", + "name": "weightRange", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-stores-v2.Products.NumericPropertyRange" } ], - "doc": "Video width." + "doc": "Product weight range. The minimum and maximum weights of all the variants." } ], "docs": { diff --git a/wix-stores-v2/wix-stores-v2/Products/ProductsQueryBuilder.service.json b/wix-stores-v2/wix-stores-v2/Products/ProductsQueryBuilder.service.json index d180aa5a0e..d1f3626e13 100644 --- a/wix-stores-v2/wix-stores-v2/Products/ProductsQueryBuilder.service.json +++ b/wix-stores-v2/wix-stores-v2/Products/ProductsQueryBuilder.service.json @@ -464,7 +464,7 @@ { "title": "Add a `ge` filter to a query", "body": [ - "const query = products.queryProducts.ge('numericId', 1212);", + "const query = products.queryProducts.ge('_createdDate', '2021-03-01');", "" ] }, @@ -474,7 +474,10 @@ "import { products } from 'wix-stores.v2';", "", "export async function myQueryFunction() {", - " const results = await products.queryProducts().ge('numericId', 1212).find();", + " const results = await products", + " .queryProducts()", + " .ge('_createdDate', '2021-03-01')", + " .find();", "", " if (results.items.length > 0) {", " const items = results.items;", @@ -923,7 +926,7 @@ { "title": "Add an `le` filter to a query", "body": [ - "const query = products.queryProducts.le('numericId', 1212);", + "const query = products.queryProducts.le('_createdDate', '2021-03-01');", "" ] }, @@ -933,7 +936,10 @@ "import { products } from 'wix-stores.v2';", "", "export async function myQueryFunction() {", - " const results = await products.queryProducts().le('numericId', 1212).find();", + " const results = await products", + " .queryProducts()", + " .le('_createdDate', '2021-03-01')", + " .find();", "", " if (results.items.length > 0) {", " const items = results.items;", diff --git a/wix-stores-v2/wix-stores-v2/Products/ProductsQueryResult.service.json b/wix-stores-v2/wix-stores-v2/Products/ProductsQueryResult.service.json index 84057ccf99..8610c9afb6 100644 --- a/wix-stores-v2/wix-stores-v2/Products/ProductsQueryResult.service.json +++ b/wix-stores-v2/wix-stores-v2/Products/ProductsQueryResult.service.json @@ -11,6 +11,9 @@ { "name": "currentPage", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } @@ -209,6 +212,9 @@ { "name": "totalCount", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } @@ -245,6 +251,9 @@ { "name": "totalPages", "type": [ + { + "nativeType": "undefined" + }, { "nativeType": "number" } diff --git a/wix-stores-v2/wix-stores-v2/SubscriptionOptions.service.json b/wix-stores-v2/wix-stores-v2/SubscriptionOptions.service.json index 12a8fdfe3a..7a37a7bb32 100644 --- a/wix-stores-v2/wix-stores-v2/SubscriptionOptions.service.json +++ b/wix-stores-v2/wix-stores-v2/SubscriptionOptions.service.json @@ -53,8 +53,10 @@ "doc": null }, "docs": { - "summary": "Allow for one-time purchase of a product.\nBy default, product can be sold only as part of a subscription, not as a one-time purchase.", - "description": [], + "summary": "Allow for one-time purchase of a product.\nBy default, product can be sold only as part of a subscription, not as a one-time purchase.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "allowOneTimePurchases example", @@ -82,7 +84,8 @@ "id": "maturity-beta" } ], - "syntaxName": "allowOneTimePurchases" + "syntaxName": "allowOneTimePurchases", + "isAdminMethod": true }, { "name": "assignSubscriptionOptionsToProduct", @@ -104,7 +107,7 @@ "referenceType": "wix-stores-v2.SubscriptionOptions.AssignSubscriptionOptionsToProductOptions" } ], - "doc": "Subscription option assignment options.\n", + "doc": "Subscription option assignment options.", "required": false } ], @@ -127,8 +130,10 @@ "doc": null }, "docs": { - "summary": "Assign up to 6 subscription options to a specified product.\nPass an empty array to remove all subscription options assigned to a product.", - "description": [], + "summary": "Assign up to 6 subscription options to a specified product.\nPass an empty array to remove all subscription options assigned to a product.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "assignSubscriptionOptionsToProduct example", @@ -156,7 +161,8 @@ "id": "maturity-beta" } ], - "syntaxName": "assignSubscriptionOptionsToProduct" + "syntaxName": "assignSubscriptionOptionsToProduct", + "isAdminMethod": true }, { "name": "bulkCreateSubscriptionOptions", @@ -229,7 +235,8 @@ "id": "maturity-beta" } ], - "syntaxName": "bulkCreateSubscriptionOptions" + "syntaxName": "bulkCreateSubscriptionOptions", + "isAdminMethod": true }, { "name": "bulkDeleteSubscriptionOptions", @@ -271,8 +278,10 @@ "doc": null }, "docs": { - "summary": "Deletes multiple subscription options.", - "description": [], + "summary": "Deletes multiple subscription options.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "bulkDeleteSubscriptionOptions example", @@ -300,7 +309,8 @@ "id": "maturity-beta" } ], - "syntaxName": "bulkDeleteSubscriptionOptions" + "syntaxName": "bulkDeleteSubscriptionOptions", + "isAdminMethod": true }, { "name": "bulkUpdateSubscriptionOptions", @@ -343,8 +353,10 @@ "doc": null }, "docs": { - "summary": "Updates multiple subscription options.\nOnly parameters passed will be updated.", - "description": [], + "summary": "Updates multiple subscription options.\nOnly parameters passed will be updated.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "bulkUpdateSubscriptionOptions example", @@ -372,7 +384,8 @@ "id": "maturity-beta" } ], - "syntaxName": "bulkUpdateSubscriptionOptions" + "syntaxName": "bulkUpdateSubscriptionOptions", + "isAdminMethod": true }, { "name": "createSubscriptionOption", @@ -438,7 +451,8 @@ "id": "maturity-beta" } ], - "syntaxName": "createSubscriptionOption" + "syntaxName": "createSubscriptionOption", + "isAdminMethod": true }, { "name": "deleteSubscriptionOption", @@ -473,8 +487,10 @@ "doc": null }, "docs": { - "summary": "Deletes a subscription option.", - "description": [], + "summary": "Deletes a subscription option.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "deleteSubscriptionOption example", @@ -502,7 +518,8 @@ "id": "maturity-beta" } ], - "syntaxName": "deleteSubscriptionOption" + "syntaxName": "deleteSubscriptionOption", + "isAdminMethod": true }, { "name": "getOneTimePurchasesStatus", @@ -537,8 +554,10 @@ "doc": null }, "docs": { - "summary": "Checks whether a specified product (associated with subscription options) is available for one-time purchase.", - "description": [], + "summary": "Checks whether a specified product (associated with subscription options) is available for one-time purchase.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "getOneTimePurchasesStatus example", @@ -566,7 +585,8 @@ "id": "maturity-beta" } ], - "syntaxName": "getOneTimePurchasesStatus" + "syntaxName": "getOneTimePurchasesStatus", + "isAdminMethod": true }, { "name": "getProductIdsForSubscriptionOption", @@ -588,7 +608,7 @@ "referenceType": "wix-stores-v2.SubscriptionOptions.GetProductIdsForSubscriptionOptionOptions" } ], - "doc": "Paging and other options.\n", + "doc": "Paging and other options.", "required": false } ], @@ -611,8 +631,10 @@ "doc": null }, "docs": { - "summary": "Retrieves the IDs of products associated with a specified subscription option.", - "description": [], + "summary": "Retrieves the IDs of products associated with a specified subscription option.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "getProductIdsForSubscriptionOption example", @@ -640,7 +662,8 @@ "id": "maturity-beta" } ], - "syntaxName": "getProductIdsForSubscriptionOption" + "syntaxName": "getProductIdsForSubscriptionOption", + "isAdminMethod": true }, { "name": "getSubscriptionOption", @@ -675,8 +698,10 @@ "doc": "Subscription option.\n" }, "docs": { - "summary": "Retrieves a subscription option by ID.", - "description": [], + "summary": "Retrieves a subscription option by ID.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "getSubscriptionOption example", @@ -704,7 +729,8 @@ "id": "maturity-beta" } ], - "syntaxName": "getSubscriptionOption" + "syntaxName": "getSubscriptionOption", + "isAdminMethod": true }, { "name": "getSubscriptionOptionsForProduct", @@ -726,7 +752,7 @@ "referenceType": "wix-stores-v2.SubscriptionOptions.GetSubscriptionOptionsForProductOptions" } ], - "doc": "Options.\n", + "doc": "Options.", "required": false } ], @@ -749,8 +775,10 @@ "doc": null }, "docs": { - "summary": "Retrieves all subscription options assigned to a specified product.\nBy default, hidden subscription options are not returned. To retrieve all subscription options you must pass `includeHiddenSubscriptionOptions = true`.", - "description": [], + "summary": "Retrieves all subscription options assigned to a specified product.\nBy default, hidden subscription options are not returned. To retrieve all subscription options you must pass `includeHiddenSubscriptionOptions = true`.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "getSubscriptionOptionsForProduct example", @@ -778,7 +806,8 @@ "id": "maturity-beta" } ], - "syntaxName": "getSubscriptionOptionsForProduct" + "syntaxName": "getSubscriptionOptionsForProduct", + "isAdminMethod": true }, { "name": "updateSubscriptionOption", @@ -824,8 +853,10 @@ "doc": "Updated subscription option.\n" }, "docs": { - "summary": "Updates a subscription option.\nOnly parameters passed will be updated.", - "description": [], + "summary": "Updates a subscription option.\nOnly parameters passed will be updated.\n
", + "description": [ + "__Deprecation Notice:__\n\nThis endpoint has been deprecated and will be removed on January 29, 2024.\n\n
" + ], "examples": [ { "title": "updateSubscriptionOption example", @@ -853,7 +884,8 @@ "id": "maturity-beta" } ], - "syntaxName": "updateSubscriptionOption" + "syntaxName": "updateSubscriptionOption", + "isAdminMethod": true } ], "messages": [ diff --git a/wix-stores-v2/wix-stores-v2/Wishlist.service.json b/wix-stores-v2/wix-stores-v2/Wishlist.service.json index 62c7fdb34a..8cc1787101 100644 --- a/wix-stores-v2/wix-stores-v2/Wishlist.service.json +++ b/wix-stores-v2/wix-stores-v2/Wishlist.service.json @@ -81,7 +81,8 @@ "id": "maturity-beta" } ], - "syntaxName": "getWishlistById" + "syntaxName": "getWishlistById", + "isAdminMethod": true } ], "messages": [ diff --git a/wix-stores.v2/metadata.json b/wix-stores.v2/metadata.json new file mode 100644 index 0000000000..613198bf59 --- /dev/null +++ b/wix-stores.v2/metadata.json @@ -0,0 +1,7 @@ +{ + "name": "@wix/wix-stores.v2", + "fingerprint": "e9f435448a2e06a3bc2896ba1add8c144ce19e638cabe9b584ce98ca", + "groupId": "com.wixpress.velo-autogen", + "artifactId": "wix-stores-v2-velo-autogen", + "module": "wix-stores.v2" +}