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 +28 -0 3.0.11 → 3.0.16 View file →
@@ -514,8 +514,10 @@
514 514 getBookings: (params?: Record<string, any>) =>
515 515 apiClient.get(API_ENDPOINTS.BOOKINGS, { params }),
516 516 getBooking: (id: string | number) =>
517 517 apiClient.get(API_ENDPOINTS.BOOKING_GET(id)),
518 + getTripAvailableDates: (id: string | number) =>
519 + apiClient.get(API_ENDPOINTS.TRIP_AVAILABLE_DATES(id)),
518 520 createBooking: (data: any) => apiClient.post(API_ENDPOINTS.BOOKINGS, data),
519 521 updateBooking: (id: string | number, data: any) =>
520 522 apiClient.put(API_ENDPOINTS.BOOKING_GET(id), data),
521 523 updateBookingStatus: (id: string | number, status: string) =>
@@ -530,8 +532,9 @@
530 532 getCustomer: (id: string | number) =>
531 533 apiClient.get(API_ENDPOINTS.CUSTOMER_GET(id)),
532 534 deleteCustomer: (id: string | number) =>
533 535 apiClient.delete(API_ENDPOINTS.CUSTOMER_DELETE(id)),
536 + createCustomer: (data: any) => apiClient.post(API_ENDPOINTS.CUSTOMERS, data),
534 537 updateCustomer: (id: string | number, data: any) =>
535 538 apiClient.put(API_ENDPOINTS.CUSTOMER_GET(id), data),
536 539 updateCustomerStatus: (id: string | number, status: string) =>
537 540 apiClient.put(API_ENDPOINTS.CUSTOMER_GET(id), { status }),
@@ -568,8 +571,14 @@
568 571 getSettings: (group?: string) =>
569 572 apiClient.get(
570 573 group ? API_ENDPOINTS.SETTINGS_GROUP(group) : API_ENDPOINTS.SETTINGS,
571 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 + }),
572 581
573 582 // Notices
574 583 getNotices: () => apiClient.get(API_ENDPOINTS.NOTICES),
575 584 dismissNotice: (id: string) =>
@@ -687,8 +696,20 @@
687 696 apiClient.put(API_ENDPOINTS.ENQUIRIES_BULK, { action, ids }),
688 697 respondToEnquiry: (id: string | number, data: any) =>
689 698 apiClient.post(API_ENDPOINTS.ENQUIRY_RESPOND(id), data),
690 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 +
691 712 // Google Calendar
692 713 getGoogleCalendarSettings: () =>
693 714 apiClient.get(API_ENDPOINTS.GOOGLE_CALENDAR_SETTINGS),
694 715 connectGoogleCalendar: () =>
@@ -696,8 +717,15 @@
696 717 disconnectGoogleCalendar: () =>
697 718 apiClient.post(API_ENDPOINTS.GOOGLE_CALENDAR_DISCONNECT),
698 719 syncAllGoogleCalendar: () =>
699 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 }),
700 728 updateGoogleCalendarSettings: (data: any) =>
701 729 apiClient.post(API_ENDPOINTS.GOOGLE_CALENDAR_SETTINGS, data),
702 730
703 731 // Signed Consents