PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | resources/js/lib/api-client.ts +26 -0 3.0.13 → 3.0.16 View file →
@@ -532,8 +532,9 @@
532 532 getCustomer: (id: string | number) =>
533 533 apiClient.get(API_ENDPOINTS.CUSTOMER_GET(id)),
534 534 deleteCustomer: (id: string | number) =>
535 535 apiClient.delete(API_ENDPOINTS.CUSTOMER_DELETE(id)),
536 + createCustomer: (data: any) => apiClient.post(API_ENDPOINTS.CUSTOMERS, data),
536 537 updateCustomer: (id: string | number, data: any) =>
537 538 apiClient.put(API_ENDPOINTS.CUSTOMER_GET(id), data),
538 539 updateCustomerStatus: (id: string | number, status: string) =>
539 540 apiClient.put(API_ENDPOINTS.CUSTOMER_GET(id), { status }),
@@ -570,8 +571,14 @@
570 571 getSettings: (group?: string) =>
571 572 apiClient.get(
572 573 group ? API_ENDPOINTS.SETTINGS_GROUP(group) : API_ENDPOINTS.SETTINGS,
573 574 ),
575 + // Booking form config as a trip's checkout renders it (per-trip conditions
576 + // resolved). Without tripId: the global config, conditions included.
577 + getBookingFormConfig: (tripId?: number | null) =>
578 + apiClient.get(API_ENDPOINTS.SETTINGS_BOOKING_FORM, {
579 + params: tripId ? { trip_id: tripId } : undefined,
580 + }),
574 581
575 582 // Notices
576 583 getNotices: () => apiClient.get(API_ENDPOINTS.NOTICES),
577 584 dismissNotice: (id: string) =>
@@ -689,8 +696,20 @@
689 696 apiClient.put(API_ENDPOINTS.ENQUIRIES_BULK, { action, ids }),
690 697 respondToEnquiry: (id: string | number, data: any) =>
691 698 apiClient.post(API_ENDPOINTS.ENQUIRY_RESPOND(id), data),
692 699
700 + // Scheduled balance payments (Pro module)
701 + getScheduledPayments: (params?: Record<string, any>) =>
702 + apiClient.get(API_ENDPOINTS.SCHEDULED_PAYMENTS, { params }),
703 + getScheduledPaymentsStats: () =>
704 + apiClient.get(API_ENDPOINTS.SCHEDULED_PAYMENTS_STATS),
705 + cancelScheduledPayment: (id: string | number) =>
706 + apiClient.post(API_ENDPOINTS.SCHEDULED_PAYMENT_CANCEL(id), {}),
707 + getOutstandingBalances: (params?: Record<string, any>) =>
708 + apiClient.get(API_ENDPOINTS.SCHEDULED_PAYMENTS_OUTSTANDING, { params }),
709 + sendBalancePaymentLink: (bookingId: string | number) =>
710 + apiClient.post(API_ENDPOINTS.SCHEDULED_PAYMENT_SEND_LINK(bookingId), {}),
711 +
693 712 // Google Calendar
694 713 getGoogleCalendarSettings: () =>
695 714 apiClient.get(API_ENDPOINTS.GOOGLE_CALENDAR_SETTINGS),
696 715 connectGoogleCalendar: () =>
@@ -698,8 +717,15 @@
698 717 disconnectGoogleCalendar: () =>
699 718 apiClient.post(API_ENDPOINTS.GOOGLE_CALENDAR_DISCONNECT),
700 719 syncAllGoogleCalendar: () =>
701 720 apiClient.post(API_ENDPOINTS.GOOGLE_CALENDAR_SYNC_ALL),
721 + /**
722 + * One batch of a full resync. Repeat with the returned `next_cursor` until
723 + * `done` is true — the server processes a slice per call so a large calendar
724 + * can't time out and the UI can show progress.
725 + */
726 + resyncGoogleCalendar: (cursor = 0, limit = 25) =>
727 + apiClient.post(API_ENDPOINTS.GOOGLE_CALENDAR_RESYNC, { cursor, limit }),
702 728 updateGoogleCalendarSettings: (data: any) =>
703 729 apiClient.post(API_ENDPOINTS.GOOGLE_CALENDAR_SETTINGS, data),
704 730
705 731 // Signed Consents