Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 278 additions & 0 deletions wix-dummy-frontend/wix-dummy-frontend/Rsvp.service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
{ "name": "Rsvp",
"memberOf": "wix-dummy-frontend",
"mixes": [],
"labels": [],
"location":
{ "lineno": 1,
"filename": "dummy.js" },
"docs":
{ "summary": "An object containing RSVP functionality.",
"description":
[ "Use the RSVP API to create custom RSVP experiences for your events.",
"",
" You need to have at least one existing event before getting started.",
"",
" ### Typical Custom RSVP Lifecycle",
"",
" 1. In the dashboard, [set up a registration form](https://support.wix.com/en/article/setting-up-your-registration-form-page-in-wix-events) for an event.",
" 1. Retrieve the ID of an event from the **Events/Events** collection.",
" 1. Get the event `Form` by calling `getForm()` ([SDK](https://dev.wix.com/docs/sdk/frontend-modules/events/get-form) | [Velo](https://dev.wix.com/docs/velo/apis/wix-dummy-frontend/get-form)) with the ID retrieved above.",
" 1. Retrieve information about the form inputs in the form with `formData()`.",
" 1. In the editor, add user input elements for each form input retrieved above.",
" You may want to set the elements IDs to match the names of form inputs retrieved above",
" so that you won't have to map the names later.",
" 1. In the editor, add a button that will be used to create a new RSVP using the form values",
" that a site visitor enters.",
" 1. When the create button is clicked, gather the values entered into the form in",
" a `FormValue` array and use `createRsvp()` to create an RSVP using the form values." ],
"links": [],
"examples": [],
"extra":
{ } },
"properties": [],
"operations":
[ { "name": "createRsvp",
"labels": [],
"nameParams": [],
"params":
[ { "name": "eventId",
"type": "string",
"doc": "ID of the event to create an RSVP for." },
{ "name": "formValues",
"type":
{ "name": "Array",
"typeParams":
[ "wix-dummy-frontend.Rsvp.FormValue" ] },
"doc": "List of field names and values for an RSVP form." } ],
"ret":
{ "type":
{ "name": "Promise",
"typeParams":
[ "wix-dummy-frontend.Rsvp.RsvpResponse" ] },
"doc": "Fulfilled - Information about the RSVP that was created.\nRejected - Error information.\n One of:\n\n + `CreationError`\n + `FieldValidationError`\n + `ValueValidationError`" },
"locations":
[ { "lineno": 25,
"filename": "dummy.js" } ],
"docs":
{ "summary": "Creates an RSVP and adds the new guests to an event's guest list.",
"description":
[ "The list of `FormValue` objects you pass to",
" `createRsvp()` must include a form value for the `rsvpStatus`. Which statuses ",
" you can return depends on the `rsvpStatusOptions` returned from the ",
" `FormData` object as follows:",
"",
" + `\"YES_AND_NO\"`: Send an `rsvpStatus` of `\"YES\"` or `\"NO\"`.",
" + `\"YES_ONLY\"`: Send an `rsvpStatus` of `\"YES\"`.",
" + `\"OPEN_RSVP_WAITLIST\"`: Send an `rsvpStatus` of `\"WAITING\"`",
" to add a guest to the wait list.",
"",
"",
" When creating an RSVP with `rsvpStatus` of `\"WAITING\"` or `\"NO\"`,",
" the list of `FormValue` objects should",
" only contain items for `\"firstName\"`, `\"lastName\"`, `\"email\"`, and `\"rsvpStatus\"`.",
" No other fields should be passed.",
"",
" When creating an RSVP that adds additional guests, format",
" the guest names for submission in an array where each element is the",
" full name of a guest. ",
"",
" When creating an RSVP that contains an address, the way you format the address information",
" for submission depends on what type of input elements you use to gather that",
" information as follows:",
"",
" + If the address is input using a Wix address input element, no special formatting",
" is needed.",
" + If the address is input using another type of input element, such as a text input,",
" format the input's value in an array.",
" + If the address is input using a number of input elements, each for a different part",
" of the address, format the input values as elements in an array.",
"",
" > **Note:** The frontend Events APIs aren't functional when previewing a site. View a published version of a site to see their complete functionality." ],
"links": [],
"examples": [],
"extra":
{ } },
"extra":
{ } } ],
"callbacks": [],
"messages":
[ { "name": "CreationError",
"locations":
[ { "lineno": 131,
"filename": "dummy.js" } ],
"docs":
{ "summary": "An object representing an error that occurred during an RSVP creation.",
"links":
[ "[createRsvp( )](https://dev.wix.com/docs/velo/api-reference/wix-dummy-frontend/rsvp/create-rsvp)" ],
"examples": [],
"extra":
{ } },
"members":
[ { "name": "message",
"type": "string",
"doc": "Error message." },
{ "name": "errorType",
"type": "string",
"doc": "Error type.\n One of:\n\n + `\"RSVP_CLOSED\"`: Event registration is closed.\n + `\"GUEST_LIMIT_REACHED\"`: The maximum number of guests has already been reached.\n + `\"MEMBER_ALREADY_REGISTERED\"`: The current registrant is already registered as a guest.\n + `\"WAITING_LIST_UNAVAILABLE\"`: The maximum number of guests has already been reached and\n there is no wait list.\n + `\"UNKNOWN_ERROR\"`: Unknown error." } ],
"extra":
{ },
"labels": [] },
{ "name": "FormValue",
"locations":
[ { "lineno": 119,
"filename": "dummy.js" } ],
"docs":
{ "summary": "An object containing information about form values.",
"links":
[ "[checkout( )](wix-dummy-frontend.Tickets.htmlhttps://dev.wix.com/docs/velo/api-reference/wix-events-v2/rsvp/create-rsvp)",
"[createRsvp( )](https://dev.wix.com/docs/velo/api-reference/wix-dummy-frontend/rsvp/create-rsvp)",
"[updateOrder( )](wix-dummy-frontend.Tickets.html#updateOrder)",
"[validate( )](wix-dummy-frontend.Form.html#validate)",
"[validateInput( )](wix-dummy-frontend.Form.html#validateInput)" ],
"examples": [],
"extra":
{ } },
"members":
[ { "name": "name",
"type": "string",
"doc": "Form field name." },
{ "name": "value",
"type": "string",
"doc": "Form field value." } ],
"extra":
{ },
"labels": [] },
{ "name": "Guest",
"locations":
[ { "lineno": 94,
"filename": "dummy.js" } ],
"docs":
{ "summary": "An object representing a guest on an event RSVP.",
"links":
[ "[createRsvp( )](https://dev.wix.com/docs/velo/api-reference/wix-dummy-frontend/rsvp/create-rsvp)" ],
"examples": [],
"extra":
{ } },
"members":
[ { "name": "index",
"type": "number",
"doc": "Index of the guest in the RSVP guest list. Indices are zero-based." },
{ "name": "id",
"type": "number",
"doc": "Guest ID, which is unique within the RSVP." },
{ "name": "fullName",
"type": "string",
"doc": "Full name of the guest." } ],
"extra":
{ },
"labels": [] },
{ "name": "InputValue",
"locations":
[ { "lineno": 110,
"filename": "dummy.js" } ],
"docs":
{ "summary": "An object representing an RSVP input value.",
"links":
[ "[createRsvp( )](https://dev.wix.com/docs/velo/api-reference/wix-dummy-frontend/rsvp/create-rsvp)" ],
"examples": [],
"extra":
{ } },
"members":
[ { "name": "inputName",
"type": "string",
"doc": "Name of the input." },
{ "name": "value",
"type": "string",
"doc": "Value of the input, when there is just 1 value." },
{ "name": "values",
"type":
{ "name": "Array",
"typeParams":
[ "string" ] },
"doc": "Value of the input, when there are multiple values." } ],
"extra":
{ },
"labels": [] },
{ "name": "RsvpForm",
"locations":
[ { "lineno": 103,
"filename": "dummy.js" } ],
"docs":
{ "summary": "An object representing an RSVP form.",
"links":
[ "[createRsvp( )](https://dev.wix.com/docs/velo/api-reference/wix-dummy-frontend/rsvp/create-rsvp)" ],
"examples": [],
"extra":
{ } },
"members":
[ { "name": "inputValues",
"type":
{ "name": "Array",
"typeParams":
[ "wix-dummy-frontend.Rsvp.InputValue" ] },
"doc": "Values that were entered in the RSVP form." } ],
"extra":
{ },
"labels": [] },
{ "name": "RsvpResponse",
"locations":
[ { "lineno": 74,
"filename": "dummy.js" } ],
"docs":
{ "summary": "An object representing a response to creating an RSVP.",
"links":
[ "[createRsvp( )](https://dev.wix.com/docs/velo/api-reference/wix-dummy-frontend/rsvp/create-rsvp)" ],
"examples": [],
"extra":
{ } },
"members":
[ { "name": "id",
"type": "string",
"doc": "RSVP ID" },
{ "name": "anonymized",
"type": "boolean",
"doc": "Whether the guest's personal information has been removed." },
{ "name": "contactId",
"type": "string",
"doc": "Contact ID of the guest who created the RSVP." },
{ "name": "createdDate",
"type": "Date",
"doc": "Date when the RSVP was created." },
{ "name": "email",
"type": "string",
"doc": "Email address to the guest who created the RSVP." },
{ "name": "eventId",
"type": "string",
"doc": "ID of the event the RSVP is for." },
{ "name": "firstName",
"type": "string",
"doc": "First name of the guest who created the RSVP." },
{ "name": "lastName",
"type": "string",
"doc": "Last name of the guest who created the RSVP." },
{ "name": "guests",
"type":
{ "name": "Array",
"typeParams":
[ "wix-dummy-frontend.RsvpForm.Guest" ] },
"doc": "All of the guests included in the RSVP." },
{ "name": "rsvpForm",
"type": "wix-dummy-frontend.RsvpForm.RsvpForm",
"doc": "A representation of the RSVP form that was created." },
{ "name": "memberId",
"type": "string",
"doc": "Member ID of the guest who created the RSVP form if the guest is a site member." },
{ "name": "updatedDate",
"type": "Date",
"doc": "Date when RSVP was last modified." },
{ "name": "status",
"type": "string",
"doc": "RSVP status." },
{ "name": "totalGuests",
"type": "number",
"doc": "Total number of guests included in the RSVP." } ],
"extra":
{ },
"labels": [] } ],
"extra":
{ } }