Add Activepieces integration for workflow automation
- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"extends": [
|
||||
"../../../../.eslintrc.base.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-zoho-bookings
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-zoho-bookings` to build the library.
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@activepieces/piece-zoho-bookings",
|
||||
"version": "0.0.2",
|
||||
"type": "commonjs",
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "pieces-zoho-bookings",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/zoho-bookings/src",
|
||||
"projectType": "library",
|
||||
"release": {
|
||||
"version": {
|
||||
"manifestRootsToUpdate": [
|
||||
"dist/{projectRoot}"
|
||||
],
|
||||
"currentVersionResolver": "git-tag",
|
||||
"fallbackCurrentVersionResolver": "disk"
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/zoho-bookings",
|
||||
"tsConfig": "packages/pieces/community/zoho-bookings/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/zoho-bookings/package.json",
|
||||
"main": "packages/pieces/community/zoho-bookings/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/zoho-bookings/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/zoho-bookings/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"nx-release-publish": {
|
||||
"options": {
|
||||
"packageRoot": "dist/{projectRoot}"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/zoho-bookings",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.": "Zoho Buchungen ist eine Terminplanungssoftware für die Verwaltung von Buchungen, Dienstleistungen und Kundenterminen.",
|
||||
"Data Center": "Rechenzentrum",
|
||||
"The data center location of your Zoho Bookings account": "Der Standort des Rechenzentrums Ihres Zoho Bookings Kontos",
|
||||
"zoho.com (United States)": "zoho.com (Vereinigte Staaten)",
|
||||
"zoho.eu (Europe)": "zoho.eu (Europa)",
|
||||
"zoho.in (India)": "zoho.in (Indien)",
|
||||
"zoho.com.au (Australia)": "zoho.com.au (Australien)",
|
||||
"zoho.jp (Japan)": "zoho.jp (Japan)",
|
||||
"zoho.com.cn (China)": "zoho.com.cn (China)",
|
||||
"Connect your Zoho Bookings account using OAuth2": "Verbinden Sie Ihr Zoho Bookings Konto mit OAuth2",
|
||||
"Book Appointment": "Buch-Termin",
|
||||
"Reschedule Appointment": "Termin neu planen",
|
||||
"Fetch Availability": "Verfügbarkeit abrufen",
|
||||
"Get Appointment Details": "Details zum Termin abrufen",
|
||||
"Cancel Appointment": "Termin abbrechen",
|
||||
"Book an appointment for a customer for a desired service": "Buchen Sie einen Termin für einen Kunden für einen gewünschten Service",
|
||||
"Reschedule an appointment to a different time or to a different staff": "Termin auf eine andere Zeit oder ein anderes Personal umstellen",
|
||||
"Fetch availability of appointments across services": "Abrufen der Verfügbarkeit von Terminen über Services hinweg",
|
||||
"Get details of an appointment using its booking ID": "Erhalten Sie Details zu einem Termin mit der Buchungsnummer",
|
||||
"Update the status of a booking (cancel, complete, or mark as no-show)": "Aktualisiere den Status einer Buchung (Stornieren, Vollständig oder als No-Show markieren)",
|
||||
"Workspace": "Arbeitsbereich",
|
||||
"Service": "Service",
|
||||
"Staff": "Mitarbeiter",
|
||||
"Resource": "Ressource",
|
||||
"Group ID": "Gruppen-ID",
|
||||
"From Time": "Von Zeit",
|
||||
"To Time": "Zur Zeit",
|
||||
"Timezone": "Timezone",
|
||||
"Customer Name": "Kundenname",
|
||||
"Customer Email": "Kunden-E-Mail",
|
||||
"Customer Phone": "Kunden-Telefon",
|
||||
"Notes": "Notizen",
|
||||
"Additional Fields": "Zusätzliche Felder",
|
||||
"Cost Paid": "Bezahlte Kosten",
|
||||
"Appointment": "Termin",
|
||||
"Service (Optional)": "Service (optional)",
|
||||
"New Start Time": "Neue Startzeit",
|
||||
"Selected Date": "Ausgewähltes Datum",
|
||||
"Select the workspace for the appointment": "Wählen Sie den Arbeitsbereich für den Termin",
|
||||
"Select the service for which the appointment is booked": "Wählen Sie den Service, für den der Termin gebucht wird",
|
||||
"Select the staff member (use this OR resource_id OR group_id)": "Personalmitglied auswählen (verwenden Sie diese OR resource_id OR group_id)",
|
||||
"Select the resource (use this OR staff_id OR group_id)": "Wählen Sie die Ressource (verwenden Sie diese OR staff_id OR group_id)",
|
||||
"The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)": "Die eindeutige ID der Personalgruppe für die kollektive Buchung (verwenden Sie diese OR staff_id OR resource_id)",
|
||||
"The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "Die Startzeit für den Termin (Format: mm-dd-yyyy HH:mm:ss)",
|
||||
"End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)": "Endzeit für die Buchung von Ressourcen (optional, Format: tt-MMM-yyyy HH:mm:ss)",
|
||||
"The timezone for the appointment (optional)": "Die Zeitzone für den Termin (optional)",
|
||||
"Name of the customer": "Name des Kunden",
|
||||
"Email address of the customer": "E-Mail-Adresse des Kunden",
|
||||
"Phone number of the customer": "Telefonnummer des Kunden",
|
||||
"Additional information about the appointment (optional)": "Weitere Informationen über den Termin (optional)",
|
||||
"Additional customer details as JSON object (optional)": "Zusätzliche Kundendetails als JSON-Objekt (optional)",
|
||||
"Amount paid for the booking (optional)": "Bezahlter Betrag für die Buchung (optional)",
|
||||
"Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Beginn des Datumsbereichs, mit dem bestehende Buchungen abgerufen werden können (um Ihnen dabei zu helfen, die Buchungsnummer zu verschieben). Nicht an die Neuvorlage API gesendet. Format: dd-MMM-yyyy HH:mm:ss",
|
||||
"End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Ende des Datumsbereichs, der zum Abrufen bestehender Buchungen verwendet wird (optional). Nicht an die neu festgelegte API gesendet. Format: tt-MMM-yyyy HH:mm:ss",
|
||||
"Select the appointment to get details for": "Wählen Sie den Termin, um Details zu erhalten",
|
||||
"Select service to filter staff options": "Dienst auswählen, um Personaloptionen zu filtern",
|
||||
"Select the staff to reschedule to (use this OR group_id OR start_time)": "Wählen Sie das Team aus (verwenden Sie diese OR group_id OR start_time)",
|
||||
"The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)": "Die eindeutige ID der Personalgruppe, auf die umgestellt werden soll (verwenden Sie diese OR staff_id OR start_time)",
|
||||
"The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)": "Die neue Zeit, um den Termin neu zu planen (Format: dd-MMM-yyyy HH:mm:ss, benutze diese OR staff_id OR group_id)",
|
||||
"Select the workspace to fetch availability for": "Wählen Sie den Arbeitsbereich zum Abrufen der Verfügbarkeit für",
|
||||
"Select the service for which availability is to be fetched": "Wählen Sie den Service, für den die Verfügbarkeit abgerufen werden soll",
|
||||
"Select the staff member (use this OR group_id OR resource_id)": "Personalmitglied auswählen (verwenden Sie diese OR group_id OR resource_id)",
|
||||
"The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)": "Die eindeutige ID der dem Dienst zugeordneten Personal-Gruppe (verwenden Sie diese OR staff_id OR resource_id)",
|
||||
"The date on which services are checked for availability (format: mm-dd-yyyy)": "Das Datum, an dem Dienste auf Verfügbarkeit überprüft werden (Format: mm-dd-yyyyy)",
|
||||
"The start time of the appointment (in ISO 8601 format)": "Die Anfangszeit des Termins (im ISO 8601-Format)",
|
||||
"The end time of the appointment (in ISO 8601 format)": "Die Endzeit des Termins (im ISO 8601-Format)",
|
||||
"The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "Die Endzeit des Termins (Format: mm-dd-yyyy HH:mm:ss)"
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.": "Reservas Zoho es un software de programación de citas para la gestión de reservas, servicios y citas de clientes.",
|
||||
"Data Center": "Centro de Datos",
|
||||
"The data center location of your Zoho Bookings account": "La ubicación del centro de datos de su cuenta de reservas Zoho",
|
||||
"zoho.com (United States)": "zoho.com (Estados Unidos)",
|
||||
"zoho.eu (Europe)": "zoho.eu (Europa)",
|
||||
"zoho.in (India)": "zoho.in (India)",
|
||||
"zoho.com.au (Australia)": "zoho.com.au (Tamaño)",
|
||||
"zoho.jp (Japan)": "zoho.jp (Japón)",
|
||||
"zoho.com.cn (China)": "zoho.com.cn (China)",
|
||||
"Connect your Zoho Bookings account using OAuth2": "Conecte su cuenta de reservas de Zoho usando OAuth2",
|
||||
"Book Appointment": "Cita del libro",
|
||||
"Reschedule Appointment": "Reprogramar cita",
|
||||
"Fetch Availability": "Obtener disponibilidad",
|
||||
"Get Appointment Details": "Obtener detalles de citas",
|
||||
"Cancel Appointment": "Cancelar cita",
|
||||
"Book an appointment for a customer for a desired service": "Reserve una cita para un cliente para un servicio deseado",
|
||||
"Reschedule an appointment to a different time or to a different staff": "Reprogramar una cita a un tiempo diferente o a un personal diferente",
|
||||
"Fetch availability of appointments across services": "Obtener disponibilidad de citas a través de servicios",
|
||||
"Get details of an appointment using its booking ID": "Obtener detalles de una cita usando su ID de reserva",
|
||||
"Update the status of a booking (cancel, complete, or mark as no-show)": "Actualizar el estado de una reserva (cancelar, completar o marcar como no mostrar)",
|
||||
"Workspace": "Espacio de trabajo",
|
||||
"Service": "Servicio",
|
||||
"Staff": "Personal",
|
||||
"Resource": "Recurso",
|
||||
"Group ID": "ID de grupo",
|
||||
"From Time": "Desde tiempo",
|
||||
"To Time": "Hacia",
|
||||
"Timezone": "Timezone",
|
||||
"Customer Name": "Nombre del cliente",
|
||||
"Customer Email": "Email del cliente",
|
||||
"Customer Phone": "Teléfono cliente",
|
||||
"Notes": "Notas",
|
||||
"Additional Fields": "Campos adicionales",
|
||||
"Cost Paid": "Coste pagado",
|
||||
"Appointment": "Cita",
|
||||
"Service (Optional)": "Servicio (opcional)",
|
||||
"New Start Time": "Nueva hora de inicio",
|
||||
"Selected Date": "Fecha seleccionada",
|
||||
"Select the workspace for the appointment": "Seleccione el área de trabajo para la cita",
|
||||
"Select the service for which the appointment is booked": "Seleccione el servicio para el que se ha reservado la cita",
|
||||
"Select the staff member (use this OR resource_id OR group_id)": "Seleccione el miembro del personal (use este O resource_id OR group_id)",
|
||||
"Select the resource (use this OR staff_id OR group_id)": "Seleccione el recurso (utilice este id de personal O grupo_id)",
|
||||
"The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)": "El ID único del grupo de personal para la reserva colectiva (utilice este id de personal O resource_id)",
|
||||
"The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "Hora de inicio de la cita (formato: mm-dd-aaaa HH:mm:ss)",
|
||||
"End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)": "Hora de finalización de la reserva de recursos (opcional, formato: dd-MMM-aaaaa HH:mm:ss)",
|
||||
"The timezone for the appointment (optional)": "La zona horaria para la cita (opcional)",
|
||||
"Name of the customer": "Nombre del cliente",
|
||||
"Email address of the customer": "Dirección de correo electrónico del cliente",
|
||||
"Phone number of the customer": "Número de teléfono del cliente",
|
||||
"Additional information about the appointment (optional)": "Información adicional sobre la cita (opcional)",
|
||||
"Additional customer details as JSON object (optional)": "Detalles adicionales del cliente como objeto JSON (opcional)",
|
||||
"Amount paid for the booking (optional)": "Importe pagado por la reserva (opcional)",
|
||||
"Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Inicio del rango de fechas utilizado para obtener reservas existentes (para ayudarle a seleccionar el ID de reserva para reprogramar). No enviado a la API de reprogramación. Formato: dd-MMM-aaaaa HH:mm:ss",
|
||||
"End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Fin del rango de fechas utilizado para obtener los libros existentes (opcional). No enviado a la API de reprogramación. Formato: dd-MMM-aaaa HH:mm:(debate)",
|
||||
"Select the appointment to get details for": "Seleccione la cita para obtener detalles de",
|
||||
"Select service to filter staff options": "Seleccionar servicio para filtrar las opciones del personal",
|
||||
"Select the staff to reschedule to (use this OR group_id OR start_time)": "Seleccione el personal al que reprogramar (utilice este grupo OR o start_time)",
|
||||
"The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)": "El ID único del grupo del personal al que reprogramar (utilice este id de personal OR o start_time)",
|
||||
"The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)": "La nueva hora para reprogramar la cita a (formato: dd-MMM-aaaa HH:mm:ss, utilice este O personal_id O grupo_id)",
|
||||
"Select the workspace to fetch availability for": "Seleccione el área de trabajo para obtener disponibilidad para",
|
||||
"Select the service for which availability is to be fetched": "Seleccione el servicio para el que se obtendrá la disponibilidad",
|
||||
"Select the staff member (use this OR group_id OR resource_id)": "Seleccione el miembro del personal (utilice este id de grupo OR o resource_id)",
|
||||
"The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)": "El ID único del grupo de personal asociado con el servicio (utilice este id de personal OR o resource_id)",
|
||||
"The date on which services are checked for availability (format: mm-dd-yyyy)": "La fecha en la que se comprueba la disponibilidad (formato: mm-dd-aaaa)",
|
||||
"The start time of the appointment (in ISO 8601 format)": "La hora de inicio de la cita (en formato ISO 8601)",
|
||||
"The end time of the appointment (in ISO 8601 format)": "La hora de fin de la cita (en formato ISO 8601)",
|
||||
"The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "Tiempo de finalización de la cita (formato: mm-dd-aaaa HH:mm:ss)"
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.": "Zoho Réservations est un logiciel de rendez-vous pour la gestion des réservations, des services et des rendez-vous clients.",
|
||||
"Data Center": "Centre de données",
|
||||
"The data center location of your Zoho Bookings account": "L'emplacement du centre de données de votre compte Zoho Bookings",
|
||||
"zoho.com (United States)": "zoho.com (États-Unis)",
|
||||
"zoho.eu (Europe)": "zoho.eu (Europe)",
|
||||
"zoho.in (India)": "zoho.in (Inde)",
|
||||
"zoho.com.au (Australia)": "zoho.com.au (Australie)",
|
||||
"zoho.jp (Japan)": "zoho.jp (Japon)",
|
||||
"zoho.com.cn (China)": "zoho.com.cn (Chine)",
|
||||
"Connect your Zoho Bookings account using OAuth2": "Connectez votre compte Zoho Bookings avec OAuth2",
|
||||
"Book Appointment": "Rendez-vous",
|
||||
"Reschedule Appointment": "Replanifier le rendez-vous",
|
||||
"Fetch Availability": "Récupérer la disponibilité",
|
||||
"Get Appointment Details": "Obtenir les détails du rendez-vous",
|
||||
"Cancel Appointment": "Annuler le rendez-vous",
|
||||
"Book an appointment for a customer for a desired service": "Prendre un rendez-vous pour un client pour un service souhaité",
|
||||
"Reschedule an appointment to a different time or to a different staff": "Replanifier un rendez-vous à une heure différente ou à un autre personnel",
|
||||
"Fetch availability of appointments across services": "Récupérer la disponibilité des rendez-vous à travers les services",
|
||||
"Get details of an appointment using its booking ID": "Obtenir les détails d'un rendez-vous en utilisant son ID de réservation",
|
||||
"Update the status of a booking (cancel, complete, or mark as no-show)": "Mettre à jour le statut d'une réservation (annuler, compléter ou marquer comme no-show)",
|
||||
"Workspace": "Espace de travail",
|
||||
"Service": "Service",
|
||||
"Staff": "Employé",
|
||||
"Resource": "Ressource",
|
||||
"Group ID": "ID du groupe",
|
||||
"From Time": "À partir de l'heure",
|
||||
"To Time": "Jusqu'au moment",
|
||||
"Timezone": "Fuseau horaire",
|
||||
"Customer Name": "Nom du client",
|
||||
"Customer Email": "E-mail du client",
|
||||
"Customer Phone": "Téléphone du client",
|
||||
"Notes": "Notes",
|
||||
"Additional Fields": "Champs supplémentaires",
|
||||
"Cost Paid": "Coût payé",
|
||||
"Appointment": "Rendez-vous",
|
||||
"Service (Optional)": "Service (facultatif)",
|
||||
"New Start Time": "Nouvelle heure de début",
|
||||
"Selected Date": "Date sélectionnée",
|
||||
"Select the workspace for the appointment": "Sélectionnez l'espace de travail pour le rendez-vous",
|
||||
"Select the service for which the appointment is booked": "Sélectionnez le service pour lequel le rendez-vous est réservé",
|
||||
"Select the staff member (use this OR resource_id OR group_id)": "Sélectionnez le membre du staff (utilisez ceci OU resource_id OU group_id)",
|
||||
"Select the resource (use this OR staff_id OR group_id)": "Sélectionnez la ressource (utilisez OU staff_id OU group_id)",
|
||||
"The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)": "L'ID unique du groupe du personnel pour la réservation collective (utilisez OU staff_id OU resource_id)",
|
||||
"The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "L'heure de début du rendez-vous (format: mm-jj-aaaa HH:mm:ss)",
|
||||
"End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)": "Heure de fin de la réservation des ressources (optionnel, format: dd-MMM-yyyy HH:mm:ss)",
|
||||
"The timezone for the appointment (optional)": "Le fuseau horaire du rendez-vous (facultatif)",
|
||||
"Name of the customer": "Nom du client",
|
||||
"Email address of the customer": "Adresse e-mail du client",
|
||||
"Phone number of the customer": "Numéro de téléphone du client",
|
||||
"Additional information about the appointment (optional)": "Informations complémentaires sur le rendez-vous (facultatif)",
|
||||
"Additional customer details as JSON object (optional)": "Détails client supplémentaires en tant qu'objet JSON (facultatif)",
|
||||
"Amount paid for the booking (optional)": "Montant payé pour la réservation (facultatif)",
|
||||
"Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Début de la plage de dates utilisée pour récupérer les réservations existantes (pour vous aider à sélectionner l'ID de réservation à reprogrammer). Non envoyé à l'API de replanification. Format: dd-MMM-yyyy HH:mm:ss",
|
||||
"End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Fin de la plage de dates utilisée pour récupérer les réservations existantes (facultatif). Pas envoyé à l'API de replanification. Format: dd-MMM-yyyy HHH:mm:ss",
|
||||
"Select the appointment to get details for": "Sélectionnez le rendez-vous pour obtenir les détails pour",
|
||||
"Select service to filter staff options": "Sélectionnez le service pour filtrer les options du personnel",
|
||||
"Select the staff to reschedule to (use this OR group_id OR start_time)": "Sélectionnez le staff à reprogrammer (utilisez ce groupe_id OU l'heure de début)",
|
||||
"The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)": "L'ID unique du groupe du personnel à reprogrammer (utilisez OU staff_id OU start_time)",
|
||||
"The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)": "La nouvelle heure pour reprogrammer le rendez-vous (format: dd-MMM-yyyy HH:mm:ss, utilisez ceci OU staff_id OU group_id)",
|
||||
"Select the workspace to fetch availability for": "Sélectionnez l'espace de travail pour lequel récupérer la disponibilité",
|
||||
"Select the service for which availability is to be fetched": "Sélectionnez le service pour lequel la disponibilité doit être récupérée",
|
||||
"Select the staff member (use this OR group_id OR resource_id)": "Sélectionnez le membre du staff (utilisez ceci OU group_id OU resource_id)",
|
||||
"The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)": "L'ID unique du groupe de personnel associé au service (utiliser OR staff_id OR resource_id)",
|
||||
"The date on which services are checked for availability (format: mm-dd-yyyy)": "La date à laquelle les services sont vérifiés pour la disponibilité (format : mm-jj-aaaa)",
|
||||
"The start time of the appointment (in ISO 8601 format)": "L'heure de début du rendez-vous (au format ISO 8601)",
|
||||
"The end time of the appointment (in ISO 8601 format)": "L'heure de fin du rendez-vous (au format ISO 8601)",
|
||||
"The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "L'heure de fin du rendez-vous (format: mm-jj-aaaa HH:mm:ss)"
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.": "Zoho Bookings は、予約、サービス、および顧客予約を管理するための予約スケジューリングソフトウェアです。",
|
||||
"Data Center": "データセンター",
|
||||
"The data center location of your Zoho Bookings account": "Zoho 予約アカウントのデータセンターの場所",
|
||||
"zoho.com (United States)": "zoho.com (アメリカ合衆国)",
|
||||
"zoho.eu (Europe)": "zoho.eu (ヨーロッパ)",
|
||||
"zoho.in (India)": "zoho.in (インド)",
|
||||
"zoho.com.au (Australia)": "zoho.com.au (オーストラリア)",
|
||||
"zoho.jp (Japan)": "zoho.jp (日本)",
|
||||
"zoho.com.cn (China)": "zoho.com.cn (中国)",
|
||||
"Connect your Zoho Bookings account using OAuth2": "OAuth2を使用してZoho予約アカウントを接続してください",
|
||||
"Book Appointment": "予約する",
|
||||
"Reschedule Appointment": "予定の再スケジュール",
|
||||
"Fetch Availability": "入手可能性を取得",
|
||||
"Get Appointment Details": "予約の詳細を取得",
|
||||
"Cancel Appointment": "予約をキャンセル",
|
||||
"Book an appointment for a customer for a desired service": "ご希望のサービスのために顧客の予約を予約する",
|
||||
"Reschedule an appointment to a different time or to a different staff": "別の時間または別のスタッフに予定を変更する",
|
||||
"Fetch availability of appointments across services": "サービス間の予定の利用可能性を取得",
|
||||
"Get details of an appointment using its booking ID": "予約IDを使用して予約の詳細を取得する",
|
||||
"Update the status of a booking (cancel, complete, or mark as no-show)": "予約のステータスを更新します (キャンセル、完了、または非表示としてマーク)",
|
||||
"Workspace": "ワークスペース",
|
||||
"Service": "サービス",
|
||||
"Staff": "スタッフ",
|
||||
"Resource": "リソース",
|
||||
"Group ID": "グループID",
|
||||
"From Time": "開始時刻",
|
||||
"To Time": "時間まで",
|
||||
"Timezone": "Timezone",
|
||||
"Customer Name": "顧客名",
|
||||
"Customer Email": "顧客のメールアドレス",
|
||||
"Customer Phone": "お客様電話番号",
|
||||
"Notes": "メモ",
|
||||
"Additional Fields": "追加項目",
|
||||
"Cost Paid": "支払額",
|
||||
"Appointment": "予約",
|
||||
"Service (Optional)": "サービス(任意)",
|
||||
"New Start Time": "新しい開始時刻",
|
||||
"Selected Date": "選択された日付",
|
||||
"Select the workspace for the appointment": "予定のワークスペースを選択してください",
|
||||
"Select the service for which the appointment is booked": "予約サービスを選択してください",
|
||||
"Select the staff member (use this OR resource_id OR group_id)": "スタッフメンバーを選択してください (この OR resource_id OR group_id を使用してください)",
|
||||
"Select the resource (use this OR staff_id OR group_id)": "リソースを選択してください (この OR スタッフID OR group_id を使用してください)",
|
||||
"The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)": "グループ予約に使用するスタッフグループの固有のID(この OR staff_id または resource_id を使用)",
|
||||
"The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "予定の開始時刻 (フォーマット: mm-dd-yyyy)",
|
||||
"End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)": "リソース予約の終了時間 (オプション、フォーマット: dd-MMM-yyyyy HH:mm:ss)",
|
||||
"The timezone for the appointment (optional)": "予約のタイムゾーン (オプション)",
|
||||
"Name of the customer": "顧客の名前",
|
||||
"Email address of the customer": "顧客のメールアドレス",
|
||||
"Phone number of the customer": "お客様の電話番号",
|
||||
"Additional information about the appointment (optional)": "予約に関する追加情報 (オプション)",
|
||||
"Additional customer details as JSON object (optional)": "JSONオブジェクトとしての追加の顧客詳細(任意)",
|
||||
"Amount paid for the booking (optional)": "予約で支払われた金額 (オプション)",
|
||||
"Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "既存の予約の取得に使用される日付の範囲の開始 (スケジュールを変更する予約 ID を選択するのに役立ちます)。 リスケジュールされた API に送信されません。フォーマット: dd-MM-yyyy-HHH:mm:ss",
|
||||
"End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "既存の予約の取得に使用する日付範囲の終了 (オプション) リスケジュールAPIに送信されません。フォーマット: dd-MM-yyyyy HHH:mm:ss",
|
||||
"Select the appointment to get details for": "詳細を取得する予約を選択してください",
|
||||
"Select service to filter staff options": "スタッフオプションをフィルターするサービスを選択",
|
||||
"Select the staff to reschedule to (use this OR group_id OR start_time)": "スケジュールを変更するスタッフを選択します (この OR group_id OR start_timeを使用してください)",
|
||||
"The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)": "スケジュールを変更するスタッフグループの固有の ID (この OR スタッフID または start_time) を指定します。",
|
||||
"The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)": "予定を変更する新しい時間 (フォーマット:dd-MM-yyyy-HH:mm:ss、この OR staff_id または group_id)",
|
||||
"Select the workspace to fetch availability for": "利用可能なワークスペースを選択してください",
|
||||
"Select the service for which availability is to be fetched": "取得する可用性のサービスを選択してください",
|
||||
"Select the staff member (use this OR group_id OR resource_id)": "スタッフメンバーを選択します (この OR group_id または resource_id を使用してください)",
|
||||
"The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)": "サービスに関連付けられたスタッフグループの固有のID(この OR スタッフID OR resource_id または resource_id を使用)",
|
||||
"The date on which services are checked for availability (format: mm-dd-yyyy)": "サービスが利用可能かどうかをチェックする日時 (フォーマット: mm-dd-yyyy)",
|
||||
"The start time of the appointment (in ISO 8601 format)": "任命の開始時刻 (ISO 8601形式)",
|
||||
"The end time of the appointment (in ISO 8601 format)": "予約の終了時刻 (ISO 8601形式)",
|
||||
"The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "予定の終了時刻 (フォーマット: mm-dd-yyyy)"
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.": "Zoho Boekingen is een afspraak planner software voor het beheren van boekingen, diensten en klantafspraken.",
|
||||
"Data Center": "Struik centrum",
|
||||
"The data center location of your Zoho Bookings account": "De locatie van het datacentrum van je Zoho boekingsaccount",
|
||||
"zoho.com (United States)": "zoho.com (Verenigde Staten)",
|
||||
"zoho.eu (Europe)": "zoho.eu (Europa)",
|
||||
"zoho.in (India)": "zoho.in (India)",
|
||||
"zoho.com.au (Australia)": "zoho.com.au (Australia)",
|
||||
"zoho.jp (Japan)": "zoho.jp (Japan)",
|
||||
"zoho.com.cn (China)": "zoho.com.cn (China)",
|
||||
"Connect your Zoho Bookings account using OAuth2": "Verbind je Zoho boekingsaccount met OAuth2",
|
||||
"Book Appointment": "Boek Afspraak",
|
||||
"Reschedule Appointment": "Opnieuw Plannen Afspraak",
|
||||
"Fetch Availability": "Beschikbaarheid ophalen",
|
||||
"Get Appointment Details": "Krijg Afspraak Details",
|
||||
"Cancel Appointment": "Afspraak annuleren",
|
||||
"Book an appointment for a customer for a desired service": "Boek een afspraak voor een klant voor een gewenste service",
|
||||
"Reschedule an appointment to a different time or to a different staff": "Stel een afspraak opnieuw in op een andere tijd of op een ander personeel",
|
||||
"Fetch availability of appointments across services": "Ophalen van de beschikbaarheid van afspraken tussen diensten",
|
||||
"Get details of an appointment using its booking ID": "Krijg details van een afspraak met de boekings-ID",
|
||||
"Update the status of a booking (cancel, complete, or mark as no-show)": "Werk de status van een boeking bij (annuleren, voltooien of markeren als geen show)",
|
||||
"Workspace": "werkruimte",
|
||||
"Service": "Diensten",
|
||||
"Staff": "Medewerkers",
|
||||
"Resource": "Bron",
|
||||
"Group ID": "Groep ID",
|
||||
"From Time": "Van tijd",
|
||||
"To Time": "Tot Tijd",
|
||||
"Timezone": "Timezone",
|
||||
"Customer Name": "Klant naam",
|
||||
"Customer Email": "Klant e-mail",
|
||||
"Customer Phone": "Telefoon klant",
|
||||
"Notes": "Opmerkingen",
|
||||
"Additional Fields": "Extra velden",
|
||||
"Cost Paid": "Kosten betaald",
|
||||
"Appointment": "Afspraak",
|
||||
"Service (Optional)": "Service (optioneel)",
|
||||
"New Start Time": "Nieuwe Starttijd",
|
||||
"Selected Date": "Geselecteerde datum",
|
||||
"Select the workspace for the appointment": "Selecteer de workspace voor de afspraak",
|
||||
"Select the service for which the appointment is booked": "Selecteer de service waarvoor de afspraak is geboekt",
|
||||
"Select the staff member (use this OR resource_id OR group_id)": "Selecteer het medewerker (gebruik dit OF resource_id OR group_id)",
|
||||
"Select the resource (use this OR staff_id OR group_id)": "Selecteer het document (gebruik dit OF staff_id OR group_id)",
|
||||
"The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)": "De unieke ID van de medewerkergroep voor een collectieve boeking (gebruik deze OF staff_id OR resource_id)",
|
||||
"The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "De begintijd voor de afspraak (formaat: mm-dd-yyyy HH:mm:ss)",
|
||||
"End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)": "Eindtijd voor bronboeking (optioneel, formaat: dd-MMM-yyyy HH:mm:ss)",
|
||||
"The timezone for the appointment (optional)": "De tijdzone voor de afspraak (optioneel)",
|
||||
"Name of the customer": "Naam van de klant",
|
||||
"Email address of the customer": "E-mailadres van de klant",
|
||||
"Phone number of the customer": "Telefoonnummer van de klant",
|
||||
"Additional information about the appointment (optional)": "Aanvullende informatie over de afspraak (optioneel)",
|
||||
"Additional customer details as JSON object (optional)": "Extra klantgegevens als JSON object (optioneel)",
|
||||
"Amount paid for the booking (optional)": "Bedrag betaald voor de boeking (optioneel)",
|
||||
"Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Start van het datumbereik dat wordt gebruikt om bestaande boekingen op te halen (om te helpen met het selecteren van het reserverings-ID om te herplannen). Niet verzonden naar de nieuwe API. Formaat: dd-MMM-yyyy HH:mm:ss",
|
||||
"End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Einde van het datumbereik wordt gebruikt om bestaande boekingen op te halen (optioneel). Niet verzonden naar de nieuwe API. Formaat: dd-MMM-yyyy HH:mm:ss",
|
||||
"Select the appointment to get details for": "Selecteer de afspraak om details te krijgen voor",
|
||||
"Select service to filter staff options": "Selecteer service om medewerkeropties te filteren",
|
||||
"Select the staff to reschedule to (use this OR group_id OR start_time)": "Selecteer de medewerker om naar te herplannen (gebruik deze OF groep_id OF start_time)",
|
||||
"The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)": "De unieke ID van de medewerkergroep om naar te verplaatsen (gebruik deze OF staff_id OF start_time)",
|
||||
"The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)": "De nieuwe tijd om de afspraak naar (formaat: dd-MMM-yyyy HH:mm:ss, gebruik deze OF staff_id OR group_id)",
|
||||
"Select the workspace to fetch availability for": "Selecteer de werkruimte om beschikbaarheid op te halen voor",
|
||||
"Select the service for which availability is to be fetched": "Selecteer de service waarvoor de beschikbaarheid moet worden opgehaald",
|
||||
"Select the staff member (use this OR group_id OR resource_id)": "Selecteer het medewerker (gebruik dit OF de groep_id of resource_id)",
|
||||
"The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)": "De unieke ID van de medewerkergroep gekoppeld aan de service (gebruik deze OF staff_id OR resource_id)",
|
||||
"The date on which services are checked for availability (format: mm-dd-yyyy)": "De datum waarop de beschikbaarheid van diensten wordt gecontroleerd (formaat: mm-dd-yyyy)",
|
||||
"The start time of the appointment (in ISO 8601 format)": "De starttijd van de afspraak (in ISO 8601 formaat)",
|
||||
"The end time of the appointment (in ISO 8601 format)": "De eindtijd van de afspraak (in ISO 8601 formaat)",
|
||||
"The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "De eindtijd voor de afspraak (formaat: mm-dd-yyyy HH:mm:ss)"
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.": "As reservas do Zoho são um software de agendamento de reservas para gerenciar reservas, serviços e compromissos do cliente.",
|
||||
"Data Center": "Centro de Dados",
|
||||
"The data center location of your Zoho Bookings account": "A localização do centro de dados da sua conta Zoho Bookings",
|
||||
"zoho.com (United States)": "zoho.com (Estados Unidos)",
|
||||
"zoho.eu (Europe)": "zoho.eu (Europa)",
|
||||
"zoho.in (India)": "zoho.in (Índia)",
|
||||
"zoho.com.au (Australia)": "zoho.com.au (Austrália)",
|
||||
"zoho.jp (Japan)": "zoho.jp (Japão)",
|
||||
"zoho.com.cn (China)": "zoho.com.cn (China)",
|
||||
"Connect your Zoho Bookings account using OAuth2": "Conecte sua conta Zoho Bookings usando OAuth2",
|
||||
"Book Appointment": "Agendar Compromisso",
|
||||
"Reschedule Appointment": "Nomeação reagendada",
|
||||
"Fetch Availability": "Buscar disponibilidade",
|
||||
"Get Appointment Details": "Obter Detalhes do Compromisso",
|
||||
"Cancel Appointment": "Cancelar Nomeação",
|
||||
"Book an appointment for a customer for a desired service": "Reserve uma nomeação para um cliente para um serviço desejado",
|
||||
"Reschedule an appointment to a different time or to a different staff": "Reagendar um compromisso para um horário diferente ou para uma equipe diferente",
|
||||
"Fetch availability of appointments across services": "Buscar disponibilidade de compromissos através de serviços",
|
||||
"Get details of an appointment using its booking ID": "Obtenha detalhes de um compromisso usando seu ID de reserva",
|
||||
"Update the status of a booking (cancel, complete, or mark as no-show)": "Atualize o status de uma reserva (cancelar, concluir ou marcar como não mostrar)",
|
||||
"Workspace": "Workspace",
|
||||
"Service": "Serviço",
|
||||
"Staff": "Funcionários",
|
||||
"Resource": "Recurso",
|
||||
"Group ID": "Grupo ID",
|
||||
"From Time": "Da Hora",
|
||||
"To Time": "Até o Horário",
|
||||
"Timezone": "Timezone",
|
||||
"Customer Name": "Nome do cliente",
|
||||
"Customer Email": "E-mail do Cliente",
|
||||
"Customer Phone": "Telefone do Cliente",
|
||||
"Notes": "Observações",
|
||||
"Additional Fields": "Campos adicionais",
|
||||
"Cost Paid": "Custo Pago",
|
||||
"Appointment": "Compromisso",
|
||||
"Service (Optional)": "Serviço (opcional)",
|
||||
"New Start Time": "Nova hora de início",
|
||||
"Selected Date": "Data selecionada",
|
||||
"Select the workspace for the appointment": "Selecione o espaço de trabalho para a nomeação",
|
||||
"Select the service for which the appointment is booked": "Selecione o serviço para o qual a nomeação está reservada",
|
||||
"Select the staff member (use this OR resource_id OR group_id)": "Selecione o membro da equipe (use este OU resource_id OU group_id)",
|
||||
"Select the resource (use this OR staff_id OR group_id)": "Selecione o recurso (use este OU staff_id OU group_id)",
|
||||
"The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)": "O ID exclusivo do grupo de funcionários para reserva coletiva (use este OU staff_id OU resource_id)",
|
||||
"The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "A hora de início do agendamento (formato: mm-dd-yyyy HH:mm:ss)",
|
||||
"End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)": "Tempo final de reserva de recursos (opcional, formato: dd-MMM-yyyy HH:mm:ss)",
|
||||
"The timezone for the appointment (optional)": "O fuso horário para a nomeação (opcional)",
|
||||
"Name of the customer": "Nome do cliente",
|
||||
"Email address of the customer": "Endereço de e-mail do cliente",
|
||||
"Phone number of the customer": "Número de telefone do cliente",
|
||||
"Additional information about the appointment (optional)": "Informações adicionais sobre a nomeação (opcional)",
|
||||
"Additional customer details as JSON object (optional)": "Detalhes adicionais do cliente como objeto JSON (opcional)",
|
||||
"Amount paid for the booking (optional)": "Valor pago para o pedido (opcional)",
|
||||
"Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Início do intervalo de datas usado para buscar as reservas existentes (para ajudar você a selecionar o ID da reserva para reagendar). Não enviado para a API de reagendamento. Formato: dd-MMM-yyyy HH:mm:ss",
|
||||
"End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Fim do intervalo de datas usado para buscar reservas existentes (opcional). Não é enviado para a API de reagendamento. Formato: dd-MMM-yyyy HH:mm:ss",
|
||||
"Select the appointment to get details for": "Selecione o compromisso para obter detalhes de",
|
||||
"Select service to filter staff options": "Selecione o serviço para filtrar as opções da equipe",
|
||||
"Select the staff to reschedule to (use this OR group_id OR start_time)": "Selecione a equipe para reagendar (use este OU group_id OU start_time)",
|
||||
"The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)": "A identificação exclusiva do grupo da equipe para reagendar (use este OU staff_id OU start_time)",
|
||||
"The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)": "A nova hora para reagendar a reunião (formato: dd-MMM-yyyy HH:mm:ss, use este OU staff_id OU group_id)",
|
||||
"Select the workspace to fetch availability for": "Selecionar espaço de trabalho para buscar a disponibilidade para",
|
||||
"Select the service for which availability is to be fetched": "Selecione o serviço para o qual a disponibilidade deve ser obtida",
|
||||
"Select the staff member (use this OR group_id OR resource_id)": "Selecione o membro da equipe (use este OU group_id OU resource_id)",
|
||||
"The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)": "O ID exclusivo do grupo de funcionários associado ao serviço (use este OU staff_id OU resource_id)",
|
||||
"The date on which services are checked for availability (format: mm-dd-yyyy)": "A data em que os serviços são verificados quanto à disponibilidade (formato: mm-dd-yyyy)",
|
||||
"The start time of the appointment (in ISO 8601 format)": "A hora de início da nomeação (no formato ISO 8601)",
|
||||
"The end time of the appointment (in ISO 8601 format)": "A hora final da reunião (formato ISO 8601)",
|
||||
"The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "O horário de término do agendamento (formato: mm-dd-yyyy HH:mm:ss)"
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.": "Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.",
|
||||
"Data Center": "Data Center",
|
||||
"The data center location of your Zoho Bookings account": "The data center location of your Zoho Bookings account",
|
||||
"zoho.com (United States)": "zoho.com (United States)",
|
||||
"zoho.eu (Europe)": "zoho.eu (Europe)",
|
||||
"zoho.in (India)": "zoho.in (India)",
|
||||
"zoho.com.au (Australia)": "zoho.com.au (Australia)",
|
||||
"zoho.jp (Japan)": "zoho.jp (Japan)",
|
||||
"zoho.com.cn (China)": "zoho.com.cn (China)",
|
||||
"Connect your Zoho Bookings account using OAuth2": "Connect your Zoho Bookings account using OAuth2",
|
||||
"Book Appointment": "Book Appointment",
|
||||
"Reschedule Appointment": "Reschedule Appointment",
|
||||
"Fetch Availability": "Fetch Availability",
|
||||
"Get Appointment Details": "Get Appointment Details",
|
||||
"Cancel Appointment": "Cancel Appointment",
|
||||
"Book an appointment for a customer for a desired service": "Book an appointment for a customer for a desired service",
|
||||
"Reschedule an appointment to a different time or to a different staff": "Reschedule an appointment to a different time or to a different staff",
|
||||
"Fetch availability of appointments across services": "Fetch availability of appointments across services",
|
||||
"Get details of an appointment using its booking ID": "Get details of an appointment using its booking ID",
|
||||
"Update the status of a booking (cancel, complete, or mark as no-show)": "Update the status of a booking (cancel, complete, or mark as no-show)",
|
||||
"Workspace": "Workspace",
|
||||
"Service": "Service",
|
||||
"Staff": "Staff",
|
||||
"Resource": "Resource",
|
||||
"Group ID": "Group ID",
|
||||
"From Time": "From Time",
|
||||
"To Time": "To Time",
|
||||
"Timezone": "Timezone",
|
||||
"Customer Name": "Customer Name",
|
||||
"Customer Email": "Customer Email",
|
||||
"Customer Phone": "Customer Phone",
|
||||
"Notes": "Notes",
|
||||
"Additional Fields": "Additional Fields",
|
||||
"Cost Paid": "Cost Paid",
|
||||
"Appointment": "Appointment",
|
||||
"Service (Optional)": "Service (Optional)",
|
||||
"New Start Time": "New Start Time",
|
||||
"Selected Date": "Selected Date",
|
||||
"Select the workspace for the appointment": "Select the workspace for the appointment",
|
||||
"Select the service for which the appointment is booked": "Select the service for which the appointment is booked",
|
||||
"Select the staff member (use this OR resource_id OR group_id)": "Select the staff member (use this OR resource_id OR group_id)",
|
||||
"Select the resource (use this OR staff_id OR group_id)": "Select the resource (use this OR staff_id OR group_id)",
|
||||
"The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)": "The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)",
|
||||
"The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)",
|
||||
"End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)": "End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)",
|
||||
"The timezone for the appointment (optional)": "The timezone for the appointment (optional)",
|
||||
"Name of the customer": "Name of the customer",
|
||||
"Email address of the customer": "Email address of the customer",
|
||||
"Phone number of the customer": "Phone number of the customer",
|
||||
"Additional information about the appointment (optional)": "Additional information about the appointment (optional)",
|
||||
"Additional customer details as JSON object (optional)": "Additional customer details as JSON object (optional)",
|
||||
"Amount paid for the booking (optional)": "Amount paid for the booking (optional)",
|
||||
"Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss",
|
||||
"End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss",
|
||||
"Select the appointment to get details for": "Select the appointment to get details for",
|
||||
"Select service to filter staff options": "Select service to filter staff options",
|
||||
"Select the staff to reschedule to (use this OR group_id OR start_time)": "Select the staff to reschedule to (use this OR group_id OR start_time)",
|
||||
"The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)": "The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)",
|
||||
"The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)": "The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)",
|
||||
"Select the workspace to fetch availability for": "Select the workspace to fetch availability for",
|
||||
"Select the service for which availability is to be fetched": "Select the service for which availability is to be fetched",
|
||||
"Select the staff member (use this OR group_id OR resource_id)": "Select the staff member (use this OR group_id OR resource_id)",
|
||||
"The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)": "The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)",
|
||||
"The date on which services are checked for availability (format: mm-dd-yyyy)": "The date on which services are checked for availability (format: mm-dd-yyyy)",
|
||||
"The start time of the appointment (in ISO 8601 format)": "The start time of the appointment (in ISO 8601 format)",
|
||||
"The end time of the appointment (in ISO 8601 format)": "The end time of the appointment (in ISO 8601 format)",
|
||||
"The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)"
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.": "Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.",
|
||||
"Data Center": "Data Center",
|
||||
"The data center location of your Zoho Bookings account": "The data center location of your Zoho Bookings account",
|
||||
"zoho.com (United States)": "zoho.com (United States)",
|
||||
"zoho.eu (Europe)": "zoho.eu (Europe)",
|
||||
"zoho.in (India)": "zoho.in (India)",
|
||||
"zoho.com.au (Australia)": "zoho.com.au (Australia)",
|
||||
"zoho.jp (Japan)": "zoho.jp (Japan)",
|
||||
"zoho.com.cn (China)": "zoho.com.cn (China)",
|
||||
"Connect your Zoho Bookings account using OAuth2": "Connect your Zoho Bookings account using OAuth2",
|
||||
"Book Appointment": "Book Appointment",
|
||||
"Reschedule Appointment": "Reschedule Appointment",
|
||||
"Fetch Availability": "Fetch Availability",
|
||||
"Get Appointment Details": "Get Appointment Details",
|
||||
"Cancel Appointment": "Cancel Appointment",
|
||||
"Book an appointment for a customer for a desired service": "Book an appointment for a customer for a desired service",
|
||||
"Reschedule an appointment to a different time or to a different staff": "Reschedule an appointment to a different time or to a different staff",
|
||||
"Fetch availability of appointments across services": "Fetch availability of appointments across services",
|
||||
"Get details of an appointment using its booking ID": "Get details of an appointment using its booking ID",
|
||||
"Update the status of a booking (cancel, complete, or mark as no-show)": "Update the status of a booking (cancel, complete, or mark as no-show)",
|
||||
"Workspace": "Workspace",
|
||||
"Service": "Service",
|
||||
"Staff": "Staff",
|
||||
"Resource": "资源",
|
||||
"Group ID": "Group ID",
|
||||
"From Time": "From Time",
|
||||
"To Time": "To Time",
|
||||
"Timezone": "Timezone",
|
||||
"Customer Name": "Customer Name",
|
||||
"Customer Email": "Customer Email",
|
||||
"Customer Phone": "Customer Phone",
|
||||
"Notes": "Notes",
|
||||
"Additional Fields": "Additional Fields",
|
||||
"Cost Paid": "Cost Paid",
|
||||
"Appointment": "Appointment",
|
||||
"Service (Optional)": "Service (Optional)",
|
||||
"New Start Time": "New Start Time",
|
||||
"Selected Date": "Selected Date",
|
||||
"Select the workspace for the appointment": "Select the workspace for the appointment",
|
||||
"Select the service for which the appointment is booked": "Select the service for which the appointment is booked",
|
||||
"Select the staff member (use this OR resource_id OR group_id)": "Select the staff member (use this OR resource_id OR group_id)",
|
||||
"Select the resource (use this OR staff_id OR group_id)": "Select the resource (use this OR staff_id OR group_id)",
|
||||
"The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)": "The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)",
|
||||
"The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)",
|
||||
"End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)": "End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)",
|
||||
"The timezone for the appointment (optional)": "The timezone for the appointment (optional)",
|
||||
"Name of the customer": "Name of the customer",
|
||||
"Email address of the customer": "Email address of the customer",
|
||||
"Phone number of the customer": "Phone number of the customer",
|
||||
"Additional information about the appointment (optional)": "Additional information about the appointment (optional)",
|
||||
"Additional customer details as JSON object (optional)": "Additional customer details as JSON object (optional)",
|
||||
"Amount paid for the booking (optional)": "Amount paid for the booking (optional)",
|
||||
"Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss",
|
||||
"End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss": "End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss",
|
||||
"Select the appointment to get details for": "Select the appointment to get details for",
|
||||
"Select service to filter staff options": "Select service to filter staff options",
|
||||
"Select the staff to reschedule to (use this OR group_id OR start_time)": "Select the staff to reschedule to (use this OR group_id OR start_time)",
|
||||
"The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)": "The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)",
|
||||
"The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)": "The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)",
|
||||
"Select the workspace to fetch availability for": "Select the workspace to fetch availability for",
|
||||
"Select the service for which availability is to be fetched": "Select the service for which availability is to be fetched",
|
||||
"Select the staff member (use this OR group_id OR resource_id)": "Select the staff member (use this OR group_id OR resource_id)",
|
||||
"The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)": "The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)",
|
||||
"The date on which services are checked for availability (format: mm-dd-yyyy)": "The date on which services are checked for availability (format: mm-dd-yyyy)",
|
||||
"The start time of the appointment (in ISO 8601 format)": "The start time of the appointment (in ISO 8601 format)",
|
||||
"The end time of the appointment (in ISO 8601 format)": "The end time of the appointment (in ISO 8601 format)",
|
||||
"The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)": "The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { cancelAppointment } from './lib/actions/cancel-appointment';
|
||||
import { fetchAvailability } from './lib/actions/fetch-availability';
|
||||
import { rescheduleAppointment } from './lib/actions/reschedule-appointment';
|
||||
import { bookAppointment } from './lib/actions/book-appointment';
|
||||
import { getAppointmentDetails } from './lib/actions/get-appointment-details';
|
||||
import { zohoBookingsAuth } from './lib/common';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
|
||||
export const zohoBookings = createPiece({
|
||||
displayName: 'Zoho Bookings',
|
||||
description:
|
||||
'Zoho Bookings is an appointment scheduling software for managing bookings, services, and customer appointments.',
|
||||
auth: zohoBookingsAuth,
|
||||
minimumSupportedRelease: '0.36.1',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/zoho-bookings.png',
|
||||
authors: ['fortunamide', 'sanket-a11y'],
|
||||
actions: [
|
||||
bookAppointment,
|
||||
rescheduleAppointment,
|
||||
fetchAvailability,
|
||||
getAppointmentDetails,
|
||||
cancelAppointment,
|
||||
],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,302 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { formatDateTime, zohoBookingsAuth, zohoBookingsCommon } from '../common';
|
||||
|
||||
export const bookAppointment = createAction({
|
||||
auth: zohoBookingsAuth,
|
||||
name: 'bookAppointment',
|
||||
displayName: 'Book Appointment',
|
||||
description: 'Book an appointment for a customer for a desired service',
|
||||
props: {
|
||||
workspace_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Workspace',
|
||||
description: 'Select the workspace for the appointment',
|
||||
required: true,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Authentication required',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const workspaces = await zohoBookingsCommon.fetchWorkspaces(
|
||||
(auth as any).access_token,
|
||||
location
|
||||
);
|
||||
|
||||
return {
|
||||
options: workspaces.map((workspace: any) => ({
|
||||
label: workspace.name,
|
||||
value: workspace.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load workspaces',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
service_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Service',
|
||||
description: 'Select the service for which the appointment is booked',
|
||||
required: true,
|
||||
refreshers: ['workspace_id'],
|
||||
options: async ({ auth, workspace_id }) => {
|
||||
if (!workspace_id || !auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please enter workspace ID first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const services = await zohoBookingsCommon.fetchServices(
|
||||
(auth as any).access_token,
|
||||
location,
|
||||
workspace_id as string
|
||||
);
|
||||
|
||||
return {
|
||||
options: services.map((service: any) => ({
|
||||
label: `${service.name} (${service.duration})`,
|
||||
value: service.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load services',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
staff_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Staff',
|
||||
description:
|
||||
'Select the staff member (use this OR resource_id OR group_id)',
|
||||
required: false,
|
||||
refreshers: ['service_id'],
|
||||
options: async ({ auth, service_id }) => {
|
||||
if (!service_id || !auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please select service first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const staff = await zohoBookingsCommon.fetchStaff(
|
||||
(auth as any).access_token,
|
||||
location,
|
||||
service_id as string
|
||||
);
|
||||
|
||||
return {
|
||||
options: staff.map((member: any) => ({
|
||||
label: `${member.name} - ${member.designation || 'Staff'}`,
|
||||
value: member.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load staff',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
resource_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Resource',
|
||||
description: 'Select the resource (use this OR staff_id OR group_id)',
|
||||
required: false,
|
||||
refreshers: ['service_id'],
|
||||
options: async ({ auth, service_id }) => {
|
||||
if (!service_id || !auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please select service first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = auth.props?.['location'] as string || 'zoho.com';
|
||||
const resources = await zohoBookingsCommon.fetchResources(
|
||||
auth.access_token,
|
||||
location,
|
||||
service_id as string
|
||||
);
|
||||
|
||||
return {
|
||||
options: resources.map((resource: any) => ({
|
||||
label: resource.name,
|
||||
value: resource.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load resources',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
group_id: Property.ShortText({
|
||||
displayName: 'Group ID',
|
||||
description:
|
||||
'The unique ID of the staff group for collective booking (use this OR staff_id OR resource_id)',
|
||||
required: false,
|
||||
}),
|
||||
from_time: Property.DateTime({
|
||||
displayName: 'From Time',
|
||||
description:
|
||||
'The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)',
|
||||
required: true,
|
||||
}),
|
||||
to_time: Property.DateTime({
|
||||
displayName: 'To Time',
|
||||
description:
|
||||
'End time for resource booking (optional, format: dd-MMM-yyyy HH:mm:ss)',
|
||||
required: false,
|
||||
}),
|
||||
timezone: Property.ShortText({
|
||||
displayName: 'Timezone',
|
||||
description: 'The timezone for the appointment (optional)',
|
||||
required: false,
|
||||
}),
|
||||
customer_name: Property.ShortText({
|
||||
displayName: 'Customer Name',
|
||||
description: 'Name of the customer',
|
||||
required: true,
|
||||
}),
|
||||
customer_email: Property.ShortText({
|
||||
displayName: 'Customer Email',
|
||||
description: 'Email address of the customer',
|
||||
required: true,
|
||||
}),
|
||||
customer_phone: Property.ShortText({
|
||||
displayName: 'Customer Phone',
|
||||
description: 'Phone number of the customer',
|
||||
required: true,
|
||||
}),
|
||||
notes: Property.LongText({
|
||||
displayName: 'Notes',
|
||||
description: 'Additional information about the appointment (optional)',
|
||||
required: false,
|
||||
}),
|
||||
additional_fields: Property.Json({
|
||||
displayName: 'Additional Fields',
|
||||
description: 'Additional customer details as JSON object (optional)',
|
||||
required: false,
|
||||
}),
|
||||
cost_paid: Property.Number({
|
||||
displayName: 'Cost Paid',
|
||||
description: 'Amount paid for the booking (optional)',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { auth, propsValue } = context;
|
||||
const location = auth.props?.['location'] as string || 'zoho.com';
|
||||
|
||||
// Validate props using Zod schema
|
||||
await propsValidation.validateZod(
|
||||
propsValue,
|
||||
zohoBookingsCommon.bookAppointmentSchema
|
||||
);
|
||||
|
||||
// Validate that at least one of staff_id, resource_id, or group_id is provided
|
||||
if (
|
||||
!propsValue.staff_id &&
|
||||
!propsValue.resource_id &&
|
||||
!propsValue.group_id
|
||||
) {
|
||||
throw new Error(
|
||||
'Either staff_id, resource_id, or group_id must be provided'
|
||||
);
|
||||
}
|
||||
|
||||
// Prepare customer details
|
||||
const customer_details = {
|
||||
name: String(propsValue.customer_name),
|
||||
email: String(propsValue.customer_email),
|
||||
phone_number: String(propsValue.customer_phone),
|
||||
};
|
||||
const customer_details_json = JSON.stringify(customer_details);
|
||||
// Prepare form data
|
||||
const formData = new FormData();
|
||||
formData.append('service_id', propsValue.service_id as string);
|
||||
formData.append('from_time', formatDateTime(propsValue.from_time));
|
||||
|
||||
formData.append('customer_details', customer_details_json);
|
||||
|
||||
// Add optional staff/resource/group ID
|
||||
if (propsValue.staff_id != null && propsValue.staff_id) {
|
||||
formData.append('staff_id', propsValue.staff_id as string);
|
||||
}
|
||||
if (propsValue.resource_id != null && propsValue.resource_id) {
|
||||
formData.append('resource_id', propsValue.resource_id as string);
|
||||
}
|
||||
if (propsValue.group_id != null && propsValue.group_id) {
|
||||
formData.append('group_id', propsValue.group_id as string);
|
||||
}
|
||||
|
||||
// Add optional fields
|
||||
if (propsValue.to_time) {
|
||||
formData.append('to_time', formatDateTime(propsValue.to_time));
|
||||
}
|
||||
if (propsValue.timezone) {
|
||||
formData.append('timezone', propsValue.timezone);
|
||||
}
|
||||
if (propsValue.notes) {
|
||||
formData.append('notes', propsValue.notes);
|
||||
}
|
||||
if (propsValue.additional_fields) {
|
||||
formData.append(
|
||||
'additional_fields',
|
||||
JSON.stringify(propsValue.additional_fields)
|
||||
);
|
||||
}
|
||||
if (propsValue.cost_paid) {
|
||||
formData.append(
|
||||
'payment_info',
|
||||
JSON.stringify({ cost_paid: propsValue.cost_paid.toString() })
|
||||
);
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: `${zohoBookingsCommon.baseUrl(location)}/appointment`,
|
||||
headers: {
|
||||
Authorization: `Zoho-oauthtoken ${auth.access_token}`,
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: formData,
|
||||
});
|
||||
|
||||
if (response.body.response.status === 'failure') {
|
||||
throw new Error(`${response.body.response.errormessage}`);
|
||||
}
|
||||
return response.body.response;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { bookingIdDropdown, zohoBookingsAuth, zohoBookingsCommon } from '../common';
|
||||
|
||||
export const cancelAppointment = createAction({
|
||||
auth: zohoBookingsAuth,
|
||||
name: 'cancelAppointment',
|
||||
displayName: 'Cancel Appointment',
|
||||
description:
|
||||
'Update the status of a booking (cancel, complete, or mark as no-show)',
|
||||
props: {
|
||||
from_time: Property.DateTime({
|
||||
displayName: 'From Time',
|
||||
description:
|
||||
'The starting time for the appointment (format: mm-dd-yyyy HH:mm:ss)',
|
||||
required: true,
|
||||
}),
|
||||
to_time: Property.DateTime({
|
||||
displayName: 'To Time',
|
||||
description:
|
||||
'The ending time for the appointment (format: mm-dd-yyyy HH:mm:ss)',
|
||||
required: false,
|
||||
}),
|
||||
booking_id: bookingIdDropdown,
|
||||
},
|
||||
async run(context) {
|
||||
const { auth, propsValue } = context;
|
||||
const location = auth.props?.['location'] as string || 'zoho.com';
|
||||
|
||||
// Validate props using Zod schema
|
||||
await propsValidation.validateZod(
|
||||
propsValue,
|
||||
zohoBookingsCommon.cancelAppointmentSchema
|
||||
);
|
||||
|
||||
// Prepare form data
|
||||
const formData = new FormData();
|
||||
formData.append('booking_id', propsValue.booking_id as string);
|
||||
formData.append('action', 'cancel');
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: `${zohoBookingsCommon.baseUrl(location)}/updateappointment`,
|
||||
headers: {
|
||||
Authorization: `Zoho-oauthtoken ${auth.access_token}`,
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: formData,
|
||||
});
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,223 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { zohoBookingsAuth, zohoBookingsCommon } from '../common';
|
||||
|
||||
export const fetchAvailability = createAction({
|
||||
auth: zohoBookingsAuth,
|
||||
name: 'fetchAvailability',
|
||||
displayName: 'Fetch Availability',
|
||||
description: 'Fetch availability of appointments across services',
|
||||
props: {
|
||||
workspace_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Workspace',
|
||||
description: 'Select the workspace to fetch availability for',
|
||||
required: true,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Authentication required',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const workspaces = await zohoBookingsCommon.fetchWorkspaces(
|
||||
(auth as any).access_token,
|
||||
location
|
||||
);
|
||||
|
||||
return {
|
||||
options: workspaces.map((workspace: any) => ({
|
||||
label: workspace.name,
|
||||
value: workspace.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load workspaces',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
service_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Service',
|
||||
description: 'Select the service for which availability is to be fetched',
|
||||
required: true,
|
||||
refreshers: ['workspace_id'],
|
||||
options: async ({ auth, workspace_id }) => {
|
||||
if (!workspace_id || !auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please enter workspace ID first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const services = await zohoBookingsCommon.fetchServices(
|
||||
(auth as any).access_token,
|
||||
location,
|
||||
workspace_id as string
|
||||
);
|
||||
|
||||
return {
|
||||
options: services.map((service: any) => ({
|
||||
label: `${service.name} (${service.duration})`,
|
||||
value: service.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load services',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
staff_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Staff',
|
||||
description: 'Select the staff member (use this OR group_id OR resource_id)',
|
||||
required: false,
|
||||
refreshers: ['service_id'],
|
||||
options: async ({ auth, service_id }) => {
|
||||
if (!service_id || !auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please select service first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const staff = await zohoBookingsCommon.fetchStaff(
|
||||
(auth as any).access_token,
|
||||
location,
|
||||
service_id as string
|
||||
);
|
||||
|
||||
return {
|
||||
options: staff.map((member: any) => ({
|
||||
label: `${member.name} - ${member.designation || 'Staff'}`,
|
||||
value: member.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load staff',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
group_id: Property.ShortText({
|
||||
displayName: 'Group ID',
|
||||
description: 'The unique ID of the staff group associated with the service (use this OR staff_id OR resource_id)',
|
||||
required: false,
|
||||
}),
|
||||
resource_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Resource',
|
||||
description: 'Select the resource (use this OR staff_id OR group_id)',
|
||||
required: false,
|
||||
refreshers: ['service_id'],
|
||||
options: async ({ auth, service_id }) => {
|
||||
if (!service_id || !auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please select service first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const resources = await zohoBookingsCommon.fetchResources(
|
||||
(auth as any).access_token,
|
||||
location,
|
||||
service_id as string
|
||||
);
|
||||
|
||||
return {
|
||||
options: resources.map((resource: any) => ({
|
||||
label: resource.name,
|
||||
value: resource.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load resources',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
selected_date: Property.DateTime({
|
||||
displayName: 'Selected Date',
|
||||
description: 'The date on which services are checked for availability (format: mm-dd-yyyy)',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { auth, propsValue } = context;
|
||||
const location = auth.props?.['location'] as string || 'zoho.com';
|
||||
|
||||
// Validate props using Zod schema
|
||||
await propsValidation.validateZod(propsValue, zohoBookingsCommon.fetchAvailabilitySchema);
|
||||
|
||||
// Validate that at least one of staff_id, group_id, or resource_id is provided
|
||||
if (!propsValue.staff_id && !propsValue.group_id && !propsValue.resource_id) {
|
||||
throw new Error('Either staff_id, group_id, or resource_id must be provided');
|
||||
}
|
||||
|
||||
// Format date to YYYY-MM-DD format
|
||||
const formatDate = (date: string) => {
|
||||
const d = new Date(date);
|
||||
const year = d.getFullYear();
|
||||
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
|
||||
// Prepare query parameters
|
||||
const queryParams: Record<string, string> = {
|
||||
service_id: propsValue.service_id,
|
||||
selected_date: formatDate(propsValue.selected_date),
|
||||
};
|
||||
|
||||
// Add the staff/group/resource ID (only one should be provided)
|
||||
if (propsValue.staff_id) {
|
||||
queryParams['staff_id'] = propsValue.staff_id;
|
||||
}
|
||||
if (propsValue.group_id) {
|
||||
queryParams['group_id'] = propsValue.group_id;
|
||||
}
|
||||
if (propsValue.resource_id) {
|
||||
queryParams['resource_id'] = propsValue.resource_id;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${zohoBookingsCommon.baseUrl(location)}/availableslots`,
|
||||
headers: {
|
||||
Authorization: `Zoho-oauthtoken ${auth.access_token}`,
|
||||
},
|
||||
queryParams,
|
||||
});
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,45 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { bookingIdDropdown, zohoBookingsAuth, zohoBookingsCommon } from '../common';
|
||||
|
||||
export const getAppointmentDetails = createAction({
|
||||
auth: zohoBookingsAuth,
|
||||
name: 'getAppointmentDetails',
|
||||
displayName: 'Get Appointment Details',
|
||||
description: 'Get details of an appointment using its booking ID',
|
||||
props: {
|
||||
from_time: Property.DateTime({
|
||||
displayName: 'From Time',
|
||||
description: 'The start time of the appointment (in ISO 8601 format)',
|
||||
required: true,
|
||||
}),
|
||||
to_time: Property.DateTime({
|
||||
displayName: 'To Time',
|
||||
description: 'The end time of the appointment (in ISO 8601 format)',
|
||||
required: false,
|
||||
}),
|
||||
booking_id: bookingIdDropdown
|
||||
},
|
||||
async run(context) {
|
||||
const { auth, propsValue } = context;
|
||||
const location = auth.props?.['location'] as string || 'zoho.com';
|
||||
|
||||
// Validate props using Zod schema
|
||||
await propsValidation.validateZod(propsValue, zohoBookingsCommon.getAppointmentDetailsSchema);
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${zohoBookingsCommon.baseUrl(location)}/getappointment`,
|
||||
headers: {
|
||||
Authorization: `Zoho-oauthtoken ${auth.access_token}`,
|
||||
|
||||
},
|
||||
queryParams: {
|
||||
booking_id: propsValue.booking_id as string,
|
||||
},
|
||||
});
|
||||
|
||||
return response.body;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,178 @@
|
||||
import { propsValidation } from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import {
|
||||
bookingIdDropdown,
|
||||
formatDateTime,
|
||||
zohoBookingsAuth,
|
||||
zohoBookingsCommon,
|
||||
} from '../common';
|
||||
import { access } from 'fs';
|
||||
|
||||
export const rescheduleAppointment = createAction({
|
||||
auth: zohoBookingsAuth,
|
||||
name: 'rescheduleAppointment',
|
||||
displayName: 'Reschedule Appointment',
|
||||
description:
|
||||
'Reschedule an appointment to a different time or to a different staff',
|
||||
props: {
|
||||
from_time: Property.DateTime({
|
||||
displayName: 'From Time',
|
||||
description:
|
||||
'Start of the date range used to fetch existing bookings (to help you select the Booking ID to reschedule). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss',
|
||||
required: true,
|
||||
}),
|
||||
to_time: Property.DateTime({
|
||||
displayName: 'To Time',
|
||||
description:
|
||||
'End of the date range used to fetch existing bookings (optional). Not sent to the reschedule API. Format: dd-MMM-yyyy HH:mm:ss',
|
||||
required: false,
|
||||
}),
|
||||
booking_id: bookingIdDropdown,
|
||||
service_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Service (Optional)',
|
||||
description: 'Select service to filter staff options',
|
||||
required: false,
|
||||
refreshers: [],
|
||||
options: async ({ auth }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Authentication required',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const services = await zohoBookingsCommon.fetchServices(
|
||||
(auth as any).access_token,
|
||||
location
|
||||
);
|
||||
|
||||
return {
|
||||
options: services.map((service: any) => ({
|
||||
label: `${service.name} (${service.duration})`,
|
||||
value: service.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load services',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
staff_id: Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Staff',
|
||||
description:
|
||||
'Select the staff to reschedule to (use this OR group_id OR start_time)',
|
||||
required: false,
|
||||
refreshers: ['service_id'],
|
||||
options: async ({ auth, service_id }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Authentication required',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const staff = await zohoBookingsCommon.fetchStaff(
|
||||
(auth as any).access_token,
|
||||
location,
|
||||
service_id as string
|
||||
);
|
||||
|
||||
return {
|
||||
options: staff.map((member: any) => ({
|
||||
label: `${member.name} - ${member.designation || 'Staff'}`,
|
||||
value: member.id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load staff',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
group_id: Property.ShortText({
|
||||
displayName: 'Group ID',
|
||||
description:
|
||||
'The unique ID of the staff group to reschedule to (use this OR staff_id OR start_time)',
|
||||
required: false,
|
||||
}),
|
||||
start_time: Property.DateTime({
|
||||
displayName: 'New Start Time',
|
||||
description:
|
||||
'The new time to reschedule the appointment to (format: dd-MMM-yyyy HH:mm:ss, use this OR staff_id OR group_id)',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { auth, propsValue } = context;
|
||||
const location = auth.props?.['location'] as string || 'zoho.com';
|
||||
|
||||
// Validate props using Zod schema
|
||||
await propsValidation.validateZod(
|
||||
propsValue,
|
||||
zohoBookingsCommon.rescheduleAppointmentSchema
|
||||
);
|
||||
|
||||
// Validate that at least one of staff_id, group_id, or start_time is provided
|
||||
if (
|
||||
!propsValue.staff_id &&
|
||||
!propsValue.group_id &&
|
||||
!propsValue.start_time
|
||||
) {
|
||||
throw new Error(
|
||||
'Either staff_id, group_id, or start_time must be provided'
|
||||
);
|
||||
}
|
||||
|
||||
// Prepare form data
|
||||
const formData = new FormData();
|
||||
formData.append('booking_id', propsValue.booking_id as string);
|
||||
|
||||
// Add the reschedule parameter (only one should be provided)
|
||||
if (propsValue.staff_id) {
|
||||
formData.append('staff_id', propsValue.staff_id);
|
||||
}
|
||||
if (propsValue.group_id) {
|
||||
formData.append('group_id', propsValue.group_id);
|
||||
}
|
||||
if (propsValue.start_time) {
|
||||
formData.append('start_time', formatDateTime(propsValue.start_time));
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: `${zohoBookingsCommon.baseUrl(location)}/rescheduleappointment`,
|
||||
headers: {
|
||||
Authorization: `Zoho-oauthtoken ${auth.access_token}`,
|
||||
contentType: 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: formData,
|
||||
});
|
||||
console.log(auth.access_token)
|
||||
const responseBody = response.body.response;
|
||||
if (responseBody.status !== 'success') {
|
||||
throw new Error(
|
||||
`Failed to reschedule appointment: ${responseBody.message || 'Unknown error'}`
|
||||
);
|
||||
}
|
||||
if (responseBody.returnvalue.Status == "failure") {
|
||||
throw new Error(responseBody.returnvalue.message || 'Failed to reschedule appointment');
|
||||
}
|
||||
return responseBody;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,257 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { PieceAuth, Property } from '@activepieces/pieces-framework';
|
||||
import { OAuth2GrantType } from '@activepieces/shared';
|
||||
import * as schemas from './schemas';
|
||||
|
||||
export const zohoBookingsAuth = PieceAuth.OAuth2({
|
||||
props: {
|
||||
location: Property.StaticDropdown({
|
||||
displayName: 'Data Center',
|
||||
description: 'The data center location of your Zoho Bookings account',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{
|
||||
label: 'zoho.com (United States)',
|
||||
value: 'zoho.com',
|
||||
},
|
||||
{
|
||||
label: 'zoho.eu (Europe)',
|
||||
value: 'zoho.eu',
|
||||
},
|
||||
{
|
||||
label: 'zoho.in (India)',
|
||||
value: 'zoho.in',
|
||||
},
|
||||
{
|
||||
label: 'zoho.com.au (Australia)',
|
||||
value: 'zoho.com.au',
|
||||
},
|
||||
{
|
||||
label: 'zoho.jp (Japan)',
|
||||
value: 'zoho.jp',
|
||||
},
|
||||
{
|
||||
label: 'zoho.com.cn (China)',
|
||||
value: 'zoho.com.cn',
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
},
|
||||
description: 'Connect your Zoho Bookings account using OAuth2',
|
||||
grantType: OAuth2GrantType.AUTHORIZATION_CODE,
|
||||
required: true,
|
||||
authUrl: 'https://accounts.{location}/oauth/v2/auth',
|
||||
tokenUrl: 'https://accounts.{location}/oauth/v2/token',
|
||||
scope: ['zohobookings.data.CREATE', 'zohobookings.data.READ'],
|
||||
});
|
||||
|
||||
export const zohoBookingsCommon = {
|
||||
baseUrl: (location = 'zoho.com') => {
|
||||
return `https://www.zohoapis.${location
|
||||
.substring(5)
|
||||
.trim()}/bookings/v1/json`;
|
||||
},
|
||||
baseHeaders: (accessToken: string) => {
|
||||
return {
|
||||
Authorization: `Zoho-oauthtoken ${accessToken}`,
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
},
|
||||
|
||||
// API Methods
|
||||
async fetchWorkspaces(accessToken: string, location: string) {
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${this.baseUrl(location)}/workspaces`,
|
||||
headers: this.baseHeaders(accessToken),
|
||||
});
|
||||
|
||||
return response.body?.response?.returnvalue?.data || [];
|
||||
},
|
||||
|
||||
async fetchServices(
|
||||
accessToken: string,
|
||||
location: string,
|
||||
workspaceId?: string
|
||||
) {
|
||||
const queryParams: Record<string, string> = {};
|
||||
if (workspaceId) {
|
||||
queryParams['workspace_id'] = workspaceId;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${this.baseUrl(location)}/services`,
|
||||
headers: this.baseHeaders(accessToken),
|
||||
queryParams,
|
||||
});
|
||||
|
||||
return response.body?.response?.returnvalue?.data || [];
|
||||
},
|
||||
|
||||
async fetchResources(
|
||||
accessToken: string,
|
||||
location: string,
|
||||
serviceId?: string
|
||||
) {
|
||||
const queryParams: Record<string, string> = {};
|
||||
if (serviceId) {
|
||||
queryParams['service_id'] = serviceId;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${this.baseUrl(location)}/resources`,
|
||||
headers: this.baseHeaders(accessToken),
|
||||
queryParams,
|
||||
});
|
||||
|
||||
return response.body?.response?.returnvalue?.data || [];
|
||||
},
|
||||
|
||||
async fetchStaff(accessToken: string, location: string, serviceId?: string) {
|
||||
const queryParams: Record<string, string> = {};
|
||||
if (serviceId) {
|
||||
queryParams['service_id'] = serviceId;
|
||||
}
|
||||
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: `${this.baseUrl(location)}/staffs`,
|
||||
headers: this.baseHeaders(accessToken),
|
||||
queryParams,
|
||||
});
|
||||
|
||||
return response.body?.response?.returnvalue?.data || [];
|
||||
},
|
||||
|
||||
async fetchAppointments(
|
||||
accessToken: string,
|
||||
location: string,
|
||||
options?: {
|
||||
serviceId?: string;
|
||||
staffId?: string;
|
||||
status?: string;
|
||||
from_time?: string;
|
||||
to_time?: string;
|
||||
page?: number;
|
||||
perPage?: number;
|
||||
}
|
||||
) {
|
||||
const payload: Record<string, string | number> = {};
|
||||
|
||||
// if (options?.staffId !== undefined) payload['staff_id'] = Number(options.staffId);
|
||||
// if (options?.serviceId) payload['service_id'] = options.serviceId;
|
||||
if (options?.from_time) payload['from_time'] = options.from_time;
|
||||
// if (options?.to_time) payload['to_time'] = options.to_time;
|
||||
// if (options?.status) payload['status'] = options.status;
|
||||
// if (options?.page != null) payload['page'] = options.page;
|
||||
// if (options?.perPage != null) payload['per_page'] = options.perPage;
|
||||
// if (options?.need_customer_more_info != null) {
|
||||
// payload.need_customer_more_info = String(options.need_customer_more_info);
|
||||
// }
|
||||
// if (options?.customer_name) payload['customer_name'] = options.customer_name;
|
||||
// if (options?.customer_email) payload['customer_email'] = options.customer_email;
|
||||
|
||||
// Send as multipart/form-data with a single `data` field
|
||||
const formData = new FormData();
|
||||
formData.append('data', JSON.stringify(payload));
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url: `${this.baseUrl(location)}/fetchappointment`,
|
||||
headers: {
|
||||
Authorization: `Zoho-oauthtoken ${accessToken}`,
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: formData,
|
||||
});
|
||||
console.log(JSON.stringify(response.body.response));
|
||||
|
||||
return response.body?.response?.returnvalue?.response || [];
|
||||
},
|
||||
|
||||
// Schemas
|
||||
bookAppointmentSchema: schemas.bookAppointment,
|
||||
rescheduleAppointmentSchema: schemas.rescheduleAppointment,
|
||||
fetchAvailabilitySchema: schemas.fetchAvailability,
|
||||
getAppointmentDetailsSchema: schemas.getAppointmentDetails,
|
||||
cancelAppointmentSchema: schemas.cancelAppointment,
|
||||
};
|
||||
|
||||
export const formatDateTime = (date: string) => {
|
||||
const d = new Date(date);
|
||||
const months = [
|
||||
'Jan',
|
||||
'Feb',
|
||||
'Mar',
|
||||
'Apr',
|
||||
'May',
|
||||
'Jun',
|
||||
'Jul',
|
||||
'Aug',
|
||||
'Sep',
|
||||
'Oct',
|
||||
'Nov',
|
||||
'Dec',
|
||||
];
|
||||
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
const month = months[d.getMonth()];
|
||||
const year = d.getFullYear();
|
||||
const hours = d.getHours().toString().padStart(2, '0');
|
||||
const minutes = d.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = d.getSeconds().toString().padStart(2, '0');
|
||||
|
||||
return `${day}-${month}-${year} ${hours}:${minutes}:${seconds}`;
|
||||
};
|
||||
|
||||
export const bookingIdDropdown = Property.Dropdown({
|
||||
auth: zohoBookingsAuth,
|
||||
displayName: 'Appointment',
|
||||
description: 'Select the appointment to get details for',
|
||||
required: true,
|
||||
refreshers: ['from_time', 'to_time'],
|
||||
options: async ({ auth, from_time, to_time }) => {
|
||||
if (!auth) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Authentication required',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
if (!from_time) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Please select From Time first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
const formattedFromTime = formatDateTime(from_time as string);
|
||||
try {
|
||||
const location = (auth as any).props?.['location'] || 'zoho.com';
|
||||
const appointments = await zohoBookingsCommon.fetchAppointments(
|
||||
(auth as any).access_token,
|
||||
location,
|
||||
{
|
||||
perPage: 50,
|
||||
from_time: formattedFromTime,
|
||||
to_time: to_time ? formatDateTime(to_time as string) : undefined,
|
||||
}
|
||||
);
|
||||
return {
|
||||
options: appointments.map((appointment: any) => ({
|
||||
label: `${appointment.booking_id} - ${appointment.customer_name} (${appointment.service_name}) - ${appointment.start_time} [${appointment.status}]`,
|
||||
value: appointment.booking_id,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Failed to load appointments',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
import z from 'zod';
|
||||
|
||||
export const bookAppointment = {
|
||||
workspace_id: z.string().min(1),
|
||||
service_id: z.string().min(1),
|
||||
staff_id: z.string().optional(),
|
||||
resource_id: z.string().optional(),
|
||||
group_id: z.string().optional(),
|
||||
from_time: z.string(),
|
||||
to_time: z.string().optional(),
|
||||
timezone: z.string().optional(),
|
||||
customer_name: z.string().min(1),
|
||||
customer_email: z.string().email(),
|
||||
customer_phone: z.string().min(1),
|
||||
notes: z.string().optional(),
|
||||
additional_fields: z.record(z.string(), z.unknown()).optional(),
|
||||
cost_paid: z.number().min(0).optional(),
|
||||
};
|
||||
|
||||
export const rescheduleAppointment = {
|
||||
booking_id: z.string().min(1),
|
||||
service_id: z.string().optional(),
|
||||
staff_id: z.string().optional(),
|
||||
group_id: z.string().optional(),
|
||||
start_time: z.string().optional(),
|
||||
};
|
||||
|
||||
export const fetchAvailability = {
|
||||
workspace_id: z.string().min(1),
|
||||
service_id: z.string().min(1),
|
||||
staff_id: z.string().optional(),
|
||||
group_id: z.string().optional(),
|
||||
resource_id: z.string().optional(),
|
||||
selected_date: z.string(),
|
||||
};
|
||||
|
||||
export const getAppointmentDetails = {
|
||||
booking_id: z.string().min(1),
|
||||
};
|
||||
|
||||
export const cancelAppointment = {
|
||||
booking_id: z.string().min(1),
|
||||
action: z.enum(['cancel', 'completed', 'noshow']),
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"importHelpers": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noPropertyAccessFromIndexSignature": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user