Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3038933
Bump ajv
dependabot[bot] Feb 24, 2026
6035bdb
Merge pull request #31 from scheduleonce/dependabot/npm_and_yarn/mult…
khushigupta0625 Feb 27, 2026
5dadd1b
Bump fast-xml-parser from 5.3.7 to 5.4.1
dependabot[bot] Feb 27, 2026
c3fd64e
Merge pull request #38 from scheduleonce/dependabot/npm_and_yarn/fast…
sodsingh Feb 27, 2026
b6c3fa9
docs: add section on webhook delivery retries and best practices
mderazon Mar 4, 2026
41954ef
chore(deps): update package dependencies to latest versions
mderazon Mar 4, 2026
3d307a4
Bump svgo from 3.3.2 to 3.3.3
dependabot[bot] Mar 5, 2026
9586090
Merge pull request #39 from scheduleonce/dependabot/npm_and_yarn/svgo…
sodsingh Mar 6, 2026
e5eead5
Bump dompurify from 3.2.7 to 3.3.2
dependabot[bot] Mar 6, 2026
99a6f6a
Merge pull request #40 from scheduleonce/dependabot/npm_and_yarn/domp…
sodsingh Mar 6, 2026
a3fcdb1
fix vulnerabilities
Mar 12, 2026
24562b0
Merge branch 'dev' into security/ONCEHUB-111744
sodsingh Mar 12, 2026
b3dff62
Merge pull request #42 from scheduleonce/security/ONCEHUB-111744
sodsingh Mar 12, 2026
5b5489c
Bump unhead and @unhead/vue
dependabot[bot] Mar 12, 2026
8d609e5
Merge pull request #43 from scheduleonce/dependabot/npm_and_yarn/mult…
sodsingh Mar 13, 2026
9c35a87
Bump undici from 6.23.0 to 6.24.1
dependabot[bot] Mar 14, 2026
8bdd255
Bump flatted from 3.3.4 to 3.4.1
dependabot[bot] Mar 15, 2026
45dee07
Merge pull request #46 from scheduleonce/dependabot/npm_and_yarn/flat…
sodsingh Mar 16, 2026
0a0392b
Merge pull request #45 from scheduleonce/dependabot/npm_and_yarn/undi…
sodsingh Mar 16, 2026
45061e6
Bump fast-xml-parser from 5.5.3 to 5.5.6
dependabot[bot] Mar 18, 2026
c43401a
Merge pull request #48 from scheduleonce/dependabot/npm_and_yarn/fast…
sodsingh Mar 18, 2026
eba6be9
Bump fast-xml-parser from 5.5.6 to 5.5.7
dependabot[bot] Mar 20, 2026
a24e79b
Merge pull request #49 from scheduleonce/dependabot/npm_and_yarn/fast…
sodsingh Mar 20, 2026
dc31383
Bump flatted from 3.4.1 to 3.4.2
dependabot[bot] Mar 20, 2026
4e84be5
Merge pull request #50 from scheduleonce/dependabot/npm_and_yarn/flat…
sodsingh Mar 20, 2026
cc196c0
Bump picomatch
dependabot[bot] Mar 26, 2026
5923ddc
Reassign a booking" topic is updated. (#51)
anegiso Mar 26, 2026
735e33d
Updated Patch to Post
reevasatija-OnceHub Mar 26, 2026
9f9ce68
Bump yaml
dependabot[bot] Mar 27, 2026
9aa49dc
Merge pull request #55 from scheduleonce/dependabot/npm_and_yarn/mult…
sodsingh Mar 27, 2026
f7dd0c8
Bump handlebars from 4.7.8 to 4.7.9
dependabot[bot] Mar 27, 2026
68b47a2
Merge pull request #56 from scheduleonce/dependabot/npm_and_yarn/hand…
sodsingh Mar 27, 2026
2d11494
Bump node-forge from 1.3.2 to 1.4.0
dependabot[bot] Mar 27, 2026
0a8116b
Merge pull request #52 from scheduleonce/dependabot/npm_and_yarn/mult…
sodsingh Mar 27, 2026
d3a308f
Merge pull request #57 from scheduleonce/dependabot/npm_and_yarn/node…
sodsingh Mar 27, 2026
346c978
moved a particular error to 400 instead of 422.
reevasatija-OnceHub Mar 27, 2026
acadf57
Merge pull request #54 from scheduleonce/fix/PostUpdate
anegiso Mar 27, 2026
ec31877
Workflow for copilot auto fix
somanwal Mar 27, 2026
5ceb1cd
Merge pull request #58 from scheduleonce/mavericks/ONCEHUB-115095
vitesh-sethi-OH Mar 27, 2026
f995fb4
Updated runner
somanwal Mar 27, 2026
c1c171b
Merge pull request #59 from scheduleonce/mavericks/ONCEHUB-115095
vitesh-sethi-OH Mar 27, 2026
26dc913
Updated runner
somanwal Mar 27, 2026
765943d
Merge pull request #60 from scheduleonce/mavericks/ONCEHUB-115095
vitesh-sethi-OH Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/copilot-autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# .github/workflows/copilot-autofix.yml (in consumer repo)
name: Copilot Dependency Autofix

on:
workflow_dispatch:
inputs:
PACKAGE_NAME:
description: "npm package name (e.g. aws-sdk)"
required: true
type: string
FIXED_VERSION:
description: "Target fixed version (e.g. 3.0.1)"
required: true
type: string

permissions:
contents: write
pull-requests: write

concurrency:
group: copilot-autofix-${{ github.ref }}-${{ inputs.package_name }}
cancel-in-progress: true

jobs:
copilot-autofix:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: scheduleonce/github-workflows/.github/actions/copilot-dependency-autofix@main
with:
PACKAGE_NAME: ${{ inputs.PACKAGE_NAME }}
FIXED_VERSION: ${{ inputs.FIXED_VERSION }}
SO_INTEGRATION_TOKEN: ${{ secrets.SO_INTEGRATION_TOKEN }}
COPILOT_GITHUB_TOKEN: ${{ secrets.DEEPAK_TOKEN_POC }}
23 changes: 15 additions & 8 deletions docs/client-side-api/embedded-chatbot-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ description: Listen to real-time events from embedded OnceHub chatbot widgets in

## List of supported events

| Event name | Fires when |
| :------------------------------- | :---------------------------------------------------------- |
| `oncehub.chatbot.loaded` | Chatbot widget is first loaded, on page load. |
| `oncehub.chatbot.opened` | Visitor clicks anywhere to interact with the chatbot. |
| `oncehub.chatbot.started` | Visitor starts interacting with the chatbot. |
| `oncehub.chatbot.closed` | Visitor closes the chatbot widget. |
| `oncehub.chatbot.button_clicked` | Visitor clicks on a button during the chatbot conversation. |
| Event name | Fires when |
| :------------------------------- | :----------------------------------------------------------------------------- |
| `oncehub.chatbot.loaded` | Chatbot widget is first loaded, on page load. |
| `oncehub.chatbot.opened` | Visitor clicks anywhere to interact with the chatbot. |
| `oncehub.chatbot.started` | Visitor starts interacting with the chatbot. |
| `oncehub.chatbot.closed` | Visitor closes the chatbot widget. |
| `oncehub.chatbot.button_clicked` | Visitor submits an answer in the chatbot (by clicking send or pressing enter). |

## Events payloads

Expand Down Expand Up @@ -84,7 +84,14 @@ Payload example:
"bot_id": "BOT-1234",
"bot_name": "example bot",
"button_text": "confirm",
"interaction_label": "schedule"
"interaction_label": "single_choice",
"booking_calendar_name": "Sales Team Calendar",
"question_text": "How many people are in your organization?",
"answer": "100-500"
}
}
```

:::note
This event triggers whenever a visitor submits an answer in the chatbot (e.g., selecting an option, typing a response, or confirming), but does not trigger for AI-generated responses or live chat sessions with human agents.
:::
169 changes: 169 additions & 0 deletions docs/recipes/embed-calendar-cohosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
---
id: dynamic-co-host-selection
title: Dynamic co-host selection
description: Add checkboxes that update an embedded OnceHub calendar to include co-hosts.
slug: /recipes/dynamic-co-host-selection/
---

# Dynamic Co-Host selection

This recipe shows how to dynamically update the OnceHub Booking Calendar to show availability for specific team members based on user-selected checkboxes at runtime. It’s useful when you want guests to pick one or more team members and only show availability for the chosen co‑hosts.

## Prerequisites

- An active OnceHub Booking Calendar for the primary host. This Booking Calendar acts as the base for the booking and determines the meeting's primary configuration.
- An active seat/license and configured availability for all potential co-hosts.
- The standard OnceHub embed script integrated into your host page.
- A list of team member email addresses (as configured in OnceHub) to map to your checkbox values in the HTML.

## Example HTML

This implementation uses a list of checkboxes to dynamically update the Booking Calendar by appending the `co_hosts` parameter to the iframe URL. The JavaScript listens for selection changes and refreshes the iframe content in real-time.

```html
<div
class="booking-controls"
style="margin-bottom: 20px; font-family: sans-serif;"
>
<h3>Select Team Members</h3>
<p style="font-size: 14px; color: #666;">
Choose who you would like to meet with:
</p>

<div
id="team-selector-container"
style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;"
>
<label
style="display: flex; align-items: center; padding: 10px; border: 1px solid #ddd; border-radius: 8px; cursor: pointer;"
>
<input
type="checkbox"
class="oncehub-cohost-checkbox"
value="team.member1@example.com"
style="margin-right: 10px;"
/>
<span>Team Member A</span>
</label>

<label
style="display: flex; align-items: center; padding: 10px; border: 1px solid #ddd; border-radius: 8px; cursor: pointer;"
>
<input
type="checkbox"
class="oncehub-cohost-checkbox"
value="team.member2@example.com"
style="margin-right: 10px;"
/>
<span>Team Member B</span>
</label>
</div>
</div>

<div
id="oncehub-embed-wrapper"
style="border: 1px solid #eee; border-radius: 12px; overflow: hidden;"
>
<div
id="oncehub-target-div"
data-oh-booking-calendar-id="YOUR-BOOKING-CALENDAR-ID"
style="min-width:320px; height:700px;"
></div>

<script
type="text/javascript"
src="https://cdn.oncehub.com/cal/embed.js"
async
></script>
</div>

<script>
(function () {
const wrapper = document.getElementById("oncehub-embed-wrapper");
const checkboxes = document.querySelectorAll(".oncehub-cohost-checkbox");
let baseIframeSrc = null;

/**
* Helper to find the iframe injected by OnceHub
*/
function findOnceHubIframe() {
return wrapper.querySelector("iframe");
}

/**
* Updates the Calendar URL with selected co-hosts
*/
function refreshCalendar() {
const iframe = findOnceHubIframe();
if (!iframe) return;

// Store the original source on first run to preserve default parameters
if (!baseIframeSrc) {
baseIframeSrc = iframe.src;
}

// Gather all checked emails
const selectedEmails = Array.from(checkboxes)
.filter((cb) => cb.checked)
.map((cb) => cb.value);

// Construct new URL using the URL API
const url = new URL(baseIframeSrc);

if (selectedEmails.length > 0) {
// Append co_hosts as a comma-separated list
url.searchParams.set("co_hosts", selectedEmails.join(","));
} else {
// Remove parameter to show default availability
url.searchParams.delete("co_hosts");
}

// Setting the src triggers the iframe to reload with new availability
iframe.src = url.toString();
}

// Attach event listeners to all checkboxes
checkboxes.forEach((cb) => {
cb.addEventListener("change", refreshCalendar);
});

/**
* WATCHDOG: OnceHub loads its iframe asynchronously.
* We observe the wrapper to detect when the iframe is injected.
*/
const observer = new MutationObserver((mutations, obs) => {
const iframe = findOnceHubIframe();
if (iframe) {
baseIframeSrc = iframe.src;
console.log("OnceHub Widget initialized.");
obs.disconnect(); // Stop observing once the reference is captured
}
});

observer.observe(wrapper, { childList: true, subtree: true });
})();
</script>
```

:::info
The code below uses a placeholder. Replace YOUR-BOOKING-CALENDAR-ID with your actual booking calendar ID to initialize the embed correctly. Ensure the custom script is placed after the OnceHub embed script so the target container is available in the DOM.
:::

## How It Works

1. **Capture Base State:** The script identifies the OnceHub iframe and saves its initial URL.
2. **Filter Logic:** When a user toggles a checkbox, the script aggregates the selected email addresses.
3. **URL Update:** The `co_hosts` query parameter is appended to the iframe URL, triggering an automatic refresh of the calendar with filtered availability.

## Tips

- **Case Sensitivity:** While the email address itself is not case-sensitive, the `co_hosts` parameter and checkbox `value` attributes are. Ensure these exactly match the OnceHub user's email; if the case or spelling is incorrect, the parameter will be ignored.
- **Asynchronous Loading:** Because the OnceHub script injects the iframe asynchronously, the script includes a safety check (if (!iframe)) to ensure the calendar is present before attempting an update.
- **URL Integrity:** The script uses a `baseIframeSrc` variable to store the original URL. This prevents query parameters from "stacking" or duplicating during multiple selections.
- **Availability Logic:** Selecting multiple `co_hosts` will only display time slots where all chosen team members are simultaneously free.

---

See also:

- [Embedding a calendar](../client-side-api/embedded-booking-calendar-events.md)
28 changes: 28 additions & 0 deletions docs/recipes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
id: recipes-index
title: Recipes
slug: /recipes/
---

# Recipes

Practical how-to guides to help you build common workflows with the OnceHub APIs.

## Featured Solutions

### [Fetch Bookings Periodically](./fetch-bookings-periodically)

Learn how to poll the API for new or updated bookings with automatic pagination.

### [Dynamic Co-Host selection](./dynamic-co-host-selection)

Dynamically adjust your booking interface based on team availability.

## Getting Started

All recipes assume you have:

- A OnceHub API Key
- Node.js 18+ or a modern development environment

For authentication details, refer to the [API Reference](https://developers.oncehub.com/docs/overview/authentication/).
14 changes: 14 additions & 0 deletions docs/webhooks/using-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ You can register webhooks to send an HTTP POST request for specific types of boo

> 🚧 POST messages may contain sensitive customer data. Always use HTTPS when providing the receiving POST URL.
## Webhook Delivery Retries

If your endpoint does not return a successful `2xx` status code, the delivery is treated as failed and OnceHub retries it automatically.

Retries use exponential backoff, so the time between attempts increases over time.

Retries continue for up to about 3 days. If delivery still does not succeed within that retry window, the webhook is automatically disabled.

To avoid missed events, make sure your endpoint:

- Returns a `2xx` response as soon as the payload is accepted.
- Handles temporary errors and downtime gracefully.
- Logs failed deliveries so you can investigate and recover quickly.

## Check That Your Webhook is Configured Correctly

Once you have created your webhook subscription, you can check that it is configured correctly by using a service like <a target="_blank" href="https://webhook.site/">Webhook Tester</a>.
Expand Down
2 changes: 2 additions & 0 deletions openapi/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ paths:
$ref: "./resources/bookings/cancel.yaml#/bookings--id--cancel"
/bookings/{id}/request-reschedule:
$ref: "./resources/bookings/reschedule.yaml#/bookings--id--request-reschedule"
/bookings/{id}/reassign:
$ref: "./resources/bookings/reassign.yaml#/bookings--id--reassign"
/bookings/{id}/no-show:
$ref: "./resources/bookings/no-show.yaml#/bookings--id--no-show"

Expand Down
Loading
Loading