1.2.0 • Published 2 years ago
@gymlib/mindbody-fetcher v1.2.0
Node.js wrapper for the MINDBODY Public API
How to use?
Global fetcher
import MboFetcher from "mindbody-fetcher";
const mboFetcher = new MboFetcher({
apiKey: "apiKey",
siteId: "siteId",
});
const response = await mboFetcher.clientFetcher.getClients(
{ SearchText: "olivier@gymlib.com" },
token
);
console.log(response.data.Clients);
Every request with global fetcher will share the same axios instance.
Endpoint specific fetcher
import { ClientFetcher } from "mindbody-fetcher";
const clientFetcher = new ClientFetcher({
apiKey: "apiKey",
siteId: "siteId",
});
const response = await clientFetcher.getClients(
{ SearchText: "olivier@gymlib.com" },
token
);
console.log(response.data.Clients);
TODO
Not all endpoints are implemented. Feel free to implement the missing endpoints.
- Appointment
- ActiveSessionTimes
- AppointmentAddOns
- AppointmentAvailableDates
- AppointmentOptions
- BookableItems
- ScheduleItems
- StaffAppointments
- AddAppointment
- AddAppointmentAddOn
- UpdateAppointment
- AppointmentAddOn
- Class
- Classes
- ClassDescriptions
- ClassSchedules
- ClassVisits
- WaitListEntries
- AddClientToClass
- RemoveClientFromClass
- RemoveClientsFromClasses
- RemoveFromWaitlist
- SubstituteClassTeacher
- Client
- ActiveClientMemberships
- ActiveClientsMemberships
- ClientAccountBalances
- ContactLogs
- ClientContracts
- ClientDirectDebitInfo
- ClientDuplicates
- ClientFormulaNotes
- ClientIndexes
- ClientPurchases
- ClientReferralTypes
- ClientRewards
- Clients
- ClientCompleteInfo
- ClientServices
- ClientVisits
- ClientSchedule
- CrossRegionalClientAssociations
- CustomClientFields
- RequiredClientFields
- ContactLogTypes
- AddArrival
- AddClient
- AddClientDirectDebitInfo
- AddClientFormulaNote
- AddContactLog
- SendAutoEmail
- SendPasswordResetEmail
- UpdateClient
- UpdateClientRewards
- UpdateClientService
- UpdateClientVisit
- UpdateContactLog
- UploadClientDocument
- UploadClientPhoto
- ClientDirectDebitInfo
- ClientFormulaNote
- ContactLog
- Enrollment
- Enrollments
- AddClientToEnrollment
- Payroll
- Commissions
- ScheduledServiceEarnings
- TimeCards
- Tips
- Sale
- AcceptedCardTypes
- Contracts
- CustomPaymentMethods
- GiftCardBalance
- GiftCards
- Packages
- Products
- ProductsInventory
- Sales
- Services
- Transactions
- CheckoutShoppingCart
- PurchaseAccountCredit
- PurchaseContract
- PurchaseGiftCard
- UpdateProductPrice
- Products (PUT)
- Services (PUT)
- SaleDate (PUT)
- Site
- ActivationCode
- Genders
- Locations
- Memberships
- Programs
- PromoCodes
- Resources
- SessionTypes
- Sites
- Categories
- PaymentTypes
- AddPromoCode
- Relationships
- Staff
- Staff
- StaffPermissions
- StaffImageURL
- StaffSessionTypes
- SalesReps
- AddStaff
- AddStaffAvailability
- AssignStaffSessionType
- UpdateStaff
- UpdateStaffPermissions
Shared Resources
Not all shared resources are implemented. Feel free to implement the missings resources.
- ApplicableItems
- Appointment
- AssignedClientIndex
- Availability
- Category
- Class
- ClassDescription
- ClassSchedule
- Client
- ClientCreditCard
- ClientMemberships
- ClientMembership
- ClientRelationship
- ClientService
- ClientArrival
- ContactLogType
- Contract
- Course
- Discount
- Location
- Membership
- Package
- PaymentType
- PermissionValues
- Product
- ProductsInventory
- Program
- Relationship
- Resource
- SalesRep
- Sale
- Service
- SessionType
- Site
- Staff
- SubCategory
- Transaction
- Unavailability
- UpcomingAutopayEvent
- Visit