The UNPKG.com Javascript CDN that the Nylas docs recommend is incredibly unreliable with replies timing out or taking 60+ seconds most of the time. It’s been this way for over 5 weeks. Please remove it from the docs as the first recommendation on using the Scheduler JS.
Hey @bgadoury , really sorry for this mistake on our part. We did not mean to publish this CDN package yet as we were aware of the latency. Our main quick start guide didn’t have it listed, but it appears this page slipped.
We actually just finished making performance improvements and shipping a stable, usable version. I will work with the team to update the docs today or tomorrow.
These are the packages https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js and https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduling/nylas-scheduling.es.js
and here is an example implementation:
<body>
<nylas-scheduling></nylas-scheduling>
<script type="module">
import { defineCustomElement } from "https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduling/nylas-scheduling.es.js";
defineCustomElement();
const nylasScheduling = document.querySelector('nylas-scheduling');
// Set the scheduler configuration ID if using public configuration (`requires_session_auth=false`)
nylasScheduling.configurationId = '<SCHEDULER_CONFIG_ID>';
// OR, Set the scheduler session ID if using private configuration (`requires_session_auth=true`)
// nylasScheduling.sessionId = '<SCHEDULER_SESSION_ID>';
</script>
</body>
</html> ```