Mutations
37 root mutations.
createAppCreate an app owned by the viewer. The handle is global and permanent; thesessionsCLI creates one fromsessions.app.jsonon first push.updateAppRename or describe an app the viewer owns, or set its icon to an uploaded image.deleteAppDelete an app the viewer owns. Every business that installed it stops rendering its extensions.createAppExtensionAdd an extension to an app the viewer owns.updateAppExtensiondeleteAppExtensionpushAppExtensionVersionUpload a new version of an extension: one bundled ES module per target it renders into, each with its live query. Creates a draft;publishit to make businesses run it.publishAppExtensionVersionMake a pushed version the one businesses run.createDeveloperAccessTokenMint a CLI credential for the viewer. The secret is returned once.revokeDeveloperAccessTokencheckoutPrice a basket, mint the order, and — when money is owed — the PaymentIntent to pay for it. The single entry point for booking a session, buying a product, booking an appointment time, or entering a team or individual into a league: one mutation, any mix of items, one order.completePurchaseFulfill a minted purchase once its payment has been confirmed: books the sessions, mints the entitlements, spends the credits, and records how the order was funded, all in one transaction.collectPurchaseBalanceCollect what a deferred order still owes.cancelBookingCancel a booking and, under the activity's cancellation policy, return the money and the credits it consumed.Booking.cancellationPreviewsays what this will do before it is called.changeBookingSpotMove the viewer's own confirmed booking to another free spot on the same session — a different bike, mat or seat.rescheduleBookingMove the viewer's own appointment or rental to another open time of the same activity. The booking keeps its length, its practitioner and everything it was paid with: nothing is charged and nothing is refunded.respondToBookingAttendanceSay whether the viewer's booking is still on — the answer to a reminder's "I'll be there" and "Can't make it" buttons. Answering again replaces the previous answer.cancelBookingSeatsCancel some of a party's places and keep the rest of the booking.shareTicketHand one ticket of an order to somebody in the party: returns a link that opens that ticket alone, with its own check-in code, to whoever holds it.stopSharingTicketTurn a ticket's share link off. The link stops opening at once; sharing the ticket again mints a new one. The booker's alone to call.sendTicketSend one ticket to somebody by email. They get an email with the ticket's link; when the address belongs to a Sessions account, the ticket is also saved to it, so it shows among their tickets right away. The answer is the same either way, so it never says whether an address has an account. A ticket goes to one person: sending it stops any link already out for it, unless that link went to the same account. The booker's alone to call.addBookingSeatsAddseatsmore places to a party's booking — more people are coming.joinBookingWaitlistJoin the queue for a full session. Writes awaitlistedbooking with no order behind it — nothing is charged until a place is offered and accepted, which is why this is notcheckout.acceptBookingOfferAccept an offered place. Re-enters checkout for the amount owed, so the result carries aCheckoutSessionexactly ascheckoutdoes; the existing waitlisted booking is confirmed rather than a second one inserted beside it.createAccountRequest an email containing a 6-digit code to confirm a new account. Always returns success regardless of whether the email is already in use (anti-enumeration). If an account already exists for the email, a sign-in code is sent instead.signInRequest a sign-in email containing a 6-digit code. Always returns success regardless of whether the email matches an existing account (anti-enumeration).redeemAuthCode→ SignInResult!Redeem a 6-digit auth code and sign the user in. Returns the created or signed-in user, the JWT token, and the redirect URL stored on the code. Sets the auth cookie on success — except for codes that were issued with abusinesspin, which return a business-scoped token without touching the cookie session.confirmSocialSignUp→ SignInResult!Create the account a social sign-in stopped short of creating, and sign in as it.tokenis the pending sign-up handed to a popup opener; omit it and the pending cookie is used instead (the popup-blocked flow, which has no opener to hand anything to).nameis the viewer's chosen display name, falling back to whatever the provider shared.cancelSocialSignUpDiscard a pending social sign-up without creating anything. Clears the pending cookie so a later page load doesn't ask again.signOutClear the auth cookie and sign out the current user.refreshSessionExchange a native app's session token for a fresh one. The token a sign-in returns stops being accepted after 15 minutes; send it here — expired or not, and without anAuthorizationheader — and use the returnedtokenfrom then on. Renews and rotates by the same rules as theauthcookie: each token renews once, and presenting one the session has already moved past signs that session out everywhere. Refused once the session is signed out, revoked, or unused for 30 days; the app should then sign out.enterWaitingRoomThe way into a high-demand session's waiting room.createBankDebitMandateSetupMint a SetupIntent on the business's connected account so the buyer can authorize a bank-debit mandate before the membership they're paying for exists.addFavoriteAdd a business, staff member (instructor), or activity to the authenticated user's favorites. Idempotent — adding an existing favorite is a no-op.removeFavoriteRemove a business, staff member, or activity from the authenticated user's favorites. Idempotent — removing a favorite that isn't set is a no-op.setMyEmailMarketingConsentSet the signed-in viewer's own email-marketing consent for a business they participate in.grantrecords an affirmative opt-in and freezes the compliant disclosure the viewer was shown (only allowed while the business is collecting consent);withdrawunsubscribes. Recorded as an immutable ledger event withsource = participant.setMySmsReminderConsentAgree to, or stop, a business texting the viewer session reminders — the "Text me reminders" box at checkout, written once the booking lands, the waysetMyEmailMarketingConsentis.phone(as typed) sets the number first; it is saved to the account too when the account has none. A grant freezes the disclosure the viewer was shown into the consent ledger. Refused for a grant with no number.