npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kashew/calendly-v2-sdk

v1.0.1

Published

Library to give developers a pleasurable integration experience with Calendly's v2 API

Downloads

118

Readme

Calendly V2 SDK

Library to give developers a pleasurable integration experience with Calendly's v2 API. For more information about Calendly v2 API, please visit Calendly's Developer Portal.

Installation

npm i -S @kashew/calendly-v2-sdk

Usage

For every resource offered by Calendly's v2 API, there exists a client for accessing that resource:

import {
  OAuthClient,
  EventTypesClient,
  OrganizationInvitationsClient,
  OrganizationMembershipsClient,
  ScheduledEventsClient,
  ScheduledEventInviteesClient,
  SchedulingLinksClient,
  UsersClient,
  WebhookPayloadClient,
  WebhookSubscriptionsClient
} from '@kashew/calendly-v2-sdk'

OAuthClient

Client used for making various calls concerning OAuth.

This client cannot handle the various front-end calls that needs to happen in order to get a code, but once you have a code, this client can handle the exchange for an access token along with subsequent refresh calls.

More details about this client can be found on the Wiki page: Wiki - OAuthClient

Parameters

  • clientId (string) - Client ID provided by Calendly
  • clientSecret (string) - Client Secret provided by Calendly

Example Usage

/**
 * Your Client ID and Client Secret are unique to you and should have been
 * provided when you requested access to Calendly's v2 API.
 */
const clientId = '<my_client_id>'
const clientSecret = '<my_client_secret>'

const client = new OAuthClient(clientId, clientSecret)

Method Signatures

async token(options: TokenOptions) : Promise<Token>

Calendly's v2 API Documentation: Get Access Token

async introspect(token: string): Promise<IntrospectResponse>

Calendly's v2 API Documentation: Introspect Access/Refresh Token

async revoke(token: string): Promise<void>

Calendly's v2 API Documentation: Revoke Access/Refresh Token


EventTypesClient

Client used for accessing Event Type resource data

More details about this client can be found on the Wiki page: Wiki - EventTypesClient

Parameters

  • token (Token) - Access Token that can be retrieved using the OAuthClient

Example Usage

const oauthClient = new OAuthClient(clientId, clientSecret)
const token = oauthClient.token({...})

const client = new EventTypesClient(token)

Method Signatures

async get(uuid: string): Promise<EventType>

Calendly's v2 API Documentation: Get Event Type

async list(options: EventTypeOptions): Promise<EventTypeList>

Calendly's v2 API Documentation: List Event Types


OrganizationInvitationsClient

Client used for accessing Organization Invitation resource data

More details about this client can be found on the Wiki page: Wiki - OrganizationInvitationsClient

Parameters

  • token (Token) - Access Token that can be retrieved using the OAuthClient
  • organizationUuid - UUID of the Organization

Example Usage

const oauthClient = new OAuthClient(clientId, clientSecret)
const token = oauthClient.token({...})

const organizationUuid = '<organization_uuid>'

const client = new OrganizationInvitationsClient(token, organizationUuid)

Method Signatures

async create(options: OrganizationInvitationCreateOptions): Promise<OrganizationInvitation>

Calendly's v2 API Documentation: Invite User to Organization

async delete(uuid: string): Promise<void>

Calendly's v2 API Documentation: Revoke User's Organization Invitation

async get(uuid: string): Promise<OrganizationInvitation>

Calendly's v2 API Documentation: Get Organization Invitation

async list(options: OrganizationInvitationOptions = {}): Promise<OrganizationInvitationList>

Calendly's v2 API Documentation: List Organization Invitations


OrganizationMembershipsClient

Client used for accessing Organization Membership resource data

More details about this client can be found on the Wiki page: Wiki - OrganizationMembershipsClient

Parameters

  • token (Token) - Access Token that can be retrieved using the OAuthClient

Example Usage

const oauthClient = new OAuthClient(clientId, clientSecret)
const token = oauthClient.token({...})

const client = new OrganizationMembershipsClient(token)

Method Signatures

async delete(uuid: string): Promise<void>

Calendly's v2 API Documentation: Remove User from Organization

async get(uuid: string): Promise<OrganizationMembership>

Calendly's v2 API Documentation: Get Organization Membership

async list(options: OrganizationMembershipOptions): Promise<OrganizationMembershipList>

Calendly's v2 API Documentation: List Organization Memberships


ScheduledEventsClient

Client used for accessing Scheduled Event resource data

More details about this client can be found on the Wiki page: Wiki - ScheduledEventsClient

Parameters

  • token (Token) - Access Token that can be retrieved using the OAuthClient

Example Usage

const oauthClient = new OAuthClient(clientId, clientSecret)
const token = oauthClient.token({...})

const client = new ScheduledEventsClient(token)

Method Signatures

async get(uuid: string): Promise<ScheduledEvent>

Calendly's v2 API Documentation: Get Event

async list(options: ScheduledEventOptions): Promise<ScheduledEventList>

Calendly's v2 API Documentation: List Events


ScheduledEventInviteesClient

Client used for accessing a Scheduled Event's Invitee resource data

More details about this client can be found on the Wiki page: Wiki - ScheduledEventInviteesClient

Parameters

  • token (Token) - Access Token that can be retrieved using the OAuthClient
  • scheduledEventUuid (string) - UUID of Scheduled Event

Example Usage

const oauthClient = new OAuthClient(clientId, clientSecret)
const token = oauthClient.token({...})

const scheduledEventUuid = '<scheduled_event_uuid>'

const client = new ScheduledEventInviteesClient(token, scheduledEventUuid)

Method Signatures

async get(uuid: string): Promise<Invitee>

Calendly's v2 API Documentation: Get Event Invitee

async list(options: InviteeOptions = {}): Promise<InviteeList>

Calendly's v2 API Documentation: List Event Invitees


SchedulingLinksClient

Client used for accessing Scheduling Link resource data

More details about this client can be found on the Wiki page: Wiki - SchedulingLinksClient

Parameters

  • token (Token) - Access Token that can be retrieved using the OAuthClient

Example Usage

const oauthClient = new OAuthClient(clientId, clientSecret)
const token = oauthClient.token({...})

const client = new SchedulingLinksClient(token)

Method Signatures

async create(options: SchedulingLinkCreateOptions): Promise<SchedulingLink>

Calendly's v2 API Documentation: Create Scheduling Link


UsersClient

Client used for accessing User resource data

More details about this client can be found on the Wiki page: Wiki - UsersClient

Parameters

  • token (Token) - Access Token that can be retrieved using the OAuthClient

Example Usage

const oauthClient = new OAuthClient(clientId, clientSecret)
const token = oauthClient.token({...})

const client = new UsersClient(token)

Method Signatures

async get(uuid: string): Promise<User>

Calendly's v2 API Documentation: Get User

async me(): Promise<User>

Calendly's v2 API Documentation: Get Current User


WebhookPayloadClient

Client used for accessing Webhook Subscription resource data

More details about this client can be found on the Wiki page: Wiki - WebhookPayloadClient

Parameters

  • webhookSigningKey (string) - Webhook Signing Key used to validate a webhook signature
  • tolerance (number) - Number of seconds that will be tolerated since the creation of the webhook payload

Example Usage

const webhookSigningKey = 'my_webhook_signing_key'
const tolerance = 180 // (i.e. 3 minutes)

const client = new WebhookPayloadClient(webhookSigningKey, tolerance)

Method Signatures

async verify(webhookSignature: String, message: WebhookPayloadEntity): Promise<void>

Calendly's v2 API Documentation: Verify Webhook Signatures


WebhookSubscriptionsClient

Client used for accessing Webhook Subscription resource data

More details about this client can be found on the Wiki page: Wiki - WebhookSubscriptionsClient

Parameters

  • token (Token) - Access Token that can be retrieved using the OAuthClient

Example Usage

const oauthClient = new OAuthClient(clientId, clientSecret)
const token = oauthClient.token({...})

const client = new WebhookSubscriptionsClient(token)

Method Signatures

async create(options: WebhookSubscriptionCreateOptions): Promise<WebhookSubscription>

Calendly's v2 API Documentation: Create Webhook Subscription

async delete(uuid: string): Promise<void>

Calendly's v2 API Documentation: Delete Webhook Subscription

async get(uuid: string): Promise<WebhookSubscription>

Calendly's v2 API Documentation: Get Webhook Subscription

async list(options: WebhookSubscriptionOptions): Promise<WebhookSubscriptionList>

Calendly's v2 API Documentation: List Webhook Subscriptions