diff --git a/README.md b/README.md index 5d7f7b1..4c394a7 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,161 @@ ## Overview -[//]: # (TODO: Add overview mentioning the purpose of the module, supported REST API versions, and other high-level details.) +[Zoom](https://www.zoom.com/) is a video communications platform that enables users to schedule, host, and join virtual meetings, webinars, and conferences. + +The `ballerinax/zoom.scheduler` package offers APIs to connect and interact with [Zoom Scheduler](https://developers.zoom.us/docs/api/scheduler) endpoints, specifically based on Zoom API v2. ## Setup guide -[//]: # (TODO: Add detailed steps to obtain credentials and configure the module.) +To use the `ballerinax/zoom.scheduler` connector, you must have access to the Zoom API through [Zoom Marketplace](https://marketplace.zoom.us/) and a project under it. If you do not have a Zoom account, you can sign up for one [here](https://zoom.us/signup#/signup). + +### Step 1: Create a new app + +1. Open the [Zoom Marketplace](https://marketplace.zoom.us/). + +2. Click "Develop" → "Build App" + + ![Zoom marketplace](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/zoom-marketplace.png) + +3. Choose **"General App"** app type (for user authorization with refresh tokens) + + ![App Type](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/app-type.png) + +4. Fill in basic information + +### Step 2: Configure OAuth Settings + +1. **Note down your credentials**: + * Client ID + * Client Secret + + ![App Credentials](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/app-credentials.png) + +2. **Set Redirect URI**: Add your application's redirect URI (e.g., `http://localhost:8080/callback`) + + ![Redirect URI](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/redirect-URI.png) + +3. **Add Scopes**: Make sure your Zoom app has the necessary scopes for the Scheduler API: + * Add `scheduler:read`, `scheduler:write` and `user:read` in the scope + + ![Zoom Scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/zoom-scopes.png) + +### Step 3: Activate the App + +1. Complete all required information +2. Activate the app + + ![Activate App](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/activate-app.png) + +### Step 4: Get User Authorization + +1. **Direct users to authorization URL** (replace `YOUR_CLIENT_ID` and `YOUR_REDIRECT_URI`): +``` +https://zoom.us/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=scheduler:read scheduler:write user:read +``` + +2. **User authorizes the app** and gets redirected to your callback URL with an authorization code + +3. **Exchange authorization code for tokens**: +```curl +curl -X POST https://zoom.us/oauth/token \ + -H "Authorization: Basic $(echo -n 'CLIENT_ID:CLIENT_SECRET' | base64)" \ + -d "grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=YOUR_REDIRECT_URI" +``` + +This returns both `access_token` and `refresh_token`. + +Replace: +* `CLIENT_ID` with your app's Client ID +* `CLIENT_SECRET` with your app's Client Secret +* `AUTHORIZATION_CODE` with the code received from the callback +* `YOUR_REDIRECT_URI` with your configured redirect URI + +### Step 5: Verify Your Setup +```curl +curl -X GET "https://api.zoom.us/v2/users/me" \ + -H "Authorization: Bearer YOUR_ACCESS_TOKEN" +``` +This will give you the user ID needed for API calls. ## Quickstart -[//]: # (TODO: Add a quickstart guide to demonstrate a basic functionality of the module, including sample code snippets.) +To use the `ballerinax/zoom.scheduler` connector in your Ballerina application, update the `.bal` file as follows: + +### Step 1: Import the module + +Import the `zoom.scheduler` module. + +```ballerina +import ballerinax/zoom.scheduler; +``` + +### Step 2: Instantiate a new connector + +1. Create a `Config.toml` file and, configure the obtained credentials in the above steps as follows: + +```bash +clientId = "" +clientSecret = "" +refreshToken = "" +userId = "" +``` + +2. Create a `zoom.scheduler:ConnectionConfig` with the obtained access token and initialize the connector with it. + +```ballerina +configurable string clientId = ?; +configurable string clientSecret = ?; +configurable string refreshToken = ?; +configurable string userId = ?; + +final scheduler:Client zoomClient = check new ({ + auth: { + clientId, + clientSecret, + refreshUrl: "https://zoom.us/oauth/token", + refreshToken + } +}); +``` +### Step 3: Invoke the connector operation + +Now, utilize the available connector operations. + +#### Create a schedule + +```ballerina +public function main() returns error? { + zoom.scheduler:InlineResponse2011 schedule = check zoom.scheduler->/schedules.post( + payload = { + summary: "Team Meeting", + description: "Weekly team sync", + duration: 60 + } + ); + io:println("Schedule created with ID: ", schedule.scheduleId); +} +``` + +### Step 4: Run the Ballerina application + +```bash +bal run +``` ## Examples The `Zoom Scheduler` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-zoom.scheduler/tree/main/examples/), covering the following use cases: -[//]: # (TODO: Add examples) +1. **[Meeting Scheduler](https://github.com/ballerina-platform/module-ballerinax-zoom.scheduler/tree/main/examples/meeting-scheduler)** - Create scheduled meetings, generate single-use scheduling links, and manage team meeting schedules with automated booking capabilities. + +2. **[Availability Manager](https://github.com/ballerina-platform/module-ballerinax-zoom.scheduler/tree/main/examples/availability-manager)** - Configure availability schedules, analyze scheduler analytics, and manage working hours for different time zones and business requirements. + +## Issues and projects + +The **Issues** and **Projects** tabs are disabled for this repository as this is part of the Ballerina library. To report bugs, request new features, start new discussions, view project boards, etc., visit the Ballerina library [parent repository](https://github.com/ballerina-platform/ballerina-library). + +This repository only contains the source code for the package. ## Build from the source @@ -114,3 +254,4 @@ All the contributors are encouraged to read the [Ballerina Code of Conduct](http * For example demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/). * Chat live with us via our [Discord server](https://discord.gg/ballerinalang). * Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag. + \ No newline at end of file diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index c298017..23b19b2 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -5,8 +5,8 @@ name = "zoom.scheduler" version = "1.0.0" license = ["Apache-2.0"] authors = ["Ballerina"] -keywords = [] -# icon = "icon.png" # TODO: update icon.png +keywords = ["Zoom", "Video Conference", "Scheduling", "Calendar"] +icon = "icon.png" repository = "https://github.com/ballerina-platform/module-ballerinax-zoom.scheduler" [build-options] diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml new file mode 100644 index 0000000..3458f4f --- /dev/null +++ b/ballerina/Dependencies.toml @@ -0,0 +1,350 @@ +# AUTO-GENERATED FILE. DO NOT MODIFY. + +# This file is auto-generated by Ballerina for managing dependency versions. +# It should not be modified by hand. + +[ballerina] +dependencies-toml-version = "2" +distribution-version = "2201.12.7" + +[[package]] +org = "ballerina" +name = "auth" +version = "2.14.0" +dependencies = [ + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "log"} +] + +[[package]] +org = "ballerina" +name = "cache" +version = "3.10.0" +dependencies = [ + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "task"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "constraint" +version = "1.7.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "constraint", moduleName = "constraint"} +] + +[[package]] +org = "ballerina" +name = "crypto" +version = "2.9.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "data.jsondata" +version = "1.1.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] +modules = [ + {org = "ballerina", packageName = "data.jsondata", moduleName = "data.jsondata"} +] + +[[package]] +org = "ballerina" +name = "file" +version = "1.12.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "os"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "http" +version = "2.14.2" +dependencies = [ + {org = "ballerina", name = "auth"}, + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "data.jsondata"}, + {org = "ballerina", name = "file"}, + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "jwt"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.decimal"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "lang.regexp"}, + {org = "ballerina", name = "lang.runtime"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "lang.value"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "mime"}, + {org = "ballerina", name = "oauth2"}, + {org = "ballerina", name = "observe"}, + {org = "ballerina", name = "time"}, + {org = "ballerina", name = "url"} +] +modules = [ + {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} +] + +[[package]] +org = "ballerina" +name = "io" +version = "1.8.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"} +] + +[[package]] +org = "ballerina" +name = "jballerina.java" +version = "0.0.0" + +[[package]] +org = "ballerina" +name = "jwt" +version = "2.15.0" +dependencies = [ + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "lang.__internal" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] + +[[package]] +org = "ballerina" +name = "lang.array" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.__internal"} +] + +[[package]] +org = "ballerina" +name = "lang.decimal" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.error" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.int" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.__internal"}, + {org = "ballerina", name = "lang.object"} +] + +[[package]] +org = "ballerina" +name = "lang.object" +version = "0.0.0" + +[[package]] +org = "ballerina" +name = "lang.regexp" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.runtime" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.string" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.regexp"} +] + +[[package]] +org = "ballerina" +name = "lang.value" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "log" +version = "2.12.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"}, + {org = "ballerina", name = "observe"} +] +modules = [ + {org = "ballerina", packageName = "log", moduleName = "log"} +] + +[[package]] +org = "ballerina" +name = "mime" +version = "2.12.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "log"} +] + +[[package]] +org = "ballerina" +name = "oauth2" +version = "2.14.0" +dependencies = [ + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"}, + {org = "ballerina", name = "url"} +] + +[[package]] +org = "ballerina" +name = "observe" +version = "1.5.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "os" +version = "1.10.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "os", moduleName = "os"} +] + +[[package]] +org = "ballerina" +name = "task" +version = "2.7.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "test" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.error"} +] +modules = [ + {org = "ballerina", packageName = "test", moduleName = "test"} +] + +[[package]] +org = "ballerina" +name = "time" +version = "2.7.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "url" +version = "2.6.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "url", moduleName = "url"} +] + +[[package]] +org = "ballerinai" +name = "observe" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "observe"} +] +modules = [ + {org = "ballerinai", packageName = "observe", moduleName = "observe"} +] + +[[package]] +org = "ballerinax" +name = "zoom.scheduler" +version = "1.0.0" +dependencies = [ + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "data.jsondata"}, + {org = "ballerina", name = "http"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "os"}, + {org = "ballerina", name = "test"}, + {org = "ballerina", name = "url"}, + {org = "ballerinai", name = "observe"} +] +modules = [ + {org = "ballerinax", packageName = "zoom.scheduler", moduleName = "zoom.scheduler"} +] + diff --git a/ballerina/README.md b/ballerina/README.md index d3aaed5..e1ac1e4 100644 --- a/ballerina/README.md +++ b/ballerina/README.md @@ -1,17 +1,154 @@ ## Overview -[//]: # (TODO: Add overview mentioning the purpose of the module, supported REST API versions, and other high-level details.) +[Zoom](https://www.zoom.com/) is a video communications platform that enables users to schedule, host, and join virtual meetings, webinars, and conferences. + +The `ballerinax/zoom.scheduler` package offers APIs to connect and interact with [Zoom Scheduler](https://developers.zoom.us/docs/api/scheduler) endpoints, specifically based on Zoom API v2. ## Setup guide -[//]: # (TODO: Add detailed steps to obtain credentials and configure the module.) +To use the Zoom scheduler connector, you must have access to the Zoom API through [Zoom Marketplace](https://marketplace.zoom.us/) and a project under it. If you do not have a Zoom account, you can sign up for one [here](https://zoom.us/signup#/signup). + +### Step 1: Create a new app + +1. Open the [Zoom Marketplace](https://marketplace.zoom.us/). + +2. Click "Develop" → "Build App" + + ![Zoom marketplace](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/zoom-marketplace.png) + +3. Choose **"General App"** app type (for user authorization with refresh tokens) + + ![App Type](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/app-type.png) + +4. Fill in basic information + +### Step 2: Configure OAuth Settings + +1. **Note down your credentials**: + * Client ID + * Client Secret + + ![App Credentials](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/app-credentials.png) + +2. **Set Redirect URI**: Add your application's redirect URI (e.g., `http://localhost:8080/callback`) + + ![Redirect URI](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/redirect-URI.png) + +3. **Add Scopes**: Make sure your Zoom app has the necessary scopes for the Scheduler API: + * Add `scheduler:read`, `scheduler:write` and `user:read` in the scope + + ![Zoom Scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/zoom-scopes.png) + +### Step 3: Activate the App + +1. Complete all required information +2. Activate the app + + ![Activate App](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.scheduler/refs/heads/main/docs/setup/resources/activate-app.png) + +### Step 4: Get User Authorization + +1. **Direct users to authorization URL** (replace `YOUR_CLIENT_ID` and `YOUR_REDIRECT_URI`): +``` +https://zoom.us/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=scheduler:read scheduler:write user:read +``` + +2. **User authorizes the app** and gets redirected to your callback URL with an authorization code + +3. **Exchange authorization code for tokens**: + +```curl +curl -X POST https://zoom.us/oauth/token \ + -H "Authorization: Basic $(echo -n 'CLIENT_ID:CLIENT_SECRET' | base64)" \ + -d "grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=YOUR_REDIRECT_URI" +``` + +This returns both `access_token` and `refresh_token`. + +Replace: +* `CLIENT_ID` with your app's Client ID +* `CLIENT_SECRET` with your app's Client Secret +* `AUTHORIZATION_CODE` with the code received from the callback +* `YOUR_REDIRECT_URI` with your configured redirect URI + +### Step 5: Verify Your Setup + +```curl +curl -X GET "https://api.zoom.us/v2/users/me" \ + -H "Authorization: Bearer YOUR_ACCESS_TOKEN" +``` +This will give you the user ID needed for API calls. ## Quickstart -[//]: # (TODO: Add a quickstart guide to demonstrate a basic functionality of the module, including sample code snippets.) +To use the `ballerinax/zoom.scheduler` connector in your Ballerina application, update the `.bal` file as follows: + +### Step 1: Import the module + +Import the `zoom.scheduler` module. + +```ballerina +import ballerinax/zoom.scheduler; +``` + +### Step 2: Instantiate a new connector + +1. Create a `Config.toml` file and, configure the obtained credentials in the above steps as follows: + +```bash +clientId = "" +clientSecret = "" +refreshToken = "" +userId = "" +``` + +2. Create a `zoom.scheduler:ConnectionConfig` with the obtained access token and initialize the connector with it. + +```ballerina +configurable string clientId = ?; +configurable string clientSecret = ?; +configurable string refreshToken = ?; +configurable string userId = ?; + +final scheduler:Client zoomClient = check new ({ + auth: { + clientId, + clientSecret, + refreshUrl: "https://zoom.us/oauth/token", + refreshToken + } +}); +``` + +### Step 3: Invoke the connector operation + +Now, utilize the available connector operations. + +#### Create a schedule + +```ballerina +public function main() returns error? { + zoom.scheduler:InlineResponse2011 schedule = check zoom.scheduler->/schedules.post( + payload = { + summary: "Team Meeting", + description: "Weekly team sync", + duration: 60 + } + ); + io:println("Schedule created with ID: ", schedule.scheduleId); +} +``` + +### Step 4: Run the Ballerina application + +```bash +bal run +``` ## Examples The `Zoom Scheduler` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-zoom.scheduler/tree/main/examples/), covering the following use cases: -[//]: # (TODO: Add examples) +1. **[Meeting Scheduler](https://github.com/ballerina-platform/module-ballerinax-zoom.scheduler/tree/main/examples/meeting-scheduler)** - Create scheduled meetings, generate single-use scheduling links, and manage team meeting schedules with automated booking capabilities. + +2. **[Availability Manager](https://github.com/ballerina-platform/module-ballerinax-zoom.scheduler/tree/main/examples/availability-manager)** - Configure availability schedules, analyze scheduler analytics, and manage working hours for different time zones and business requirements. diff --git a/ballerina/client.bal b/ballerina/client.bal index c000777..34c07b5 100644 --- a/ballerina/client.bal +++ b/ballerina/client.bal @@ -1,3 +1,6 @@ +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + // Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, @@ -10,6 +13,228 @@ // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the +// KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. + +import ballerina/data.jsondata; +import ballerina/http; + +# The Scheduler APIs let you programmatically interact with [Zoom Scheduler](https://developers.zoom.us/docs/zoom-scheduler/) features. They allow you to schedule, manage, and retrieve details about meetings, webinars, and other events on the Zoom platform. With powerful tools for integration, these APIs streamline event management and automate workflows in external applications. +public isolated client class Client { + final http:Client clientEp; + # Gets invoked to initialize the `connector`. + # + # + config - The configurations to be used when initializing the `connector` + # + serviceUrl - URL of the target service + # + return - An error if connector initialization failed + public isolated function init(ConnectionConfig config, string serviceUrl = "https://api.zoom.us/v2/scheduler") returns error? { + http:ClientConfiguration httpClientConfig = {auth: config.auth, httpVersion: config.httpVersion, http1Settings: config.http1Settings, http2Settings: config.http2Settings, timeout: config.timeout, forwarded: config.forwarded, followRedirects: config.followRedirects, poolConfig: config.poolConfig, cache: config.cache, compression: config.compression, circuitBreaker: config.circuitBreaker, retryConfig: config.retryConfig, cookieConfig: config.cookieConfig, responseLimits: config.responseLimits, secureSocket: config.secureSocket, proxy: config.proxy, socketConfig: config.socketConfig, validation: config.validation, laxDataBinding: config.laxDataBinding}; + self.clientEp = check new (serviceUrl, httpClientConfig); + } + + # Report analytics + # + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - If successful, this method returns the scheduler analytics or the user ID or account ID provided + resource isolated function get analytics(map headers = {}, *ReportAnalyticsQueries queries) returns InlineResponse200|error { + string resourcePath = string `/analytics`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->get(resourcePath, headers); + } + + # List availability + # + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - Successful availability of the schedule query result of given user + resource isolated function get availability(map headers = {}, *ListAvailabilityQueries queries) returns InlineResponse2001|error { + string resourcePath = string `/availability`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->get(resourcePath, headers); + } + + # Insert availability + # + # + headers - Headers to be sent with the request + # + payload - In the request body, it supplies an availability resource properties + # + return - If successful, this method returns a availability resource in the response body + resource isolated function post availability(SchedulerAvailabilityBody payload, map headers = {}) returns InlineResponse201|error { + string resourcePath = string `/availability`; + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, headers); + } + + # Get availability + # + # + availabilityId - The UUID of the availability schedule + # + headers - Headers to be sent with the request + # + return - If successful, this method returns an availability resource in the response body + resource isolated function get availability/[string availabilityId](map headers = {}) returns InlineResponse2002|error { + string resourcePath = string `/availability/${getEncodedUri(availabilityId)}`; + return self.clientEp->get(resourcePath, headers); + } + + # Delete availability + # + # + availabilityId - The UUID of the availability schedule + # + headers - Headers to be sent with the request + # + return - If successful, this method returns an empty response body + resource isolated function delete availability/[string availabilityId](map headers = {}) returns error? { + string resourcePath = string `/availability/${getEncodedUri(availabilityId)}`; + return self.clientEp->delete(resourcePath, headers = headers); + } + + # Patch availability + # + # + availabilityId - The UUID of the availability schedule + # + headers - Headers to be sent with the request + # + payload - In the request body, supply availability resource properties + # + return - If successful, this method returns an empty response body + resource isolated function patch availability/[string availabilityId](AvailabilityavailabilityIdBody payload, map headers = {}) returns error? { + string resourcePath = string `/availability/${getEncodedUri(availabilityId)}`; + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->patch(resourcePath, request, headers); + } + + # List scheduled events + # + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - If successful, this method returns a response body with the following structure: + resource isolated function get events(map headers = {}, *ListScheduledEventsQueries queries) returns InlineResponse2003|error { + string resourcePath = string `/events`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->get(resourcePath, headers); + } + + # Get scheduled events + # + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - If successful, this method returns the scheduled event resource in the response body + resource isolated function get events/[string eventId](map headers = {}, *GetScheduledEventsQueries queries) returns InlineResponse2004|error { + string resourcePath = string `/events/${getEncodedUri(eventId)}`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->get(resourcePath, headers); + } + + # Delete scheduled events + # + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - If successful, this method returns an empty response body + resource isolated function delete events/[string eventId](map headers = {}, *DeleteScheduledEventsQueries queries) returns error? { + string resourcePath = string `/events/${getEncodedUri(eventId)}`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->delete(resourcePath, headers = headers); + } + + # Patch scheduled events + # + # + eventId - The opaque identifier of the scheduled event + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + payload - In the request body, it supplies the relevant portions of event resource + # + return - If successful, this method returns an event resource in the response body + resource isolated function patch events/[string eventId](EventseventIdBody payload, map headers = {}, *PatchScheduledEventsQueries queries) returns error? { + string resourcePath = string `/events/${getEncodedUri(eventId)}`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->patch(resourcePath, request, headers); + } + + # List schedules + # + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - If successful, this method returns a response body with this structure + resource isolated function get schedules(map headers = {}, *ListSchedulesQueries queries) returns InlineResponse2005|error { + string resourcePath = string `/schedules`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->get(resourcePath, headers); + } + + # Insert schedules + # + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + payload - In the request body, it supplies the schedule resource properties + # + return - If successful, this method returns an schedule resource in the response body + resource isolated function post schedules(SchedulerSchedulesBody payload, map headers = {}, *InsertScheduleQueries queries) returns InlineResponse2011|error { + string resourcePath = string `/schedules`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, headers); + } + + # Get schedules + # + # + scheduleId - The schedule's unique identifier + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - If successful, this method returns an schedule resource in the response body + resource isolated function get schedules/[string scheduleId](map headers = {}, *GetScheduleQueries queries) returns InlineResponse2006|error { + string resourcePath = string `/schedules/${getEncodedUri(scheduleId)}`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->get(resourcePath, headers); + } + + # Delete schedules + # + # + scheduleId - The unique identifier of the schedule + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - If successful, this method returns an empty response body + resource isolated function delete schedules/[string scheduleId](map headers = {}, *DeleteSchedulesQueries queries) returns error? { + string resourcePath = string `/schedules/${getEncodedUri(scheduleId)}`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->delete(resourcePath, headers = headers); + } + + # Patch schedules + # + # + scheduleId - The schedule's unique identifier + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + payload - In the request body, it supplies the relevant portions of a schedule resource, according to the rules of patch semantics + # + return - If successful, this method returns an empty response body + resource isolated function patch schedules/[string scheduleId](SchedulesscheduleIdBody payload, map headers = {}, *PatchScheduleQueries queries) returns error? { + string resourcePath = string `/schedules/${getEncodedUri(scheduleId)}`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->patch(resourcePath, request, headers); + } + + # Single use link + # + # + headers - Headers to be sent with the request + # + return - If successful, this method returns a scheduling link URL in the response body + resource isolated function post schedules/single_use_link(SchedulesSingleUseLinkBody payload, map headers = {}) returns InlineResponse2012|error { + string resourcePath = string `/schedules/single_use_link`; + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, headers); + } + + # Get user + # + # + headers - Headers to be sent with the request + # + return - If successful, this method returns user information in the response body + resource isolated function get users/[string userId](map headers = {}) returns InlineResponse2007|error { + string resourcePath = string `/users/${getEncodedUri(userId)}`; + return self.clientEp->get(resourcePath, headers); + } +} diff --git a/ballerina/icon.png b/ballerina/icon.png new file mode 100644 index 0000000..c52d1b0 Binary files /dev/null and b/ballerina/icon.png differ diff --git a/ballerina/tests/README.md b/ballerina/tests/README.md new file mode 100644 index 0000000..a86608a --- /dev/null +++ b/ballerina/tests/README.md @@ -0,0 +1,97 @@ +# Running Tests + +## Prerequisites +You need an access token from a Zoom developer account. + +To do this, refer to [Ballerina Zoom Connector](https://github.com/ballerina-platform/module-ballerinax-zoom.scheduler/blob/main/ballerina/README.md). + +And You need Find Your User ID to run some of the tests by running this curl command. +```curl +curl -X GET "https://api.zoom.us/v2/users/me" \ +-H "Authorization: Bearer YOUR_ACCESS_TOKEN" +``` + +# Running Tests + +There are two test environments for running the Zoom connector tests. The default test environment is the mock server for Zoom API. The other test environment is the actual Zoom API. + +You can run the tests in either of these environments and each has its own compatible set of tests. + + Test Groups | Environment +-------------|--------------------------------------------------- + mock_tests | Mock server for Zoom API (Default Environment) + live_tests | Zoom API + +## Running Tests in the Mock Server + +To execute the tests on the mock server, ensure that the `IS_LIVE_SERVER` environment variable is either set to `false` or unset before initiating the tests. + +This environment variable can be configured within the `Config.toml` file located in the tests directory or specified as an environmental variable. + +#### Using a Config.toml File + +Create a `Config.toml` file in the tests directory and the following content: + +```toml +isLiveServer = false +``` + +#### Using Environment Variables + +Alternatively, you can set your authentication credentials as environment variables: + +If you are using Linux or Mac, you can use the following method: +```bash + export IS_LIVE_SERVER=false +``` +If you are using Windows, you can use the following method: +```bash + setx IS_LIVE_SERVER false +``` +Then, run the following command to run the tests: + +```bash + ./gradlew clean test +``` + +## Running Tests Against Zoom Live API + +#### Using a Config.toml File + +Create a `Config.toml` file in the tests directory and add your authentication credentials as follows: + +```toml + isLiveServer = true + clientId = "your_client_id" + clientSecret = "your_client_secret" + refreshToken = "user_refresh_token_from_step4" + refreshUrl = "https://zoom.us/oauth/token" + userId = "user_id_from_step5" +``` + +#### Using Environment Variables + +Alternatively, you can set your authentication credentials as environment variables: + +If you are using Linux or Mac, you can use the following method: +```bash + export IS_LIVE_SERVER="true" + export ZOOM_CLIENT_ID="your_client_id" + export ZOOM_CLIENT_SECRET="your_client_secret" + export ZOOM_REFRESH_TOKEN="user_refresh_token_from_step4" + export ZOOM_USER_ID="user_id_from_step5" +``` + +If you are using Windows, you can use the following method: +```bash + setx IS_LIVE_SERVER true + setx ZOOM_CLIENT_ID "your_client_id" + setx ZOOM_CLIENT_SECRET "your_client_secret" + setx ZOOM_REFRESH_TOKEN "user_refresh_token_from_step4" + setx ZOOM_USER_ID "user_id_from_step5" +``` +Then, run the following command to run the tests: + +```bash + ./gradlew clean test +``` diff --git a/ballerina/tests/mock_service.bal b/ballerina/tests/mock_service.bal new file mode 100644 index 0000000..fd323f0 --- /dev/null +++ b/ballerina/tests/mock_service.bal @@ -0,0 +1,325 @@ +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/http; + +listener http:Listener httpListener = new (9090); + +service / on httpListener { + + # Report analytics + # + # + user_id - The specific user's web user ID + # + 'from - The lower bound for filtering + # + to - The upper bound for filtering + # + time_zone - The time zone in the response + # + return - returns can be any of following types + # http:Ok (If successful, this method returns the scheduler analytics.) + # error (The request has failed.) + resource function get analytics(string? user_id, string? 'from, string? to, string? time_zone) returns InlineResponse200|error { + return { + lastNDays: { + scheduledEventsCreated: 10, + scheduledEventsCompleted: 7, + scheduledEventsCanceled: 1, + scheduledEventsRescheduled: 1, + schedulesCreated: 5, + schedulesCanceled: 0, + oneToOne: 3, + oneToMany: 2, + anyHostAvailable: 5, + allHostAvailable: 3, + oneOffMeeting: 1, + meetingPoll: 0 + }, + previousPeriod: { + scheduledEventsCreated: 8, + scheduledEventsCompleted: 6, + scheduledEventsCanceled: 0, + scheduledEventsRescheduled: 2, + schedulesCreated: 3, + schedulesCanceled: 1, + oneToOne: 6, + oneToMany: 2, + anyHostAvailable: 4, + allHostAvailable: 2, + oneOffMeeting: 0, + meetingPoll: 1 + } + }; + } + + # List availability + # + # + page_size - The maximum number of availability returned + # + next_page_token - The token that specifies which result page to return + # + user_id - The return of the specific user's availability + # + return - returns can be any of following types + # http:Ok (Successful availability of the schedule query result.) + # error (The request has failed.) + resource function get availability(int? page_size, string? next_page_token, string? user_id) returns InlineResponse2001|error { + return { + items: [ + { + owner: "test-owner@example.com", + default: true, + name: "Working Hours", + availabilityId: "avail-123", + timeZone: "UTC" + } + ] + }; + } + + # Get availability + # + # + availabilityId - The UUID of the availability schedule. + # + return - returns can be any of following types + # http:Ok (If successful, this method returns an availability resource.) + # error (The request has failed.) + resource function get availability/[string availabilityId]() returns InlineResponse2002|error { + return { + owner: "test-owner@example.com", + default: true, + name: "Working Hours", + availabilityId: availabilityId, + timeZone: "UTC" + }; + } + + # Delete availability + # + # + availabilityId - The UUID of the availability schedule. + # + return - returns can be any of following types + # http:NoContent (If successful, this method returns an empty response body.) + # error (The request has failed.) + resource function delete availability/[string availabilityId]() returns error? { + return; + } + + # Patch availability + # + # + availabilityId - The UUID of the availability schedule. + # + return - returns can be any of following types + # http:NoContent (If successful, this method returns an empty response body.) + # error (The request has failed.) + resource function patch availability/[string availabilityId](@http:Payload AvailabilityavailabilityIdBody payload) returns error? { + return; + } + + # Insert availability + # + # + return - returns can be any of following types + # http:Created (If successful, this method returns an availability resource.) + # error (The request has failed.) + resource function post availability(@http:Payload SchedulerAvailabilityBody payload) returns InlineResponse201|error { + return { + owner: "test-owner@example.com", + default: true, + name: "New Working Hours", + availabilityId: "avail-new-123", + timeZone: "UTC" + }; + } + + # List scheduled events + # + # + to - The upper bound for filtering + # + 'from - The lower bound for filtering + # + page_size - The maximum number of events returned + # + order_by - Order by field + # + time_zone - The time zone in the response + # + next_page_token - The token for pagination + # + show_deleted - Whether to include deleted events + # + event_type - Event type filter + # + user_id - The specific user's scheduled events + # + search - Search term + # + return - returns can be any of following types + # http:Ok (If successful, this method returns scheduled events.) + # error (The request has failed.) + resource function get events(string? to, string? 'from, int? page_size, string? order_by, string? time_zone, string? next_page_token, boolean? show_deleted, string? event_type, string? user_id, string? search) returns InlineResponse2003|error { + return { + items: [ + { + eventId: "event-123", + summary: "Test Meeting", + description: "A test meeting", + startDateTime: "2024-06-15T10:00:00Z", + endDateTime: "2024-06-15T11:00:00Z", + status: "confirmed", + scheduleId: "schedule-456" + } + ] + }; + } + + # Get scheduled events + # + # + eventId - The event ID + # + user_id - User ID query parameter + # + return - returns can be any of following types + # http:Ok (If successful, this method returns the scheduled event resource.) + # error (The request has failed.) + resource function get events/[string eventId](string? user_id) returns InlineResponse2004|error { + return { + eventId: eventId, + summary: "Test Meeting", + description: "A test meeting", + startDateTime: "2024-06-15T10:00:00Z", + endDateTime: "2024-06-15T11:00:00Z", + status: "confirmed", + scheduleId: "schedule-456" + }; + } + + # Delete scheduled events + # + # + eventId - The event ID + # + user_id - User ID query parameter + # + return - returns can be any of following types + # http:NoContent (If successful, this method returns an empty response body.) + # error (The request has failed.) + resource function delete events/[string eventId](string? user_id) returns error? { + return; + } + + # Patch scheduled events + # + # + eventId - The opaque identifier of the scheduled event. + # + user_id - User ID query parameter + # + return - returns can be any of following types + # http:NoContent (If successful, this method returns an event resource.) + # error (The request has failed.) + resource function patch events/[string eventId](@http:Payload EventseventIdBody payload, string? user_id) returns error? { + return; + } + + # List schedules + # + # + to - The upper bound for filtering + # + 'from - The lower bound for filtering + # + page_size - The maximum number of schedule results returned + # + next_page_token - The token for pagination + # + show_deleted - Whether to include deleted schedules + # + time_zone - The time zone in the response + # + user_id - The specific user's schedules + # + return - returns can be any of following types + # http:Ok (If successful, this method returns schedules.) + # error (The request has failed.) + resource function get schedules(string? to, string? 'from, int? page_size, string? next_page_token, boolean? show_deleted, string? time_zone, string? user_id) returns InlineResponse2005|error { + return { + items: [ + { + scheduleId: "schedule-456", + summary: "Test Schedule", + description: "A test schedule", + duration: 30, + capacity: 1, + active: true, + status: "confirmed", + availabilityOverride: false + } + ] + }; + } + + # Insert schedules + # + # + user_id - User ID query parameter + # + return - returns can be any of following types + # http:Created (If successful, this method returns a schedule resource.) + # error (The request has failed.) + resource function post schedules(@http:Payload SchedulerSchedulesBody payload, string? user_id) returns InlineResponse2011|error { + return { + scheduleId: "schedule-new-789", + summary: payload.summary ?: "Default Summary", + description: payload.description ?: "Default description", + duration: payload.duration ?: 30, + capacity: payload.capacity, + active: payload.active ?: true, + availabilityOverride: payload.availabilityOverride, + status: "confirmed" + }; + } + + # Get schedules + # + # + scheduleId - The schedule's unique identifier. + # + user_id - User ID query parameter + # + return - returns can be any of following types + # http:Ok (If successful, this method returns a schedule resource.) + # error (The request has failed.) + resource function get schedules/[string scheduleId](string? user_id) returns InlineResponse2006|error { + return { + scheduleId: scheduleId, + summary: "Test Schedule", + description: "A test schedule", + duration: 30, + capacity: 1, + active: true, + status: "confirmed", + availabilityOverride: false + }; + } + + # Delete schedules + # + # + scheduleId - The unique identifier of the schedule. + # + user_id - User ID query parameter + # + return - returns can be any of following types + # http:NoContent (If successful, this method returns an empty response body.) + # error (The request has failed.) + resource function delete schedules/[string scheduleId](string? user_id) returns error? { + return; + } + + # Patch schedules + # + # + scheduleId - The schedule's unique identifier. + # + user_id - User ID query parameter + # + return - returns can be any of following types + # http:NoContent (If successful, this method returns an empty response body.) + # error (The request has failed.) + resource function patch schedules/[string scheduleId](@http:Payload SchedulesscheduleIdBody payload, string? user_id) returns error? { + return; + } + + # Single use link + # + # + return - returns can be any of following types + # http:Created (If successful, this method returns a scheduling link URL.) + # error (The request has failed.) + resource function post schedules/single_use_link(@http:Payload SchedulesSingleUseLinkBody payload) returns InlineResponse2012|error { + return { + schedulingUrl: "https://scheduler.zoom.us/single-use/" + payload.scheduleId + }; + } + + # Get user + # + # + userId - The user ID + # + return - returns can be any of following types + # http:Ok (If successful, this method returns user information.) + # error (The request has failed.) + resource function get users/[string userId]() returns InlineResponse2007|error { + return { + displayName: "Test User", + schedulingUrl: "https://scheduler.zoom.us/test-user", + timeZone: "UTC", + slug: "test-user" + }; + } +} diff --git a/ballerina/tests/sts_service.bal b/ballerina/tests/sts_service.bal new file mode 100644 index 0000000..bc9820a --- /dev/null +++ b/ballerina/tests/sts_service.bal @@ -0,0 +1,53 @@ +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/http; + +configurable int HTTP_STS_PORT = 9444; +configurable int TOKEN_VALIDITY_PERIOD = 10000; + +http:Listener stsListener = check new (HTTP_STS_PORT); + +http:Service sts = service object { + resource function post token() returns json { + return { + "access_token": "test-access-token", + "token_type": "Bearer", + "expires_in": TOKEN_VALIDITY_PERIOD, + "refresh_token": "test-refresh-token", + "scope": "scheduler:read scheduler:write" + }; + } + + resource function post introspect() returns json { + return { + "active": true, + "scope": "scheduler:read scheduler:write", + "client_id": "test-client-id", + "username": "test-user", + "token_type": "Bearer", + "exp": TOKEN_VALIDITY_PERIOD, + "iat": 1419350238, + "nbf": 1419350238, + "sub": "test-user-123", + "aud": "https://api.zoom.us", + "iss": "https://zoom.us/oauth/token", + "jti": "test-jwt-id", + "extension_field": "zoom-scheduler-test", + "scp": "scheduler:read scheduler:write" + }; + } +}; diff --git a/ballerina/tests/tests.bal b/ballerina/tests/tests.bal new file mode 100644 index 0000000..58e9424 --- /dev/null +++ b/ballerina/tests/tests.bal @@ -0,0 +1,194 @@ +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/test; + +configurable boolean isLiveServer = false; +configurable string userId = "test-user-123"; +configurable string serviceUrl = "http://localhost:9090"; + +configurable string clientId = "test-client-id"; +configurable string clientSecret = "test-client-secret"; +configurable string refreshToken = "test-refresh-token"; +configurable string refreshUrl = "http://localhost:9444/token"; + +ConnectionConfig config = { + auth: { + clientId, + clientSecret, + refreshUrl, + refreshToken + } +}; + +Client? zoomClient = (); + +@test:BeforeSuite +function startMockServices() returns error? { + if !isLiveServer { + _ = check stsListener.attach(sts, "/"); + check stsListener.'start(); + } + + zoomClient = check new Client(config, serviceUrl); +} + +@test:AfterSuite +function stopMockServices() returns error? { + if !isLiveServer { + check stsListener.gracefulStop(); + } +} + +final string testScheduleId = "test-schedule-456"; + +function getClient() returns Client|error { + Client? clientInstance = zoomClient; + if clientInstance is () { + return error("Client not initialized"); + } + return clientInstance; +} + +@test:Config { + groups: ["live_tests", "mock_tests"] +} +function testGetSchedulerAnalytics() returns error? { + Client zoomClientInstance = check getClient(); + InlineResponse200 response = check zoomClientInstance->/analytics.get(userId = userId); + test:assertTrue(response.lastNDays !is ()); +} + +@test:Config { + groups: ["live_tests", "mock_tests"] +} +function testGetSchedulerAvailability() returns error? { + Client zoomClientInstance = check getClient(); + InlineResponse2001 response = check zoomClientInstance->/availability.get(userId = userId); + test:assertTrue(response.items !is ()); +} + +@test:Config { + enable: !isLiveServer, + groups: ["mock_tests"] +} +function testGetSchedulerUser() returns error? { + Client zoomClientInstance = check getClient(); + InlineResponse2007 response = check zoomClientInstance->/users/[userId].get(); + test:assertTrue(response.displayName !is ()); +} + +@test:Config { + enable: !isLiveServer, + groups: ["mock_tests"] +} +function testCreateSchedule() returns error? { + Client zoomClientInstance = check getClient(); + SchedulerSchedulesBody schedulePayload = { + summary: "Test Schedule", + duration: 30, + capacity: 1, + availabilityRules: [{ + email: "test@example.com", + timeZone: "UTC" + }], + availabilityOverride: false + }; + + InlineResponse2011 response = check zoomClientInstance->/schedules.post(payload = schedulePayload, userId = userId); + test:assertTrue(response.scheduleId !is ()); +} + +@test:Config { + enable: !isLiveServer, + groups: ["mock_tests"] +} +function testGetSchedule() returns error? { + Client zoomClientInstance = check getClient(); + InlineResponse2006 response = check zoomClientInstance->/schedules/[testScheduleId].get(userId = userId); + test:assertTrue(response.summary !is ()); +} + +@test:Config { + groups: ["live_tests", "mock_tests"] +} +function testListSchedules() returns error? { + Client zoomClientInstance = check getClient(); + InlineResponse2005 response = check zoomClientInstance->/schedules.get(userId = userId, pageSize = 10); + test:assertTrue(response.items !is ()); +} + +@test:Config { + groups: ["live_tests", "mock_tests"] +} +function testGetSchedulerAnalyticsWithDateRange() returns error? { + Client zoomClientInstance = check getClient(); + string fromDate = "2024-01-01"; + string toDate = "2024-12-31"; + + InlineResponse200 response = check zoomClientInstance->/analytics.get(userId = userId, 'from = fromDate, to = toDate); + test:assertTrue(response.lastNDays !is ()); +} + +@test:Config { + enable: !isLiveServer, + groups: ["mock_tests"] +} +function testListSchedulesWithPagination() returns error? { + Client zoomClientInstance = check getClient(); + InlineResponse2005 response = check zoomClientInstance->/schedules.get( + userId = userId, + pageSize = 5, + nextPageToken = "test-pagination-token" + ); + test:assertTrue(response.items !is ()); +} + +@test:Config { + enable: !isLiveServer, + groups: ["mock_tests"] +} +function testCreateScheduleWithComplexRules() returns error? { + Client zoomClientInstance = check getClient(); + SchedulerSchedulesBody schedulePayload = { + summary: "Complex Schedule", + duration: 60, + capacity: 5, + availabilityRules: [ + { + email: "user1@example.com", + timeZone: "UTC" + }, + { + email: "user2@example.com", + timeZone: "America/Los_Angeles" + } + ], + availabilityOverride: false + }; + + InlineResponse2011 response = check zoomClientInstance->/schedules.post(payload = schedulePayload, userId = userId); + test:assertTrue(response.scheduleId !is ()); +} + +@test:Config { + groups: ["live_tests", "mock_tests"] +} +function testListScheduledEvents() returns error? { + Client zoomClientInstance = check getClient(); + InlineResponse2003 response = check zoomClientInstance->/events.get(userId = userId, pageSize = 10); + test:assertTrue(response.items !is ()); +} diff --git a/ballerina/types.bal b/ballerina/types.bal new file mode 100644 index 0000000..1ceabf4 --- /dev/null +++ b/ballerina/types.bal @@ -0,0 +1,1376 @@ +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/constraint; +import ballerina/data.jsondata; +import ballerina/http; + +# The week of available time rule +public type InlineResponse2006SegmentsRecurrence record { + # Thursday + ScheduleravailabilitySegmentsRecurrenceSun[] thu?; + # Tuesday + ScheduleravailabilitySegmentsRecurrenceSun[] tue?; + # Wednesday + ScheduleravailabilitySegmentsRecurrenceSun[] wed?; + # Saturday + ScheduleravailabilitySegmentsRecurrenceSun[] sat?; + # Friday + ScheduleravailabilitySegmentsRecurrenceSun[] fri?; + # Sundays + ScheduleravailabilitySegmentsRecurrenceSun[] sun?; + # Monday + ScheduleravailabilitySegmentsRecurrenceSun[] mon?; +}; + +# The availability schedule set by the user +public type SchedulerAvailabilityBody record { + # the owner's ID + string owner?; + # The default availability schedule in use + boolean default?; + # The name of this availability schedule + @constraint:String {minLength: 1} + string name; + # The unique ID of availability + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + ScheduleravailabilitySegmentsRecurrence segmentsRecurrence?; + # The timezone for which this availability schedule originates + @jsondata:Name {value: "time_zone"} + string timeZone; + # The date on which the rule needs to be applied outside of the availability rule + ScheduleravailabilitySegments[] segments?; +}; + +# The creator of the schedule. The field is read-only +public type InlineResponse2011Creator record { + # This field indicates if you created the schedule. The field is read-only + boolean self?; + # This field indicates the creator of the display name + @jsondata:Name {value: "display_name"} + string displayName?; + # This field indicates the creator's email address + string email?; +}; + +public type InlineResponse2005AvailabilityRules record { + # This field indicates the use of custom availability instead of the rule + @jsondata:Name {value: "use_custom"} + boolean useCustom?; + # The ID of this availability rule. + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesscheduleIdSegmentsRecurrence1 segmentsRecurrence?; + # The timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The owner of this availability rule. + string email?; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; +}; + +public type SchedulesSingleUseLinkBody record { + # The unique identifier of a schedule + @jsondata:Name {value: "schedule_id"} + string scheduleId; +}; + +public type SchedulerschedulesCustomFields record { + # The invitee's option(s) for `single_select` or `multi_select` type of responses + @jsondata:Name {value: "answer_choices"} + SchedulerschedulesCustomFieldsAnswerchoicesItemsString[] answerChoices?; + # The ID of this question + @jsondata:Name {value: "custom_field_id"} + string customFieldId?; + # The type of response that the invitee provides to the custom question. It can be one or multiple lines of text, a phone number, or single- or multiple-select.[`string text phone_number single_select multi_select`] + "text"|"string"|"phone_number"|"choices_one"|"choices_many"|"select" format; + # The custom question the host created for the event type + string name; + # This field is true if the custom question allows invitees to record a written response in addition to single-select or multiple-select type of responses. This field is false if the custom question does not allow invitees to record a written response + @jsondata:Name {value: "include_other"} + boolean includeOther; + # The position of this question + decimal position; + # This field is true if the question the host creates is ON and visible on the event booking page. This field is false if it's OFF and invisible on the event booking page + boolean enabled; + # This field is true if a response to the question created by the host is required for invitees to book the event type. This field is false if a response to the question created by the host is not required for invitees to book the event type + boolean required; +}; + +# Represents the Queries record for the operation: get_scheduled_events +public type GetScheduledEventsQueries record { + # This field indicates whether the admin handles certain users. It's only for admin + @http:Query {name: "user_id"} + string userId?; +}; + +public type SchedulesscheduleIdBody record { + # The method of `addOn`, such as Zoom meeting, Zoom phone, and offline + @jsondata:Name {value: "add_on_type"} + "zoomMeeting"|"zoomPhone"|"offline" addOnType?; + # The schedule's end date + @jsondata:Name {value: "end_date"} + string endDate?; + # This field sets the frequency of available time slots for invitees + @jsondata:Name {value: "start_time_increment"} + decimal startTimeIncrement?; + # The event's summary + @constraint:String {maxLength: 256} + string summary?; + # The hexadecimal color value of the event type's scheduling page + string color?; + # The custom question + @jsondata:Name {value: "custom_fields"} + SchedulerschedulesscheduleIdCustomFields[] customFields?; + # The schedule's description + @constraint:String {maxLength: 8192} + string description?; + # This field indicates if the schedule is active + boolean active?; + # This field sets the maximum events allowed per day + @jsondata:Name {value: "booking_limit"} + decimal bookingLimit?; + # This field indicates if the event type is hidden on the owner's main scheduling page + boolean secret?; + # the timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The availability time rule + @jsondata:Name {value: "availability_rules"} + SchedulerschedulesscheduleIdAvailabilityRules[] availabilityRules?; + # The maximum invitees per event + @constraint:Number {minValue: 1, maxValue: 200} + decimal capacity?; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; + # The duration of meeting in minutes, range: [1, 1440] + @constraint:Number {minValue: 15, maxValue: 1440} + decimal duration?; + # The minimum time before a schedule starts that attendees can book + @constraint:Number {minValue: 0, maxValue: 14340} + decimal cushion?; + # The information for a custom location + @constraint:String {maxLength: 1024} + string location?; + # The extra time before or after booked schedule + SchedulerschedulesscheduleIdBuffer buffer?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesscheduleIdSegmentsRecurrence1 segmentsRecurrence?; + # The event portion of the event's URL that identifies a specific web page + @constraint:String {maxLength: 256, minLength: 3} + string slug?; + # The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate` + @jsondata:Name {value: "interval_type"} + "unlimited"|"fixed" intervalType?; + # This field indicates the use of the availability rule + @jsondata:Name {value: "availability_override"} + boolean availabilityOverride?; + # The schedule's start date + @jsondata:Name {value: "start_date"} + string startDate?; + # The status of schedule, confirmed or cancelled + "confirmed"|"cancelled" status?; +}; + +public type InlineResponse2003Items record { + # The event's summary + @constraint:String {maxLength: 256} + string summary?; + # The attendees of the event + InlineResponse2003Attendees[] attendees?; + # The meeting notes of the event + @jsondata:Name {value: "meeting_notes"} + string meetingNotes?; + # The event's description + @constraint:String {maxLength: 8192} + string description?; + # The scheduled event end date time + @jsondata:Name {value: "end_date_time"} + string endDateTime?; + # The unique identifier of event + @jsondata:Name {value: "event_id"} + string eventId?; + # This field indicates the type is default(scheduled) or pending event + @jsondata:Name {value: "event_type"} + "default"|"pending" eventType?; + # The information to track the source of invitee. This occurs when you add UTM parameters in schedule links + @jsondata:Name {value: "tracking_params"} + InlineResponse2003TrackingParams[] trackingParams?; + # The guest's collection + string[] guests?; + # The information for a custom location + @constraint:String {maxLength: 1024} + string location?; + # The scheduled event start date time + @jsondata:Name {value: "start_date_time"} + string startDateTime?; + # The unique identifier of schedule + @jsondata:Name {value: "schedule_id"} + string scheduleId?; + # The moment the event was updated + string updated?; + # The meeting details for when users have scheduled appointments + @jsondata:Name {value: "external_location"} + record {string kind?; string meeting_id?; string personal_meeting_id?; string meeting_passcode?; string meeting_description?; string meeting_join_url?;} externalLocation?; + # The status of event: confirmed or cancelled + "confirmed"|"cancelled" status?; +}; + +public type InlineResponse2011CustomFields record { + # The invitee's option(s) for single_select or multi_select type of responses + @jsondata:Name {value: "answer_choices"} + InlineResponse2011CustomFieldsAnswerchoicesItemsString[] answerChoices?; + # The ID of this question + @jsondata:Name {value: "custom_field_id"} + string customFieldId?; + # The type of response that the invitee provides to the custom question. It can be one or multiple lines of text, a phone number, or single- or multiple-select.[`string text phone_number single_select multi_select`] + "text"|"string"|"phone_number"|"choices_one"|"choices_many"|"select" format; + # The custom question the host created for the event type + string name; + # This field is true if the custom question allows invitees to record a written response in addition to single-select or multiple-select type of responses. This field is false if the custom question does not allow invitees to record a written response + @jsondata:Name {value: "include_other"} + boolean includeOther; + # The position of this question + decimal position; + # This field is true if the question the host creates is ON and visible on the event booking page. This field is false if it's OFF and invisible on the event booking page + boolean enabled; + # This field is true if a response to the question created by the host is required for invitees to book the event type. This field is false if a response to the question created by the host is not required for invitees to book the event type + boolean required; +}; + +public type InlineResponse2006AvailabilityRules record { + # This field indicates the use of custom availability instead of the rule + @jsondata:Name {value: "use_custom"} + boolean useCustom?; + # The ID of this availability rule. + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + InlineResponse2006SegmentsRecurrence segmentsRecurrence?; + # The timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The owner of this availability rule. + string email?; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; +}; + +# Represents the Queries record for the operation: get_schedule +public type GetScheduleQueries record { + # This field indicates that admins handle certain users. This setting is only for admin + @http:Query {name: "user_id"} + string userId?; +}; + +public type InlineResponse2011CustomFieldsAnswerchoicesItemsString string; + +# Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. +@display {label: "Connection Config"} +public type ConnectionConfig record {| + # Configurations related to client authentication + http:BearerTokenConfig|http:OAuth2RefreshTokenGrantConfig auth; + # The HTTP version understood by the client + http:HttpVersion httpVersion = http:HTTP_2_0; + # Configurations related to HTTP/1.x protocol + http:ClientHttp1Settings http1Settings = {}; + # Configurations related to HTTP/2 protocol + http:ClientHttp2Settings http2Settings = {}; + # The maximum time to wait (in seconds) for a response before closing the connection + decimal timeout = 30; + # The choice of setting `forwarded`/`x-forwarded` header + string forwarded = "disable"; + # Configurations associated with Redirection + http:FollowRedirects followRedirects?; + # Configurations associated with request pooling + http:PoolConfiguration poolConfig?; + # HTTP caching related configurations + http:CacheConfig cache = {}; + # Specifies the way of handling compression (`accept-encoding`) header + http:Compression compression = http:COMPRESSION_AUTO; + # Configurations associated with the behaviour of the Circuit Breaker + http:CircuitBreakerConfig circuitBreaker?; + # Configurations associated with retrying + http:RetryConfig retryConfig?; + # Configurations associated with cookies + http:CookieConfig cookieConfig?; + # Configurations associated with inbound response size limits + http:ResponseLimitConfigs responseLimits = {}; + # SSL/TLS-related options + http:ClientSecureSocket secureSocket?; + # Proxy server related options + http:ProxyConfig proxy?; + # Provides settings related to client socket configuration + http:ClientSocketConfig socketConfig = {}; + # Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default + boolean validation = true; + # Enables relaxed data binding on the client side. When enabled, `nil` values are treated as optional, + # and absent fields are handled as `nilable` types. Enabled by default. + boolean laxDataBinding = true; +|}; + +public type InlineResponse2011AvailabilityRules record { + # This field indicates the use of custom availability instead of the rule + @jsondata:Name {value: "use_custom"} + boolean useCustom?; + # The ID of this availability rule. + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesSegmentsRecurrence segmentsRecurrence?; + # The timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The owner of this availability rule. + string email?; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; +}; + +# The organizer of the schedule. This field is read-only +public type InlineResponse2011Organizer record { + # This field indicates if this user is the organizer. This field is read-only + boolean self?; + # The organizer's display name + @jsondata:Name {value: "display_name"} + string displayName?; + # The organizer's email address + string email?; +}; + +public type SchedulerschedulesscheduleIdAvailabilityRules record { + # This field indicates whether to use the custom availability instead of the rule + @jsondata:Name {value: "use_custom"} + boolean useCustom?; + # The ID of this availability rule. + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesscheduleIdSegmentsRecurrence segmentsRecurrence?; + # The timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The owner of this availability rule. + string email?; + # The available time segments of the event + SchedulerschedulesscheduleIdSegments[] segments?; +}; + +# Represents the Queries record for the operation: insert_schedule +public type InsertScheduleQueries record { + # This field indicates that the admin handles certain users. This setting is only for admin + @http:Query {name: "user_id"} + string userId?; +}; + +# The date interval to override +public type ScheduleravailabilitySegments record { + # This field indicates the start date to override + string 'start; + # This field indicates the end date to override + string end; +}; + +public type InlineResponse2004TrackingParams record { + # The scheduler tags that correspond to UTM parameters one by one + string label?; + # The value of UTM parameters set in schedule links by host + string value?; + # The UTM parameters in schedule links + string 'key?; +}; + +public type InlineResponse2001Items record { + # The owner's ID + string owner?; + boolean default?; + string name?; + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + InlineResponse2001SegmentsRecurrence segmentsRecurrence?; + @jsondata:Name {value: "time_zone"} + string timeZone?; +}; + +# The rules of this availability schedule +public type ScheduleravailabilitySegmentsRecurrence record { + # Thursday + ScheduleravailabilitySegmentsRecurrenceSun[] thu?; + # Tuesday + ScheduleravailabilitySegmentsRecurrenceSun[] tue?; + # Wednesday + ScheduleravailabilitySegmentsRecurrenceSun[] wed?; + # Saturday + ScheduleravailabilitySegmentsRecurrenceSun[] sat?; + # Friday + ScheduleravailabilitySegmentsRecurrenceSun[] fri?; + # Sundays + ScheduleravailabilitySegmentsRecurrenceSun[] sun?; + # Monday + ScheduleravailabilitySegmentsRecurrenceSun[] mon?; +}; + +public type InlineResponse2003Attendees record { + # This field indicates when the attendee attended this event + string created?; + # The ID of attendee + @jsondata:Name {value: "attendee_id"} + string attendeeId?; + # The attendee's last name + @jsondata:Name {value: "last_name"} + string lastName?; + # The attendee's name + @jsondata:Name {value: "display_name"} + string displayName?; + # The attendee's time zone + @jsondata:Name {value: "time_zone"} + string timeZone?; + # Whether to show events or not + @jsondata:Name {value: "no_show"} + boolean noShow?; + # Whether the attendee is the booker + boolean booker?; + # The attendee's first name + @jsondata:Name {value: "first_name"} + string firstName?; + # The attendee's email + string email?; +}; + +public type InlineResponse2001SegmentsRecurrence record { + # Thursday + ScheduleravailabilitySegmentsRecurrenceSun[] thu?; + # Tuesday + ScheduleravailabilitySegmentsRecurrenceSun[] tue?; + # Wednesday + ScheduleravailabilitySegmentsRecurrenceSun[] wed?; + # Saturday + ScheduleravailabilitySegmentsRecurrenceSun[] sat?; + # Friday + ScheduleravailabilitySegmentsRecurrenceSun[] fri?; + # Sunday + ScheduleravailabilitySegmentsRecurrenceSun[] sun?; + # Monday + ScheduleravailabilitySegmentsRecurrenceSun[] mon?; +}; + +# the stats of the previous period with a length of also N. Last N day is counting from today and backtrace N days. Previous period is counting from N days ago and back tracking another N days +public type InlineResponse200PreviousPeriod record { + # The number of "all host available" type schedules + @jsondata:Name {value: "all_host_available"} + int allHostAvailable?; + # The number of rescheduled scheduled events + @jsondata:Name {value: "scheduled_events_rescheduled"} + int scheduledEventsRescheduled?; + # The number of completed scheduled events + @jsondata:Name {value: "scheduled_events_completed"} + int scheduledEventsCompleted?; + # The number of cancelled schedules + @jsondata:Name {value: "schedules_canceled"} + int schedulesCanceled?; + # The number of "one-off" type schedules + @jsondata:Name {value: "one_off_meeting"} + int oneOffMeeting?; + # The number of "meeting poll" type schedules + @jsondata:Name {value: "meeting_poll"} + int meetingPoll?; + # The number of "one to many" type schedules + @jsondata:Name {value: "one_to_many"} + int oneToMany?; + # The number of "any host available" type schedules + @jsondata:Name {value: "any_host_available"} + int anyHostAvailable?; + # The number of cancelled scheduled events + @jsondata:Name {value: "scheduled_events_canceled"} + int scheduledEventsCanceled?; + # The number of "one to one" type schedules + @jsondata:Name {value: "one_to_one"} + int oneToOne?; + # The number of created scheduled events + @jsondata:Name {value: "scheduled_events_created"} + int scheduledEventsCreated?; + # The number of created schedules + @jsondata:Name {value: "schedules_created"} + int schedulesCreated?; +}; + +public type SchedulereventseventIdAttendees record { + # The ID of attendee + @jsondata:Name {value: "attendee_id"} + string attendeeId?; + # This field inidcates the attendee if shown in the scheduled event + @jsondata:Name {value: "no_show"} + boolean noShow?; + # The attendee's email + string email?; +}; + +# The week of the available time rule +public type SchedulerschedulesSegmentsRecurrence record { + # Thursday + ScheduleravailabilitySegmentsRecurrenceSun[] thu?; + # Tuesday + ScheduleravailabilitySegmentsRecurrenceSun[] tue?; + # Wednesday + ScheduleravailabilitySegmentsRecurrenceSun[] wed?; + # Saturday + ScheduleravailabilitySegmentsRecurrenceSun[] sat?; + # Friday + ScheduleravailabilitySegmentsRecurrenceSun[] fri?; + # Sundays + ScheduleravailabilitySegmentsRecurrenceSun[] sun?; + # Monday + ScheduleravailabilitySegmentsRecurrenceSun[] mon?; +}; + +public type SchedulerSchedulesBody record { + # The method of the type of `addOn`, such as Zoom meeting, Zoom phone, or offline + @jsondata:Name {value: "add_on_type"} + "zoomMeeting"|"zoomPhone"|"offline" addOnType?; + # The schedule's end date + @jsondata:Name {value: "end_date"} + string endDate?; + # This field sets the frequency of available time slots for invitees + @jsondata:Name {value: "start_time_increment"} + decimal startTimeIncrement?; + # The event's summary + @constraint:String {maxLength: 256} + string summary?; + # This field indicates if the schedule type is "one" (belongs to an individual user) or "multiple" + @jsondata:Name {value: "schedule_type"} + "one"|"multiple" scheduleType?; + # The hexadecimal color value of the event type's scheduling page + string color?; + # This field contains the custom question + @jsondata:Name {value: "custom_fields"} + SchedulerschedulesCustomFields[] customFields?; + # The schedule's description + @constraint:String {maxLength: 8192} + string description?; + # This field indicates if the schedule is active + boolean active?; + # This field sets the maximum events allowed per day + @jsondata:Name {value: "booking_limit"} + decimal bookingLimit?; + # This field indicates if the event type is hidden on the owner's main scheduling page + boolean secret?; + # The timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The availability of the time rule + @jsondata:Name {value: "availability_rules"} + SchedulerschedulesAvailabilityRules[] availabilityRules; + # This field indicates the maximum invitees per event + @constraint:Number {minValue: 1, maxValue: 200} + decimal capacity; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; + # This field indicates the duration of the meeting in minutes, range: [1, 1440] + @constraint:Number {minValue: 15, maxValue: 1440} + decimal duration?; + # This field indicates the minimum time before a schedule starts when the attendees can book + @constraint:Number {minValue: 0, maxValue: 14340} + decimal cushion?; + # The information for a custom location + @constraint:String {maxLength: 1024} + string location?; + # This field indicates the extra time before or after the booked schedule + SchedulerschedulesBuffer buffer?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesSegmentsRecurrence segmentsRecurrence?; + # The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate` + @jsondata:Name {value: "interval_type"} + "unlimited"|"fixed" intervalType?; + # The event portion of the event's URL that identifies a specific web page + @constraint:String {maxLength: 256, minLength: 3} + string slug?; + # This field indicates the use of the availability rule + @jsondata:Name {value: "availability_override"} + boolean availabilityOverride; + # The schedule's start date + @jsondata:Name {value: "start_date"} + string startDate?; +}; + +# Represents the Queries record for the operation: patch_scheduled_events +public type PatchScheduledEventsQueries record { + # This field indicates whether the admin handles certain users. It's only for admin + @http:Query {name: "user_id"} + string userId?; +}; + +public type InlineResponse2003TrackingParams record { + # The scheduler tags that correspond to UTM parameters one by one + string label?; + # The value of UTM parameters set in schedule links by host + string value?; + # The UTM parameters in the schedule links + string 'key?; +}; + +# This field indicates the extra time before or after the booked schedule +public type SchedulerschedulesBuffer record { + # This field adds the time after the booked schedule + @constraint:Number {minValue: 0, maxValue: 240} + decimal before?; + # This field adds the time before the booked schedule + @constraint:Number {minValue: 0, maxValue: 240} + decimal after?; +}; + +# The extra time before or after booked schedule +public type SchedulerschedulesscheduleIdBuffer record { + # This field adds time after the booked schedule + @constraint:Number {minValue: 0, maxValue: 240} + decimal before?; + # This field adds time before the booked schedule + @constraint:Number {minValue: 0, maxValue: 240} + decimal after?; +}; + +public type SchedulerschedulesscheduleIdSegments record { + # The start date-time of the segment + string 'start?; + # The end date-time of the segment + string end?; +}; + +# The availability schedule set by the user +public type InlineResponse201 record { + # An URI reference to a user + string owner?; + # The default availability schedule in use + boolean default?; + # The name of this availability schedule + string name?; + # The unique ID of the availability + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + ScheduleravailabilitySegmentsRecurrence segmentsRecurrence?; + # The timezone for which this availability schedule originates + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The date on which the rule needs to be applied outside of the availability rule + record {}[] segments?; +}; + +public type InlineResponse2004Attendees record { + # This field indicates when the attendee attended this event + string created?; + # The ID of attendee + @jsondata:Name {value: "attendee_id"} + string attendeeId?; + # The attendee's last name + @jsondata:Name {value: "last_name"} + string lastName?; + # The attendee's name + @jsondata:Name {value: "display_name"} + string displayName?; + # The attendee's time zone + @jsondata:Name {value: "time_zone"} + string timeZone?; + # Whether or not to show the event + @jsondata:Name {value: "no_show"} + boolean noShow?; + # Whether the attendee is the booker + boolean booker?; + # The attendee's first name + @jsondata:Name {value: "first_name"} + string firstName?; + # The attendee's email + string email?; +}; + +public type InlineResponse200 record { + # The most popular schedules in the given time range + @jsondata:Name {value: "popular_schedules"} + record {}[] popularSchedules?; + # The users with the least scheduled events + @jsondata:Name {value: "users_with_least_events"} + record {}[] usersWithLeastEvents?; + @jsondata:Name {value: "last_n_days"} + InlineResponse200LastNDays lastNDays?; + # The distribution of number of events scheduled in a day + @jsondata:Name {value: "popular_time_of_day"} + record {}[] popularTimeOfDay?; + @jsondata:Name {value: "previous_period"} + InlineResponse200PreviousPeriod previousPeriod?; + # The event distribution by duration + @jsondata:Name {value: "event_distribution_by_duration"} + record {}[] eventDistributionByDuration?; + # The distribution of number of events scheduled in a week + @jsondata:Name {value: "popular_time_of_week"} + record {}[] popularTimeOfWeek?; + # The users with the most scheduled events + @jsondata:Name {value: "users_with_most_events"} + record {}[] usersWithMostEvents?; +}; + +# The week of available time rule +public type SchedulerschedulesscheduleIdSegmentsRecurrence record { + # Thursday + ScheduleravailabilitySegmentsRecurrenceSun[] thu?; + # Tuesday + ScheduleravailabilitySegmentsRecurrenceSun[] tue?; + # Wednesday + ScheduleravailabilitySegmentsRecurrenceSun[] wed?; + # Saturday + ScheduleravailabilitySegmentsRecurrenceSun[] sat?; + # Friday + ScheduleravailabilitySegmentsRecurrenceSun[] fri?; + # Sunday + ScheduleravailabilitySegmentsRecurrenceSun[] sun?; + # Monday + ScheduleravailabilitySegmentsRecurrenceSun[] mon?; +}; + +# Represents the Queries record for the operation: delete_schedules +public type DeleteSchedulesQueries record { + # This field indicates that the admin handles certain users. This setting is only for admin + @http:Query {name: "user_id"} + string userId?; +}; + +# Represents the Queries record for the operation: delete_scheduled_events +public type DeleteScheduledEventsQueries record { + # This field indicates whether the admin handles certain users. It's only for admin + @http:Query {name: "user_id"} + string userId?; +}; + +# Represents the Queries record for the operation: patch_schedule +public type PatchScheduleQueries record { + # This field indicates that the admin handles certain users. This setting is only for admin + @http:Query {name: "user_id"} + string userId?; +}; + +# Represents the Queries record for the operation: list_availability +public type ListAvailabilityQueries record { + # The token that specifies which result page to return + @http:Query {name: "next_page_token"} + string nextPageToken?; + # The return of the specific user's availability + @http:Query {name: "user_id"} + string userId?; + # The maximum number of availability returned on one result page + @http:Query {name: "page_size"} + int pageSize?; +}; + +# The portions of the event resource +public type EventseventIdBody record { + SchedulereventseventIdAttendees[] attendees?; + # The meeting notes of the event + @jsondata:Name {value: "meeting_notes"} + string meetingNotes?; + # The status of event: confirmed or cancelled + "confirmed"|"cancelled" status?; +}; + +# The availability schedule set by the user +public type AvailabilityavailabilityIdBody record { + # The default availability schedule in use + boolean default?; + # The name of this availability schedule + @constraint:String {minLength: 1} + string name; + @jsondata:Name {value: "segments_recurrence"} + ScheduleravailabilitySegmentsRecurrence segmentsRecurrence?; + # The timezone for which this availability schedule originates + @jsondata:Name {value: "time_zone"} + string timeZone; + # The date on which the rule needs to be applied outside of the availability rule + ScheduleravailabilityavailabilityIdSegments[] segments?; +}; + +# The week of the available time rule +public type SchedulerschedulesscheduleIdSegmentsRecurrence1 record { + # Thursday + ScheduleravailabilitySegmentsRecurrenceSun[] thu?; + # Tuesday + ScheduleravailabilitySegmentsRecurrenceSun[] tue?; + # Wednesday + ScheduleravailabilitySegmentsRecurrenceSun[] wed?; + # Saturday + ScheduleravailabilitySegmentsRecurrenceSun[] sat?; + # Friday + ScheduleravailabilitySegmentsRecurrenceSun[] fri?; + # Sunday + ScheduleravailabilitySegmentsRecurrenceSun[] sun?; + # Monday + ScheduleravailabilitySegmentsRecurrenceSun[] mon?; +}; + +# The creator of the schedule. This field is read-only +public type InlineResponse2005Creator record { + # This field indicates if you created the schedule. The field is read-only + boolean self?; + # This field indicates the creator of the display name + @jsondata:Name {value: "display_name"} + string displayName?; + # This field indicates the creator's email address + string email?; +}; + +# Represents the Queries record for the operation: list_schedules +public type ListSchedulesQueries record { + # Whether to include the deleted schedule (with status equals "cancelled") in the result + @http:Query {name: "show_deleted"} + boolean showDeleted?; + # The token that specifies which result page to return + @http:Query {name: "next_page_token"} + string nextPageToken?; + # The return of the specific user's schedules. Ths setting is only for admin + @http:Query {name: "user_id"} + string userId?; + # The lower bound (exclusive) for a schedule's end time from which to filter + string 'from?; + # The upper bound (exclusive) for a schedule's start time from which to filter + string to?; + # The time zone in the response + @http:Query {name: "time_zone"} + string timeZone?; + # The maximum number of schedule results returned on a result page + @http:Query {name: "page_size"} + int pageSize?; +}; + +public type InlineResponse2012 record { + # The scheduling link URL + @jsondata:Name {value: "scheduling_url"} + string schedulingUrl; +}; + +public type InlineResponse2011 record { + # The schedule's end date + @jsondata:Name {value: "end_date"} + string endDate?; + # The hexadecimal color value of the event type's scheduling page + string color?; + # The schedule's description + @constraint:String {maxLength: 8192} + string description?; + # This field indicates if the event type is hidden on the owner's main scheduling page + boolean secret?; + # The availability of the time rule + @jsondata:Name {value: "availability_rules"} + InlineResponse2011AvailabilityRules[] availabilityRules?; + # This field indicates the maximum invitees per event + @constraint:Number {minValue: 1, maxValue: 200} + decimal capacity?; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; + # This field indicates the duration of the meeting in minutes, range: [1, 1440] + @constraint:Number {minValue: 15, maxValue: 1440} + decimal duration?; + # This field indicates the minimum time before a schedule starts when the attendees can book + @constraint:Number {minValue: 0, maxValue: 14340} + decimal cushion?; + # This field indicates the extra time before or after the booked schedule + SchedulerschedulesBuffer buffer?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesSegmentsRecurrence segmentsRecurrence?; + # The event portion of the event's URL that identifies a specific web page + @constraint:String {maxLength: 256, minLength: 3} + string slug?; + # The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate` + @jsondata:Name {value: "interval_type"} + "unlimited"|"fixed" intervalType?; + # The schedule's start date + @jsondata:Name {value: "start_date"} + string startDate?; + # The method of the type of `addOn`, such as Zoom meeting, Zoom phone, or offline + @jsondata:Name {value: "add_on_type"} + "zoomMeeting"|"zoomPhone"|"offline" addOnType?; + # The URL of the user’s scheduling site where invitees book this event type + @jsondata:Name {value: "scheduling_url"} + string schedulingUrl?; + # This field sets the frequency of available time slots for invitees + @jsondata:Name {value: "start_time_increment"} + decimal startTimeIncrement?; + # The event's summary + @constraint:String {maxLength: 256} + string summary?; + # The creator of the schedule. The field is read-only + InlineResponse2011Creator creator?; + # This field indicates if the schedule type is "one" (belongs to an individual user) or "multiple" + @jsondata:Name {value: "schedule_type"} + "one"|"multiple" scheduleType?; + # This field contains the custom question + @jsondata:Name {value: "custom_fields"} + InlineResponse2011CustomFields[] customFields?; + # This field indicates if the schedule is active + boolean active?; + # This field sets the maximum events allowed per day + @jsondata:Name {value: "booking_limit"} + decimal bookingLimit?; + # the timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The organizer of the schedule. This field is read-only + InlineResponse2011Organizer organizer?; + # The information for a custom location + @constraint:String {maxLength: 1024} + string location?; + # The unique identifier of schedule + @jsondata:Name {value: "schedule_id"} + string scheduleId?; + # The moment the schedule type was updated + string updated?; + # This field indicates the use of the availability rule + @jsondata:Name {value: "availability_override"} + boolean availabilityOverride?; + # The status of schedule: confirmed or cancelled + "confirmed"|"cancelled" status?; +}; + +# OAuth2 Refresh Token Grant Configs +public type OAuth2RefreshTokenGrantConfig record {| + *http:OAuth2RefreshTokenGrantConfig; + # Refresh URL + string refreshUrl = ""; +|}; + +public type SchedulerschedulesAvailabilityRules record { + # This field indicates the use of custom availability instead of the rule + @jsondata:Name {value: "use_custom"} + boolean useCustom?; + # The ID of this availability rule. + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesSegmentsRecurrence segmentsRecurrence?; + # the timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The owner of this availability rule. + string email?; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; +}; + +public type ScheduleravailabilitySegmentsRecurrenceSun record { + # The start time of this day + string 'start?; + # The end time of this day + string end?; +}; + +# The stats of the last N days +public type InlineResponse200LastNDays record { + # The number of "all host available" type schedules + @jsondata:Name {value: "all_host_available"} + int allHostAvailable?; + # The number of rescheduled scheduled events + @jsondata:Name {value: "scheduled_events_rescheduled"} + int scheduledEventsRescheduled?; + # The number of completed scheduled events + @jsondata:Name {value: "scheduled_events_completed"} + int scheduledEventsCompleted?; + # The number of cancelled schedules + @jsondata:Name {value: "schedules_canceled"} + int schedulesCanceled?; + # The number of "one-off" type schedules + @jsondata:Name {value: "one_off_meeting"} + int oneOffMeeting?; + # The number of "meeting poll" type schedules + @jsondata:Name {value: "meeting_poll"} + int meetingPoll?; + # The number of "one to many" type schedules + @jsondata:Name {value: "one_to_many"} + int oneToMany?; + # The number of "any host available" type schedules + @jsondata:Name {value: "any_host_available"} + int anyHostAvailable?; + # The number of cancelled scheduled events + @jsondata:Name {value: "scheduled_events_canceled"} + int scheduledEventsCanceled?; + # The number of "one to one" type schedules + @jsondata:Name {value: "one_to_one"} + int oneToOne?; + # The number of created scheduled events + @jsondata:Name {value: "scheduled_events_created"} + int scheduledEventsCreated?; + # The number of created schedules + @jsondata:Name {value: "schedules_created"} + int schedulesCreated?; +}; + +public type SchedulerschedulesscheduleIdCustomFields record { + # The invitee's option(s) for single_select or multi_select type of responses + @jsondata:Name {value: "answer_choices"} + SchedulerschedulesscheduleIdCustomFieldsAnswerchoicesItemsString[] answerChoices?; + # The type of response that the invitee provides to the custom question. It can be one or multiple lines of text, a phone number, or single- or multiple-select.[`string text phone_number single_select multi_select`] + "text"|"string"|"phone_number"|"choices_one"|"choices_many"|"select" format; + # The ID of this question + @jsondata:Name {value: "custom_field_id"} + string customFieldId?; + # The custom question that the host created for the event type + string name; + # If the custom question lets invitees record a written response, in addition to single-select or multiple-select type of responses, then it's true. Otherwise, it's false + @jsondata:Name {value: "include_other"} + boolean includeOther; + # The position of this question + decimal position; + # If the question created by the host is turned ON and visible on the event booking page, then it's true. If it's turned OFF and invisible on the event booking page, then it's false + boolean enabled; + # If a response to the question, created by the host, is required for invitees to book the event type, then it's true. If it's not required, it's false + boolean required; +}; + +public type SchedulerschedulesSegments record { + # The start date and time of the segment + string 'start?; + # The end date and time of the segment + string end?; +}; + +# The date interval that needs to overridden +public type ScheduleravailabilityavailabilityIdSegments record { + # The start date to override + string 'start; + # The end date to override + string end; +}; + +# Represents the Queries record for the operation: report_analytics +public type ReportAnalyticsQueries record { + # The specific user's web user ID. Default is "me". Use "all" to query for analytics with respect to all members under that account. + @http:Query {name: "user_id"} + string userId?; + # The lower bound (exclusive) for an event's end time from which to filter. Optional. The default is not to filter by end time. It must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds can be provided but are ignored. If `timeMax` is set, `timeMin` must be smaller than `timeMax` + string 'from?; + # The upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. It must be an RFC3339 timestamp with mandatory time zone offset. For example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If `timeMin` is set, `timeMax` must be greater than `timeMin` + string to?; + # The time zone in the response. The default is the time zone of the calendar. Optional. + @http:Query {name: "time_zone"} + string timeZone?; +}; + +public type SchedulerschedulesscheduleIdCustomFieldsAnswerchoicesItemsString string; + +# The availability of the schedule query result of given user +public type InlineResponse2001 record { + # The token for a later to retrieve only the entries that have changed since this result was returned. It's omitted if further results are available, in which case `nextPageToken` is provided + @jsondata:Name {value: "next_page_token"} + string nextPageToken?; + # array[User Availability Schedule] + InlineResponse2001Items[] items?; +}; + +public type InlineResponse2003 record { + # The token to access the next page of this result + @jsondata:Name {value: "next_page_token"} + string nextPageToken?; + InlineResponse2003Items[] items?; +}; + +public type SchedulerschedulesCustomFieldsAnswerchoicesItemsString string; + +# The availability schedule set by the user +public type InlineResponse2002 record { + # The owner's ID + string owner?; + # The default availability schedule in use + boolean default?; + # The name of this availability schedule + string name?; + # The unique ID of availability + @jsondata:Name {value: "availability_id"} + string availabilityId?; + @jsondata:Name {value: "segments_recurrence"} + ScheduleravailabilitySegmentsRecurrence segmentsRecurrence?; + # The timezone for which this availability schedule originates + @jsondata:Name {value: "time_zone"} + string timeZone?; +}; + +public type InlineResponse2005 record { + # The token that accesses the next page of this result + @jsondata:Name {value: "next_page_token"} + string nextPageToken?; + InlineResponse2005Items[] items?; +}; + +public type InlineResponse2004 record { + # The event's summary + @constraint:String {maxLength: 256} + string summary?; + # The attendees of the event + InlineResponse2004Attendees[] attendees?; + # The meeting notes of the event + @jsondata:Name {value: "meeting_notes"} + string meetingNotes?; + # The event's description + @constraint:String {maxLength: 8192} + string description?; + # The scheduled event's end date time + @jsondata:Name {value: "end_date_time"} + string endDateTime?; + # The unique identifier of event + @jsondata:Name {value: "event_id"} + string eventId?; + # This field indicates whether the type is default(scheduled) or a pending event + @jsondata:Name {value: "event_type"} + "default"|"pending" eventType?; + # The information to track the source of invitee. Only use this setting you add UTM parameters in schedule links + @jsondata:Name {value: "tracking_params"} + InlineResponse2004TrackingParams[] trackingParams?; + # The guest's collection + string[] guests?; + # The information for a custom location + @constraint:String {maxLength: 1024} + string location?; + # The scheduled event's start date time + @jsondata:Name {value: "start_date_time"} + string startDateTime?; + # The unique identifier of schedule + @jsondata:Name {value: "schedule_id"} + string scheduleId?; + # The moment the event was updated + string updated?; + # The meeting details for when users have scheduled appointments + @jsondata:Name {value: "external_location"} + record {string kind?; string meeting_id?; string personal_meeting_id?; string meeting_passcode?; string meeting_description?; string meeting_join_url?;} externalLocation?; + # The status of event: confirmed or cancelled + "confirmed"|"cancelled" status?; +}; + +public type InlineResponse2005Items record { + # The schedule's end date + @jsondata:Name {value: "end_date"} + string endDate?; + # The hexadecimal color value of the event type's scheduling page + string color?; + # The schedule's description + @constraint:String {maxLength: 8192} + string description?; + # This field indicates if the event type is hidden on the owner's main scheduling page + boolean secret?; + # The availability of the time rule + @jsondata:Name {value: "availability_rules"} + InlineResponse2005AvailabilityRules[] availabilityRules?; + # This field indicates the maximum invitees per event + @constraint:Number {minValue: 1, maxValue: 200} + decimal capacity?; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; + # This field indicates the duration of the meeting in minutes, range: [1, 1440] + @constraint:Number {minValue: 15, maxValue: 1440} + decimal duration?; + # This field indicates the minimum time before a schedule starts when the attendees can book + @constraint:Number {minValue: 0, maxValue: 14340} + decimal cushion?; + # This field indicates the extra time before or after the booked schedule + SchedulerschedulesBuffer buffer?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesscheduleIdSegmentsRecurrence1 segmentsRecurrence?; + # The event portion of the event's URL that identifies a specific web page + @constraint:String {maxLength: 256, minLength: 3} + string slug?; + # The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate` + @jsondata:Name {value: "interval_type"} + "unlimited"|"fixed" intervalType?; + # The schedule's start date + @jsondata:Name {value: "start_date"} + string startDate?; + # The method of the type of `addOn`, such as Zoom meeting, Zoom phone, or offline + @jsondata:Name {value: "add_on_type"} + "zoomMeeting"|"zoomPhone"|"offline" addOnType?; + # The URL of the user's scheduling site where invitees book this event type + @jsondata:Name {value: "scheduling_url"} + string schedulingUrl?; + # This field sets the frequency of available time slots for invitees + @jsondata:Name {value: "start_time_increment"} + decimal startTimeIncrement?; + # The event's summary + @constraint:String {maxLength: 256} + string summary?; + # The creator of the schedule. This field is read-only + InlineResponse2005Creator creator?; + # This field indicates if the schedule type is "one" (belongs to an individual user) or "multiple" + @jsondata:Name {value: "schedule_type"} + "one"|"multiple" scheduleType?; + # This field contains the custom question + @jsondata:Name {value: "custom_fields"} + InlineResponse2011CustomFields[] customFields?; + # This field indicates if the schedule is active + boolean active?; + # This field sets the maximum events allowed per day + @jsondata:Name {value: "booking_limit"} + decimal bookingLimit?; + # the timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The organizer of the schedule. This field is read-only + InlineResponse2011Organizer organizer?; + # The information for a custom location + @constraint:String {maxLength: 1024} + string location?; + # The unique identifier of the schedule + @jsondata:Name {value: "schedule_id"} + string scheduleId?; + # The moment the schedule type was updated + string updated?; + # This field indicates the use of the availability rule + @jsondata:Name {value: "availability_override"} + boolean availabilityOverride?; + # The status of schedule: confirmed or cancelled + "confirmed"|"cancelled" status?; +}; + +# The user's information +public type InlineResponse2007 record { + # The URL of the user’s scheduling site where invitees book this event type + @jsondata:Name {value: "scheduling_url"} + string schedulingUrl?; + # This field enables users to upload their company's logo on Zoom + string logo?; + # The user's name + @jsondata:Name {value: "display_name"} + string displayName?; + # The time zone to use when presenting time to the user + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The portion of URL for the user's scheduling page where invitees book sessions that renders in a human-readable format + string slug?; + # This field enables users to upload their personal avatars on Zoom + string picture?; +}; + +# Represents the Queries record for the operation: list_scheduled_events +public type ListScheduledEventsQueries record { + # Whether to include deleted events (with status equals `cancelled`) in the result + @http:Query {name: "show_deleted"} + boolean showDeleted?; + # This field returns search results from meeting ID or summary + string search?; + # Whether to return the pending events + @http:Query {name: "event_type"} + "pending" eventType?; + # The token that specifies which result page to return + @http:Query {name: "next_page_token"} + string nextPageToken?; + # The return of the specific user's scheduled event. It's only for admin + @http:Query {name: "user_id"} + string userId?; + # This field indicates the start time or the time when the event has been updated + @http:Query {name: "order_by"} + string orderBy?; + # The lower bound (exclusive) for an event's end time from which to filter. + string 'from?; + # The upper bound (exclusive) for an event's start time from which to filter + string to?; + # The time zone in the response + @http:Query {name: "time_zone"} + string timeZone?; + # The maximum number of events returned on one result page + @http:Query {name: "page_size"} + int pageSize?; +}; + +public type InlineResponse2006 record { + # The schedule's end date + @jsondata:Name {value: "end_date"} + string endDate?; + # The hexadecimal color value of the event type's scheduling page + string color?; + # The schedule's description + @constraint:String {maxLength: 8192} + string description?; + # This field indicates if the event type is hidden on the owner's main scheduling page + boolean secret?; + # The availability of the time rule + @jsondata:Name {value: "availability_rules"} + InlineResponse2006AvailabilityRules[] availabilityRules?; + # This field indicates the maximum invitees per event + @constraint:Number {minValue: 1, maxValue: 200} + decimal capacity?; + # The available time segments of the event + SchedulerschedulesSegments[] segments?; + # This field indicates the duration of the meeting in minutes, range: [1, 1440] + @constraint:Number {minValue: 15, maxValue: 1440} + decimal duration?; + # This field indicates the minimum time before a schedule starts when the attendees can book + @constraint:Number {minValue: 0, maxValue: 14340} + decimal cushion?; + # This field indicates the extra time before or after the booked schedule + SchedulerschedulesBuffer buffer?; + @jsondata:Name {value: "segments_recurrence"} + SchedulerschedulesSegmentsRecurrence segmentsRecurrence?; + # The event portion of the event's URL that identifies a specific web page + @constraint:String {maxLength: 256, minLength: 3} + string slug?; + # The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate` + @jsondata:Name {value: "interval_type"} + "unlimited"|"fixed" intervalType?; + # The schedule's start date + @jsondata:Name {value: "start_date"} + string startDate?; + # The method of the type of `addOn`, such as Zoom meeting, Zoom phone, or offline + @jsondata:Name {value: "add_on_type"} + "zoomMeeting"|"zoomPhone"|"offline" addOnType?; + # The URL of the user's scheduling site where invitees book this event type + @jsondata:Name {value: "scheduling_url"} + string schedulingUrl?; + # This field sets the frequency of available time slots for invitees + @jsondata:Name {value: "start_time_increment"} + decimal startTimeIncrement?; + # The event's summary + @constraint:String {maxLength: 256} + string summary?; + # The creator of the schedule. The field is read-only + InlineResponse2011Creator creator?; + # This field indicates if the schedule type is **one** (belongs to an individual user) or **multiple** + @jsondata:Name {value: "schedule_type"} + "one"|"multiple" scheduleType?; + # This field contains the custom question + @jsondata:Name {value: "custom_fields"} + InlineResponse2011CustomFields[] customFields?; + # This field indicates if the schedule is active + boolean active?; + # This field sets the maximum events allowed per day + @jsondata:Name {value: "booking_limit"} + decimal bookingLimit?; + # the timezone of this availability rule. + @jsondata:Name {value: "time_zone"} + string timeZone?; + # The organizer of the schedule. This field is read-only + InlineResponse2011Organizer organizer?; + # The information for a custom location + @constraint:String {maxLength: 1024} + string location?; + # The unique identifier of a schedule + @jsondata:Name {value: "schedule_id"} + string scheduleId?; + # The moment the schedule type was updated + string updated?; + # This field indicates the use of the availability rule + @jsondata:Name {value: "availability_override"} + boolean availabilityOverride?; + # The status of schedule: confirmed or cancelled + "confirmed"|"cancelled" status?; +}; diff --git a/ballerina/utils.bal b/ballerina/utils.bal new file mode 100644 index 0000000..c7e28d2 --- /dev/null +++ b/ballerina/utils.bal @@ -0,0 +1,219 @@ +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/http; +import ballerina/url; + +type SimpleBasicType string|boolean|int|float|decimal; + +# Represents encoding mechanism details. +type Encoding record { + # Defines how multiple values are delimited + string style = FORM; + # Specifies whether arrays and objects should generate as separate fields + boolean explode = true; + # Specifies the custom content type + string contentType?; + # Specifies the custom headers + map headers?; +}; + +enum EncodingStyle { + DEEPOBJECT, FORM, SPACEDELIMITED, PIPEDELIMITED +} + +final Encoding & readonly defaultEncoding = {}; + +# Serialize the record according to the deepObject style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + return - Serialized record as a string +isolated function getDeepObjectStyleRequest(string parent, record {} anyRecord) returns string { + string[] recordArray = []; + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(parent + "[" + key + "]" + "=" + getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(parent + "[" + key + "]" + "[]", value, DEEPOBJECT, true)); + } else if value is record {} { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getDeepObjectStyleRequest(nextParent, value)); + } else if value is record {}[] { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getSerializedRecordArray(nextParent, value, DEEPOBJECT)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); + return string:'join("", ...recordArray); +} + +# Serialize the record according to the form style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getFormStyleRequest(string parent, record {} anyRecord, boolean explode = true) returns string { + string[] recordArray = []; + if explode { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(key, "=", getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(key, value, explode = explode)); + } else if value is record {} { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); + } else { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(key, ",", getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(key, value, explode = false)); + } else if value is record {} { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push(","); + } + _ = recordArray.pop(); + } + return string:'join("", ...recordArray); +} + +# Serialize arrays. +# +# + arrayName - Name of the field with arrays +# + anyArray - Array to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized array as a string +isolated function getSerializedArray(string arrayName, anydata[] anyArray, string style = "form", boolean explode = true) returns string { + string key = arrayName; + string[] arrayValues = []; + if anyArray.length() > 0 { + if style == FORM && !explode { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), ","); + } + } else if style == SPACEDELIMITED && !explode { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "%20"); + } + } else if style == PIPEDELIMITED && !explode { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "|"); + } + } else if style == DEEPOBJECT { + foreach anydata i in anyArray { + arrayValues.push(key, "[]", "=", getEncodedUri(i.toString()), "&"); + } + } else { + foreach anydata i in anyArray { + arrayValues.push(key, "=", getEncodedUri(i.toString()), "&"); + } + } + _ = arrayValues.pop(); + } + return string:'join("", ...arrayValues); +} + +# Serialize the array of records according to the form style. +# +# + parent - Parent record name +# + value - Array of records to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getSerializedRecordArray(string parent, record {}[] value, string style = FORM, boolean explode = true) returns string { + string[] serializedArray = []; + if style == DEEPOBJECT { + int arayIndex = 0; + foreach var recordItem in value { + serializedArray.push(getDeepObjectStyleRequest(parent + "[" + arayIndex.toString() + "]", recordItem), "&"); + arayIndex = arayIndex + 1; + } + } else { + if !explode { + serializedArray.push(parent, "="); + } + foreach var recordItem in value { + serializedArray.push(getFormStyleRequest(parent, recordItem, explode), ","); + } + } + _ = serializedArray.pop(); + return string:'join("", ...serializedArray); +} + +# Get Encoded URI for a given value. +# +# + value - Value to be encoded +# + return - Encoded string +isolated function getEncodedUri(anydata value) returns string { + string|error encoded = url:encode(value.toString(), "UTF8"); + if encoded is string { + return encoded; + } else { + return value.toString(); + } +} + +# Generate query path with query parameter. +# +# + queryParam - Query parameter map +# + encodingMap - Details on serialization mechanism +# + return - Returns generated Path or error at failure of client initialization +isolated function getPathForQueryParam(map queryParam, map encodingMap = {}) returns string|error { + map queriesMap = http:getQueryMap(queryParam); + string[] param = []; + if queriesMap.length() > 0 { + param.push("?"); + foreach var [key, value] in queriesMap.entries() { + if value is () { + _ = queriesMap.remove(key); + continue; + } + Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding; + if value is SimpleBasicType { + param.push(key, "=", getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + param.push(getSerializedArray(key, value, encodingData.style, encodingData.explode)); + } else if value is record {} { + if encodingData.style == DEEPOBJECT { + param.push(getDeepObjectStyleRequest(key, value)); + } else { + param.push(getFormStyleRequest(key, value, encodingData.explode)); + } + } else { + param.push(key, "=", value.toString()); + } + param.push("&"); + } + _ = param.pop(); + } + string restOfPath = string:'join("", ...param); + return restOfPath; +} diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index 5231604..433dd1e 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -5,8 +5,8 @@ name = "zoom.scheduler" version = "@toml.version@" license = ["Apache-2.0"] authors = ["Ballerina"] -keywords = [] # TODO: Add keywords -# icon = "icon.png" # TODO: Add icon +keywords = ["Zoom", "Video Conference", "Scheduling", "Calendar"] +icon = "icon.png" repository = "https://github.com/ballerina-platform/module-ballerinax-zoom.scheduler" [build-options] diff --git a/docs/setup/resources/activate-app.png b/docs/setup/resources/activate-app.png new file mode 100644 index 0000000..e692cfa Binary files /dev/null and b/docs/setup/resources/activate-app.png differ diff --git a/docs/setup/resources/app-credentials.png b/docs/setup/resources/app-credentials.png new file mode 100644 index 0000000..a48827f Binary files /dev/null and b/docs/setup/resources/app-credentials.png differ diff --git a/docs/setup/resources/app-type.png b/docs/setup/resources/app-type.png new file mode 100644 index 0000000..6ef5a34 Binary files /dev/null and b/docs/setup/resources/app-type.png differ diff --git a/docs/setup/resources/redirect-URI.png b/docs/setup/resources/redirect-URI.png new file mode 100644 index 0000000..0ce56d1 Binary files /dev/null and b/docs/setup/resources/redirect-URI.png differ diff --git a/docs/setup/resources/zoom-marketplace.png b/docs/setup/resources/zoom-marketplace.png new file mode 100644 index 0000000..f7b3c3b Binary files /dev/null and b/docs/setup/resources/zoom-marketplace.png differ diff --git a/docs/setup/resources/zoom-scopes.png b/docs/setup/resources/zoom-scopes.png new file mode 100644 index 0000000..db3a34c Binary files /dev/null and b/docs/setup/resources/zoom-scopes.png differ diff --git a/docs/spec/openapi.json b/docs/spec/openapi.json new file mode 100644 index 0000000..0fa70eb --- /dev/null +++ b/docs/spec/openapi.json @@ -0,0 +1,4178 @@ +{ + "openapi" : "3.0.0", + "info" : { + "title" : "Scheduler", + "description" : "The Scheduler APIs let you programmatically interact with [Zoom Scheduler](https://developers.zoom.us/docs/zoom-scheduler/) features. They allow you to schedule, manage, and retrieve details about meetings, webinars, and other events on the Zoom platform. With powerful tools for integration, these APIs streamline event management and automate workflows in external applications.", + "termsOfService" : "https://zoom.us/docs/en-us/zoom_api_license_and_tou.html", + "contact" : { + "name" : "Zoom Developers", + "url" : "https://developer.zoom.us/" + }, + "version" : "2" + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "https://swagger.io" + }, + "servers" : [ { + "url" : "https://api.zoom.us/v2/scheduler" + } ], + "paths" : { + "/analytics" : { + "get" : { + "tags" : [ "analytics" ], + "summary" : "Report analytics", + "description" : "Generates the scheduler analytics report.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read`,`scheduler:read:admin`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:analytics`,`scheduler:read:analytics:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "report_analytics", + "parameters" : [ { + "name" : "to", + "in" : "query", + "description" : "The upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time. It must be an RFC3339 timestamp with mandatory time zone offset. For example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided but are ignored. If `timeMin` is set, `timeMax` must be greater than `timeMin`", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "2024-02-01T00:00:00Z" + } + }, { + "name" : "from", + "in" : "query", + "description" : "The lower bound (exclusive) for an event's end time from which to filter. Optional. The default is not to filter by end time. It must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds can be provided but are ignored. If `timeMax` is set, `timeMin` must be smaller than `timeMax`", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "2024-01-01T00:00:00Z" + } + }, { + "name" : "time_zone", + "in" : "query", + "description" : "The time zone in the response. The default is the time zone of the calendar. Optional. ", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "America/Los_Angeles" + }, + "x-ballerina-name" : "timeZone" + }, { + "name" : "user_id", + "in" : "query", + "description" : "The specific user's web user ID. Default is \"me\". Use \"all\" to query for analytics with respect to all members under that account. ", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl80 or all" + }, + "x-ballerina-name" : "userId" + } ], + "responses" : { + "200" : { + "description" : "If successful, this method returns the scheduler analytics or the user ID or account ID provided", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse200" + } + } + } + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n invalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n notFound
\n" + }, + "409" : { + "description" : "**HTTP Status Code:** `409`
\n Conflict \n\n **Error Code:** `409`
\n conflict
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:read", "scheduler:read:admin", "scheduler:read:analytics", "scheduler:read:analytics:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:read", "scheduler:read:admin" ], + "x-granular-scopes" : [ "scheduler:read:analytics", "scheduler:read:analytics:admin" ] + } + } + }, + "/availability" : { + "get" : { + "tags" : [ "availability" ], + "summary" : "List availability", + "description" : "Returns the availability schedules of the given user.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:admin`,`scheduler:read`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:list_availability`,`scheduler:read:list_availability:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "list_availability", + "parameters" : [ { + "name" : "page_size", + "in" : "query", + "description" : "The maximum number of availability returned on one result page", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 250 + }, + "x-ballerina-name" : "pageSize" + }, { + "name" : "next_page_token", + "in" : "query", + "description" : "The token that specifies which result page to return", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "Cj8KLwotCgsI3ujvqgYQgIXUGxIeChwKGjBzNzAyZWVtbjBzOTdlZXFhNXE1NWg4ZWJtGgwIzIPVrAYQwM3WrAPAPgE=" + }, + "x-ballerina-name" : "nextPageToken" + }, { + "name" : "user_id", + "in" : "query", + "description" : "The return of the specific user's availability", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl8" + }, + "x-ballerina-name" : "userId" + } ], + "responses" : { + "200" : { + "description" : "Successful availability of the schedule query result of given user", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2001" + } + } + } + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n notFound
\n" + }, + "409" : { + "description" : "**HTTP Status Code:** `409`
\n Conflict \n\n **Error Code:** `409`
\n conflict
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:read:admin", "scheduler:read", "scheduler:read:list_availability", "scheduler:read:list_availability:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:read:admin", "scheduler:read" ], + "x-granular-scopes" : [ "scheduler:read:list_availability", "scheduler:read:list_availability:admin" ] + } + }, + "post" : { + "tags" : [ "availability" ], + "summary" : "Insert availability", + "description" : "Inserts a user availability schedule. \n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:availability`,`scheduler:write:availability:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "insert_availability", + "requestBody" : { + "description" : "In the request body, it supplies an availability resource properties", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SchedulerAvailabilityBody" + } + } + } + }, + "responses" : { + "201" : { + "description" : "If successful, this method returns a availability resource in the response body", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse201" + } + } + } + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n invalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n unauthorized
\n" + }, + "409" : { + "description" : "**HTTP Status Code:** `409`
\n Conflict \n\n **Error Code:** `409`
\n conflict
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:write:availability", "scheduler:write:availability:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:write:availability", "scheduler:write:availability:admin" ] + } + } + }, + "/availability/{availabilityId}" : { + "get" : { + "tags" : [ "availability" ], + "summary" : "Get availability ", + "description" : "Returns the availability schedule of the given UUID.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:admin`,`scheduler:read`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:availability`,`scheduler:read:availability:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "get_availability", + "parameters" : [ { + "name" : "availabilityId", + "in" : "path", + "description" : "The UUID of the availability schedule", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl80" + } + } ], + "responses" : { + "200" : { + "description" : "If successful, this method returns an availability resource in the response body", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2002" + } + } + } + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n invalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n notFound
\n" + }, + "409" : { + "description" : "**HTTP Status Code:** `409`
\n Conflict \n\n **Error Code:** `409`
\n conflict
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:read:admin", "scheduler:read", "scheduler:read:availability", "scheduler:read:availability:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:read:admin", "scheduler:read" ], + "x-granular-scopes" : [ "scheduler:read:availability", "scheduler:read:availability:admin" ] + } + }, + "delete" : { + "tags" : [ "availability" ], + "summary" : "Delete availability", + "description" : "Removes a user's availability.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:delete:availability`,`scheduler:delete:availability:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "delete_availability", + "parameters" : [ { + "name" : "availabilityId", + "in" : "path", + "description" : " The UUID of the availability schedule", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl80" + } + } ], + "responses" : { + "204" : { + "description" : "If successful, this method returns an empty response body" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n notFound
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:delete:availability", "scheduler:delete:availability:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:delete:availability", "scheduler:delete:availability:admin" ] + } + }, + "patch" : { + "tags" : [ "availability" ], + "summary" : "Patch availability", + "description" : "Adjusts the availability schedule content of the given UUID.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:update:availability`,`scheduler:update:availability:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "patch_availability", + "parameters" : [ { + "name" : "availabilityId", + "in" : "path", + "description" : "The UUID of the availability schedule", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl80" + } + } ], + "requestBody" : { + "description" : "In the request body, supply availability resource properties", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AvailabilityavailabilityIdBody" + } + } + } + }, + "responses" : { + "204" : { + "description" : "If successful, this method returns an empty response body" + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n invalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n notFound
\n" + }, + "409" : { + "description" : "**HTTP Status Code:** `409`
\n Conflict \n\n **Error Code:** `409`
\n conflict
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:update:availability", "scheduler:update:availability:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:update:availability", "scheduler:update:availability:admin" ] + } + } + }, + "/events" : { + "get" : { + "tags" : [ "scheduled events" ], + "summary" : "List scheduled events", + "description" : "Returns a list of all scheduled events.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:admin`,`scheduler:read`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:list_scheduled_events`,`scheduler:read:list_scheduled_events:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "list_scheduled_events", + "parameters" : [ { + "name" : "to", + "in" : "query", + "description" : "The upper bound (exclusive) for an event's start time from which to filter", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "2011-06-03T10:00:00-07:00" + } + }, { + "name" : "from", + "in" : "query", + "description" : "The lower bound (exclusive) for an event's end time from which to filter. ", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "2011-06-03T10:00:00-07:00" + } + }, { + "name" : "page_size", + "in" : "query", + "description" : "The maximum number of events returned on one result page", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 250 + }, + "x-ballerina-name" : "pageSize" + }, { + "name" : "order_by", + "in" : "query", + "description" : "This field indicates the start time or the time when the event has been updated", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "startTime" + }, + "x-ballerina-name" : "orderBy" + }, { + "name" : "time_zone", + "in" : "query", + "description" : "The time zone in the response", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "UTC" + }, + "x-ballerina-name" : "timeZone" + }, { + "name" : "next_page_token", + "in" : "query", + "description" : "The token that specifies which result page to return", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "ffffffff97c5b97f_53slvrhet2n0xkxurl5ybgde40" + }, + "x-ballerina-name" : "nextPageToken" + }, { + "name" : "show_deleted", + "in" : "query", + "description" : "Whether to include deleted events (with status equals `cancelled`) in the result", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "boolean", + "example" : true + }, + "x-ballerina-name" : "showDeleted" + }, { + "name" : "event_type", + "in" : "query", + "description" : "Whether to return the pending events", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "pending", + "enum" : [ "pending" ] + }, + "x-ballerina-name" : "eventType" + }, { + "name" : "user_id", + "in" : "query", + "description" : "The return of the specific user's scheduled event. It's only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl80" + }, + "x-ballerina-name" : "userId" + }, { + "name" : "search", + "in" : "query", + "description" : "This field returns search results from meeting ID or summary", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "94777886776" + } + } ], + "responses" : { + "200" : { + "description" : "If successful, this method returns a response body with the following structure:", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2003" + } + } + } + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n InternalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:read:admin", "scheduler:read", "scheduler:read:list_scheduled_events", "scheduler:read:list_scheduled_events:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:read:admin", "scheduler:read" ], + "x-granular-scopes" : [ "scheduler:read:list_scheduled_events", "scheduler:read:list_scheduled_events:admin" ] + } + } + }, + "/events/{eventId}" : { + "get" : { + "tags" : [ "scheduled events" ], + "summary" : "Get scheduled events ", + "description" : "Returns a scheduled event.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:admin`,`scheduler:read`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:scheduled_event`,`scheduler:read:scheduled_event:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "get_scheduled_events", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "user_id", + "in" : "query", + "description" : "This field indicates whether the admin handles certain users. It's only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl8" + }, + "x-ballerina-name" : "userId" + } ], + "responses" : { + "200" : { + "description" : "If successful, this method returns the scheduled event resource in the response body", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2004" + } + } + } + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n NotFound
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n InternalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:read:admin", "scheduler:read", "scheduler:read:scheduled_event", "scheduler:read:scheduled_event:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:read:admin", "scheduler:read" ], + "x-granular-scopes" : [ "scheduler:read:scheduled_event", "scheduler:read:scheduled_event:admin" ] + } + }, + "delete" : { + "tags" : [ "scheduled events" ], + "summary" : "Delete scheduled events ", + "description" : "Deletes a scheduled event.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:delete:scheduled_event`,`scheduler:delete:scheduled_event:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "delete_scheduled_events", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + }, { + "name" : "user_id", + "in" : "query", + "description" : "This field indicates whether the admin handles certain users. It's only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl8" + }, + "x-ballerina-name" : "userId" + } ], + "responses" : { + "204" : { + "description" : "If successful, this method returns an empty response body" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n NotFound
\n" + }, + "409" : { + "description" : "**HTTP Status Code:** `409`
\n Conflict \n\n **Error Code:** `409`
\n Conflict
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n IntenralErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:delete:scheduled_event", "scheduler:delete:scheduled_event:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:delete:scheduled_event", "scheduler:delete:scheduled_event:admin" ] + } + }, + "patch" : { + "tags" : [ "scheduled events" ], + "summary" : "Patch scheduled events", + "description" : "Patches a scheduled event.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:update:scheduled_event`,`scheduler:update:scheduled_event:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "patch_scheduled_events", + "parameters" : [ { + "name" : "eventId", + "in" : "path", + "description" : "The opaque identifier of the scheduled event", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "example" : "yev6yf64xot16c0cco50f31tb0" + } + }, { + "name" : "user_id", + "in" : "query", + "description" : "This field indicates whether the admin handles certain users. It's only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl8" + }, + "x-ballerina-name" : "userId" + } ], + "requestBody" : { + "description" : "In the request body, it supplies the relevant portions of event resource", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EventseventIdBody" + } + } + } + }, + "responses" : { + "204" : { + "description" : "If successful, this method returns an event resource in the response body" + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n InvalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n InternalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:update:scheduled_event", "scheduler:update:scheduled_event:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:update:scheduled_event", "scheduler:update:scheduled_event:admin" ] + } + } + }, + "/schedules" : { + "get" : { + "tags" : [ "schedules" ], + "summary" : "List schedules", + "description" : "Returns a list of all schedules.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:admin`,`scheduler:read`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:list_schedule`,`scheduler:read:list_schedule:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "list_schedules", + "parameters" : [ { + "name" : "to", + "in" : "query", + "description" : "The upper bound (exclusive) for a schedule's start time from which to filter", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "2011-06-03T10:00:00-07:00" + } + }, { + "name" : "from", + "in" : "query", + "description" : "The lower bound (exclusive) for a schedule's end time from which to filter", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "2011-06-03T10:00:00-07:00" + } + }, { + "name" : "page_size", + "in" : "query", + "description" : "The maximum number of schedule results returned on a result page", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "integer", + "example" : 250 + }, + "x-ballerina-name" : "pageSize" + }, { + "name" : "next_page_token", + "in" : "query", + "description" : "The token that specifies which result page to return", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl80" + }, + "x-ballerina-name" : "nextPageToken" + }, { + "name" : "show_deleted", + "in" : "query", + "description" : "Whether to include the deleted schedule (with status equals \"cancelled\") in the result", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "boolean", + "example" : true + }, + "x-ballerina-name" : "showDeleted" + }, { + "name" : "time_zone", + "in" : "query", + "description" : "The time zone in the response", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "America/Los_Angeles" + }, + "x-ballerina-name" : "timeZone" + }, { + "name" : "user_id", + "in" : "query", + "description" : "The return of the specific user's schedules. Ths setting is only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl80" + }, + "x-ballerina-name" : "userId" + } ], + "responses" : { + "200" : { + "description" : "If successful, this method returns a response body with this structure", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2005" + } + } + } + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n InvalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n InternalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:read:admin", "scheduler:read", "scheduler:read:list_schedule", "scheduler:read:list_schedule:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:read:admin", "scheduler:read" ], + "x-granular-scopes" : [ "scheduler:read:list_schedule", "scheduler:read:list_schedule:admin" ] + } + }, + "post" : { + "tags" : [ "schedules" ], + "summary" : "Insert schedules", + "description" : "Creates a schedule.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:insert_schedule`,`scheduler:write:insert_schedule:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "insert_schedule", + "parameters" : [ { + "name" : "user_id", + "in" : "query", + "description" : "This field indicates that the admin handles certain users. This setting is only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl8" + }, + "x-ballerina-name" : "userId" + } ], + "requestBody" : { + "description" : "In the request body, it supplies the schedule resource properties", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SchedulerSchedulesBody" + } + } + } + }, + "responses" : { + "201" : { + "description" : "If successful, this method returns an schedule resource in the response body", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2011" + } + } + } + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n InvalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n InternalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:write:insert_schedule", "scheduler:write:insert_schedule:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:write:insert_schedule", "scheduler:write:insert_schedule:admin" ] + } + } + }, + "/schedules/{scheduleId}" : { + "get" : { + "tags" : [ "schedules" ], + "summary" : "Get schedules", + "description" : "Returns a schedule.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:admin`,`scheduler:read`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:get_schedule`,`scheduler:read:get_schedule:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "get_schedule", + "parameters" : [ { + "name" : "scheduleId", + "in" : "path", + "description" : "The schedule's unique identifier", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "example" : "aec369a4fce6ae655749b00fc7260bfd" + } + }, { + "name" : "user_id", + "in" : "query", + "description" : "This field indicates that admins handle certain users. This setting is only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl8" + }, + "x-ballerina-name" : "userId" + } ], + "responses" : { + "200" : { + "description" : "If successful, this method returns an schedule resource in the response body", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2006" + } + } + } + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n NotFound
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n InternalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:read:admin", "scheduler:read", "scheduler:read:get_schedule", "scheduler:read:get_schedule:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:read:admin", "scheduler:read" ], + "x-granular-scopes" : [ "scheduler:read:get_schedule", "scheduler:read:get_schedule:admin" ] + } + }, + "delete" : { + "tags" : [ "schedules" ], + "summary" : "Delete schedules", + "description" : "Deletes a schedule.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:delete:delete_schedule`,`scheduler:delete:delete_schedule:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "delete_schedules", + "parameters" : [ { + "name" : "scheduleId", + "in" : "path", + "description" : "The unique identifier of the schedule", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "example" : "aec369a4fce6ae655749b00fc7260bfd" + } + }, { + "name" : "user_id", + "in" : "query", + "description" : "This field indicates that the admin handles certain users. This setting is only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl8" + }, + "x-ballerina-name" : "userId" + } ], + "responses" : { + "204" : { + "description" : "If successful, this method returns an empty response body" + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n invalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401 `
\n unauthorized
\n" + }, + "409" : { + "description" : "**HTTP Status Code:** `409`
\n Conflict \n\n **Error Code:** `409`
\n conflict
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:delete:delete_schedule", "scheduler:delete:delete_schedule:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:delete:delete_schedule", "scheduler:delete:delete_schedule:admin" ] + } + }, + "patch" : { + "tags" : [ "schedules" ], + "summary" : "Patch schedules", + "description" : "Patches a schedule. \n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:update:patch_schedule`,`scheduler:update:patch_schedule:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "patch_schedule", + "parameters" : [ { + "name" : "scheduleId", + "in" : "path", + "description" : "The schedule's unique identifier", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string", + "example" : "aec369a4fce6ae655749b00fc7260bfd" + } + }, { + "name" : "user_id", + "in" : "query", + "description" : "This field indicates that the admin handles certain users. This setting is only for admin", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl8" + }, + "x-ballerina-name" : "userId" + } ], + "requestBody" : { + "description" : "In the request body, it supplies the relevant portions of a schedule resource, according to the rules of patch semantics", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SchedulesscheduleIdBody" + } + } + } + }, + "responses" : { + "204" : { + "description" : "If successful, this method returns an empty response body" + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n InvaildArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n Unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n NotFound
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n InternalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:update:patch_schedule", "scheduler:update:patch_schedule:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:update:patch_schedule", "scheduler:update:patch_schedule:admin" ] + } + } + }, + "/schedules/single_use_link" : { + "post" : { + "tags" : [ "scheduling links" ], + "summary" : "Single use link", + "description" : "Creates a single-use scheduling link.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:admin`,`scheduler:write`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:write:single_use_link`,`scheduler:write:single_use_link:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "single_use_link", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SchedulesSingleUseLinkBody" + } + } + } + }, + "responses" : { + "201" : { + "description" : "If successful, this method returns a scheduling link URL in the response body", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2012" + } + } + } + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n invalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n unauthorized
\n" + }, + "409" : { + "description" : "**HTTP Status Code:** `409`
\n Conflict \n\n **Error Code:** `409`
\n conflict
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:write:admin", "scheduler:write", "scheduler:write:single_use_link", "scheduler:write:single_use_link:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:write:admin", "scheduler:write" ], + "x-granular-scopes" : [ "scheduler:write:single_use_link", "scheduler:write:single_use_link:admin" ] + } + } + }, + "/users/{userId}" : { + "get" : { + "tags" : [ "users" ], + "summary" : "Get user", + "description" : "Returns information about the user.\n\n**[Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:admin`,`scheduler:read`\n\n**[Granular Scopes](https://developers.zoom.us/docs/integrations/oauth-scopes-overview/):** `scheduler:read:user`,`scheduler:read:user:admin`\n\n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `LIGHT`", + "operationId" : "get_user", + "parameters" : [ { + "name" : "userId", + "in" : "path", + "required" : true, + "style" : "simple", + "explode" : false, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "200" : { + "description" : "If successful, this method returns user information in the response body", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/InlineResponse2007" + } + } + } + }, + "400" : { + "description" : "**HTTP Status Code:** `400`
\n Bad Request \n\n **Error Code:** `400`
\n invalidArgument
\n" + }, + "401" : { + "description" : "**HTTP Status Code:** `401`
\n Unauthorized \n\n **Error Code:** `401`
\n unauthorized
\n" + }, + "404" : { + "description" : "**HTTP Status Code:** `404`
\n Not Found \n\n **Error Code:** `404`
\n notFound
\n" + }, + "429" : { + "description" : "**HTTP Status Code:** `429`
\n Too Many Requests. For more information, see [rate limits](https://developers.zoom.us/docs/api/rest/rate-limits/). \n\n " + }, + "500" : { + "description" : "**HTTP Status Code:** `500`
\n Internal Server Error \n\n **Error Code:** `500`
\n internalErr
\n" + } + }, + "security" : [ { + "openapi_oauth" : [ "scheduler:read:admin", "scheduler:read", "scheduler:read:user", "scheduler:read:user:admin" ], + "bearer_token" : [ ] + } ], + "x-extensions" : { + "x-permissions" : [ ], + "x-macro-scopes" : [ "scheduler:read:admin", "scheduler:read" ], + "x-granular-scopes" : [ "scheduler:read:user", "scheduler:read:user:admin" ] + } + } + } + }, + "components" : { + "schemas" : { + "InlineResponse2006SegmentsRecurrence" : { + "type" : "object", + "properties" : { + "thu" : { + "type" : "array", + "description" : "Thursday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "tue" : { + "type" : "array", + "description" : "Tuesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "wed" : { + "type" : "array", + "description" : "Wednesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sat" : { + "type" : "array", + "description" : "Saturday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "fri" : { + "type" : "array", + "description" : "Friday ", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sun" : { + "type" : "array", + "description" : "Sundays", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "mon" : { + "type" : "array", + "description" : "Monday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + } + }, + "description" : "The week of available time rule" + }, + "SchedulerAvailabilityBody" : { + "required" : [ "name", "time_zone" ], + "type" : "object", + "properties" : { + "owner" : { + "type" : "string", + "description" : "the owner's ID", + "readOnly" : true, + "example" : "easonfsxsysks3lgchitiw@scheudler.zoom.us" + }, + "default" : { + "type" : "boolean", + "description" : "The default availability schedule in use" + }, + "name" : { + "minLength" : 1, + "type" : "string", + "description" : "The name of this availability schedule", + "example" : "Working hours" + }, + "availability_id" : { + "type" : "string", + "description" : "The unique ID of availability", + "readOnly" : true, + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone for which this availability schedule originates", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "segments" : { + "type" : "array", + "description" : "The date on which the rule needs to be applied outside of the availability rule", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegments" + } + } + }, + "description" : "The availability schedule set by the user" + }, + "InlineResponse2011Creator" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "boolean", + "description" : "This field indicates if you created the schedule. The field is read-only", + "readOnly" : true, + "example" : true + }, + "display_name" : { + "type" : "string", + "description" : "This field indicates the creator of the display name", + "readOnly" : true, + "example" : "name", + "x-ballerina-name" : "displayName" + }, + "email" : { + "type" : "string", + "description" : "This field indicates the creator's email address", + "example" : "easonfsxsysks3lgchitiw@scheduler.zoom.us" + } + }, + "description" : "The creator of the schedule. The field is read-only" + }, + "SchedulesSingleUseLinkBody" : { + "required" : [ "schedule_id" ], + "type" : "object", + "properties" : { + "schedule_id" : { + "type" : "string", + "description" : "The unique identifier of a schedule", + "example" : "kb1i8qrplqn7r3zmmhphz4uxd0", + "x-ballerina-name" : "scheduleId" + } + } + }, + "InlineResponse2005AvailabilityRules" : { + "type" : "object", + "properties" : { + "use_custom" : { + "type" : "boolean", + "description" : "This field indicates the use of custom availability instead of the rule", + "example" : false, + "x-ballerina-name" : "useCustom" + }, + "availability_id" : { + "type" : "string", + "description" : "The ID of this availability rule. ", + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesscheduleIdSegmentsRecurrence1" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "email" : { + "type" : "string", + "description" : "The owner of this availability rule. ", + "example" : "easonfsxsysks3lgchitiw@scheduler.zoom.us" + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + } + } + }, + "SchedulerschedulesCustomFields" : { + "required" : [ "enabled", "format", "include_other", "name", "position", "required" ], + "type" : "object", + "properties" : { + "answer_choices" : { + "maxItems" : 50, + "minItems" : 1, + "type" : "array", + "description" : "The invitee's option(s) for `single_select` or `multi_select` type of responses", + "items" : { + "maxLength" : 8192, + "minLength" : 1, + "type" : "string", + "description" : "The invitee's option for `single_select` or `multi_select` type of responses.", + "example" : "At home" + }, + "x-ballerina-name" : "answerChoices" + }, + "custom_field_id" : { + "type" : "string", + "description" : "The ID of this question", + "example" : "0l6imf50il8jchyapni3p5ckc0", + "x-ballerina-name" : "customFieldId" + }, + "format" : { + "type" : "string", + "description" : "The type of response that the invitee provides to the custom question. It can be one or multiple lines of text, a phone number, or single- or multiple-select.[`string text phone_number single_select multi_select`]", + "example" : "text", + "enum" : [ "text", "string", "phone_number", "choices_one", "choices_many", "select" ] + }, + "name" : { + "type" : "string", + "description" : "The custom question the host created for the event type", + "example" : "Please share anything that will help prepare for our meeting." + }, + "include_other" : { + "type" : "boolean", + "description" : "This field is true if the custom question allows invitees to record a written response in addition to single-select or multiple-select type of responses. This field is false if the custom question does not allow invitees to record a written response", + "example" : false, + "x-ballerina-name" : "includeOther" + }, + "position" : { + "type" : "number", + "description" : "The position of this question", + "example" : 0 + }, + "enabled" : { + "type" : "boolean", + "description" : "This field is true if the question the host creates is ON and visible on the event booking page. This field is false if it's OFF and invisible on the event booking page", + "example" : true + }, + "required" : { + "type" : "boolean", + "description" : "This field is true if a response to the question created by the host is required for invitees to book the event type. This field is false if a response to the question created by the host is not required for invitees to book the event type", + "example" : false + } + } + }, + "SchedulesscheduleIdBody" : { + "type" : "object", + "properties" : { + "add_on_type" : { + "type" : "string", + "description" : "The method of `addOn`, such as Zoom meeting, Zoom phone, and offline", + "example" : "zoomMeeting", + "enum" : [ "zoomMeeting", "zoomPhone", "offline" ], + "x-ballerina-name" : "addOnType" + }, + "end_date" : { + "type" : "string", + "description" : "The schedule's end date", + "example" : "2023-12-28", + "x-ballerina-name" : "endDate" + }, + "start_time_increment" : { + "maximum" : 720, + "minimum" : 5, + "type" : "number", + "description" : "This field sets the frequency of available time slots for invitees", + "example" : 30, + "x-ballerina-name" : "startTimeIncrement" + }, + "summary" : { + "maxLength" : 256, + "type" : "string", + "description" : "The event's summary", + "example" : "daily meeting" + }, + "color" : { + "type" : "string", + "description" : "The hexadecimal color value of the event type's scheduling page", + "example" : "#fff200" + }, + "custom_fields" : { + "type" : "array", + "description" : "The custom question", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesscheduleIdCustomFields" + }, + "x-ballerina-name" : "customFields" + }, + "description" : { + "maxLength" : 8192, + "type" : "string", + "description" : "The schedule's description", + "example" : "15 Minute Meeting" + }, + "active" : { + "type" : "boolean", + "description" : "This field indicates if the schedule is active", + "example" : true + }, + "booking_limit" : { + "maximum" : 96, + "minimum" : 0, + "type" : "number", + "description" : "This field sets the maximum events allowed per day", + "example" : 0, + "x-ballerina-name" : "bookingLimit" + }, + "secret" : { + "type" : "boolean", + "description" : "This field indicates if the event type is hidden on the owner's main scheduling page", + "example" : false + }, + "time_zone" : { + "type" : "string", + "description" : "the timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "availability_rules" : { + "type" : "array", + "description" : "The availability time rule", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesscheduleIdAvailabilityRules" + }, + "x-ballerina-name" : "availabilityRules" + }, + "capacity" : { + "maximum" : 200, + "minimum" : 1, + "type" : "number", + "description" : "The maximum invitees per event", + "example" : 1 + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + }, + "duration" : { + "maximum" : 1440, + "minimum" : 15, + "type" : "number", + "description" : "The duration of meeting in minutes, range: [1, 1440]", + "example" : 30 + }, + "cushion" : { + "maximum" : 14340, + "minimum" : 0, + "type" : "number", + "description" : "The minimum time before a schedule starts that attendees can book", + "example" : 0 + }, + "location" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The information for a custom location", + "example" : "AAA office" + }, + "buffer" : { + "$ref" : "#/components/schemas/SchedulerschedulesscheduleIdBuffer" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesscheduleIdSegmentsRecurrence1" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "slug" : { + "maxLength" : 256, + "minLength" : 3, + "type" : "string", + "description" : "The event portion of the event's URL that identifies a specific web page", + "example" : "sales" + }, + "interval_type" : { + "type" : "string", + "description" : "The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate`", + "example" : "fixed", + "enum" : [ "unlimited", "fixed" ], + "x-ballerina-name" : "intervalType" + }, + "availability_override" : { + "type" : "boolean", + "description" : "This field indicates the use of the availability rule", + "example" : false, + "x-ballerina-name" : "availabilityOverride" + }, + "start_date" : { + "type" : "string", + "description" : "The schedule's start date", + "example" : "2023-12-21", + "x-ballerina-name" : "startDate" + }, + "status" : { + "type" : "string", + "description" : "The status of schedule, confirmed or cancelled", + "example" : "confirmed", + "enum" : [ "confirmed", "cancelled" ] + } + } + }, + "InlineResponse2003Items" : { + "type" : "object", + "properties" : { + "summary" : { + "maxLength" : 256, + "type" : "string", + "description" : "The event's summary", + "example" : "daily meeting" + }, + "attendees" : { + "type" : "array", + "description" : "The attendees of the event", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2003Attendees" + } + }, + "meeting_notes" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The meeting notes of the event", + "example" : "meeting notes", + "x-ballerina-name" : "meetingNotes" + }, + "description" : { + "maxLength" : 8192, + "type" : "string", + "description" : "The event's description", + "example" : "15 Minute Meeting" + }, + "end_date_time" : { + "type" : "string", + "description" : "The scheduled event end date time", + "example" : "2023-12-21T16:30:00+08:00", + "x-ballerina-name" : "endDateTime" + }, + "event_id" : { + "type" : "string", + "description" : "The unique identifier of event", + "example" : "woft7torlatbw8ek24bmit5k60", + "x-ballerina-name" : "eventId" + }, + "event_type" : { + "type" : "string", + "description" : "This field indicates the type is default(scheduled) or pending event", + "readOnly" : true, + "example" : "default", + "enum" : [ "default", "pending" ], + "x-ballerina-name" : "eventType" + }, + "tracking_params" : { + "type" : "array", + "description" : "The information to track the source of invitee. This occurs when you add UTM parameters in schedule links", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2003TrackingParams" + }, + "x-ballerina-name" : "trackingParams" + }, + "guests" : { + "type" : "array", + "description" : "The guest's collection", + "items" : { + "type" : "string", + "description" : "The guest's email.", + "example" : "tom@zoom.us" + } + }, + "location" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The information for a custom location", + "example" : "AAA office" + }, + "start_date_time" : { + "type" : "string", + "description" : "The scheduled event start date time", + "example" : "2023-12-21T16:00:00+08:00", + "x-ballerina-name" : "startDateTime" + }, + "schedule_id" : { + "type" : "string", + "description" : "The unique identifier of schedule", + "example" : "ygfx661g9x8dwcgeusdqhsplc0_20231220T160000Z", + "x-ballerina-name" : "scheduleId" + }, + "updated" : { + "type" : "string", + "description" : "The moment the event was updated", + "example" : "2023-12-21T06:19:28.309Z" + }, + "external_location" : { + "description" : "The meeting details for when users have scheduled appointments", + "readOnly" : true, + "oneOf" : [ { + "type" : "object", + "properties" : { + "kind" : { + "type" : "string", + "description" : "The type of meeting specified in the schedule.", + "example" : "zoom" + }, + "meeting_id" : { + "type" : "string", + "description" : "The unique identifier of the meeting in string format.", + "example" : "94777886776" + }, + "personal_meeting_id" : { + "type" : "string", + "description" : "The personal meeting id in string format.", + "example" : "98656786887" + }, + "meeting_passcode" : { + "type" : "string", + "description" : "The passcode of Zoom meeting.", + "example" : "958000" + }, + "meeting_description" : { + "type" : "string", + "description" : "The description of Zoom meeting.", + "example" : "Invite you to meeting" + }, + "meeting_join_url" : { + "type" : "string", + "description" : "The URL of Zoom meeting", + "example" : "https://zoom.us/j/7427752805" + } + } + } ], + "x-ballerina-name" : "externalLocation" + }, + "status" : { + "type" : "string", + "description" : "The status of event: confirmed or cancelled", + "example" : "confirmed", + "enum" : [ "confirmed", "cancelled" ] + } + } + }, + "InlineResponse2011CustomFields" : { + "required" : [ "enabled", "format", "include_other", "name", "position", "required" ], + "type" : "object", + "properties" : { + "answer_choices" : { + "maxItems" : 50, + "minItems" : 1, + "type" : "array", + "description" : "The invitee's option(s) for single_select or multi_select type of responses", + "items" : { + "maxLength" : 8192, + "minLength" : 1, + "type" : "string", + "description" : "The invitee's option for single_select or multi_select type of responses.", + "example" : "At home" + }, + "x-ballerina-name" : "answerChoices" + }, + "custom_field_id" : { + "type" : "string", + "description" : "The ID of this question", + "example" : "0l6imf50il8jchyapni3p5ckc0", + "x-ballerina-name" : "customFieldId" + }, + "format" : { + "type" : "string", + "description" : "The type of response that the invitee provides to the custom question. It can be one or multiple lines of text, a phone number, or single- or multiple-select.[`string text phone_number single_select multi_select`]", + "example" : "text", + "enum" : [ "text", "string", "phone_number", "choices_one", "choices_many", "select" ] + }, + "name" : { + "type" : "string", + "description" : "The custom question the host created for the event type", + "example" : "Please share anything that will help prepare for our meeting." + }, + "include_other" : { + "type" : "boolean", + "description" : "This field is true if the custom question allows invitees to record a written response in addition to single-select or multiple-select type of responses. This field is false if the custom question does not allow invitees to record a written response", + "example" : false, + "x-ballerina-name" : "includeOther" + }, + "position" : { + "type" : "number", + "description" : "The position of this question", + "example" : 0 + }, + "enabled" : { + "type" : "boolean", + "description" : "This field is true if the question the host creates is ON and visible on the event booking page. This field is false if it's OFF and invisible on the event booking page", + "example" : true + }, + "required" : { + "type" : "boolean", + "description" : "This field is true if a response to the question created by the host is required for invitees to book the event type. This field is false if a response to the question created by the host is not required for invitees to book the event type", + "example" : false + } + } + }, + "InlineResponse2006AvailabilityRules" : { + "type" : "object", + "properties" : { + "use_custom" : { + "type" : "boolean", + "description" : "This field indicates the use of custom availability instead of the rule", + "example" : false, + "x-ballerina-name" : "useCustom" + }, + "availability_id" : { + "type" : "string", + "description" : "The ID of this availability rule. ", + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/InlineResponse2006SegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "email" : { + "type" : "string", + "description" : "The owner of this availability rule. ", + "example" : "easonfsxsysks3lgchitiw@scheduler.zoom.us" + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + } + } + }, + "InlineResponse2011AvailabilityRules" : { + "type" : "object", + "properties" : { + "use_custom" : { + "type" : "boolean", + "description" : "This field indicates the use of custom availability instead of the rule", + "example" : false, + "x-ballerina-name" : "useCustom" + }, + "availability_id" : { + "type" : "string", + "description" : "The ID of this availability rule. ", + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesSegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "email" : { + "type" : "string", + "description" : "The owner of this availability rule. ", + "example" : "easonfsxsysks3lgchitiw@scheduler.zoom.us" + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + } + } + }, + "InlineResponse2011Organizer" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "boolean", + "description" : "This field indicates if this user is the organizer. This field is read-only", + "readOnly" : true, + "example" : true + }, + "display_name" : { + "type" : "string", + "description" : "The organizer's display name", + "readOnly" : true, + "example" : "name", + "x-ballerina-name" : "displayName" + }, + "email" : { + "type" : "string", + "description" : "The organizer's email address", + "example" : "easonfsxsysks3lgchitiw@scheduler.zoom.us" + } + }, + "description" : "The organizer of the schedule. This field is read-only" + }, + "SchedulerschedulesscheduleIdAvailabilityRules" : { + "type" : "object", + "properties" : { + "use_custom" : { + "type" : "boolean", + "description" : "This field indicates whether to use the custom availability instead of the rule", + "example" : false, + "x-ballerina-name" : "useCustom" + }, + "availability_id" : { + "type" : "string", + "description" : "The ID of this availability rule. ", + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesscheduleIdSegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "email" : { + "type" : "string", + "description" : "The owner of this availability rule. ", + "example" : "easonfsxsysks3lgchitiw@scheduler.zoom.us" + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesscheduleIdSegments" + } + } + } + }, + "ScheduleravailabilitySegments" : { + "required" : [ "end", "start" ], + "type" : "object", + "properties" : { + "start" : { + "type" : "string", + "description" : "This field indicates the start date to override", + "example" : "2024-01-07T09:00:00Z" + }, + "end" : { + "type" : "string", + "description" : "This field indicates the end date to override", + "example" : "2024-01-08T09:00:00Z" + } + }, + "description" : "The date interval to override" + }, + "InlineResponse2004TrackingParams" : { + "type" : "object", + "properties" : { + "label" : { + "type" : "string", + "description" : "The scheduler tags that correspond to UTM parameters one by one", + "example" : "UTM_Source" + }, + "value" : { + "type" : "string", + "description" : "The value of UTM parameters set in schedule links by host", + "example" : "zoom" + }, + "key" : { + "type" : "string", + "description" : "The UTM parameters in schedule links", + "example" : "utm_source" + } + } + }, + "InlineResponse2001Items" : { + "type" : "object", + "properties" : { + "owner" : { + "type" : "string", + "description" : "The owner's ID", + "example" : "easonfsxsysks3lgchitiw@scheudler.zoom.us" + }, + "default" : { + "type" : "boolean", + "example" : true + }, + "name" : { + "type" : "string", + "example" : "The working hours." + }, + "availability_id" : { + "type" : "string", + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/InlineResponse2001SegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + } + } + }, + "InlineResponse2003Attendees" : { + "type" : "object", + "properties" : { + "created" : { + "type" : "string", + "description" : "This field indicates when the attendee attended this event", + "readOnly" : true, + "example" : "2023-12-21T06:19:23.899Z" + }, + "attendee_id" : { + "type" : "string", + "description" : "The ID of attendee", + "readOnly" : true, + "example" : "z7q0q2962w8iyj87249zbi7t10", + "x-ballerina-name" : "attendeeId" + }, + "last_name" : { + "type" : "string", + "description" : " The attendee's last name", + "example" : "tom", + "x-ballerina-name" : "lastName" + }, + "display_name" : { + "type" : "string", + "description" : "The attendee's name", + "example" : "bob", + "x-ballerina-name" : "displayName" + }, + "time_zone" : { + "type" : "string", + "description" : "The attendee's time zone", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "no_show" : { + "type" : "boolean", + "description" : "Whether to show events or not", + "example" : false, + "x-ballerina-name" : "noShow" + }, + "booker" : { + "type" : "boolean", + "description" : "Whether the attendee is the booker", + "readOnly" : true, + "example" : true + }, + "first_name" : { + "type" : "string", + "description" : "The attendee's first name", + "example" : "green", + "x-ballerina-name" : "firstName" + }, + "email" : { + "type" : "string", + "description" : "The attendee's email", + "example" : "abc@zoom.us" + } + } + }, + "ScheduleravailabilitySegmentsRecurrence" : { + "type" : "object", + "properties" : { + "thu" : { + "type" : "array", + "description" : "Thursday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "tue" : { + "type" : "array", + "description" : "Tuesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "wed" : { + "type" : "array", + "description" : "Wednesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sat" : { + "type" : "array", + "description" : "Saturday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "fri" : { + "type" : "array", + "description" : "Friday ", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sun" : { + "type" : "array", + "description" : "Sundays", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "mon" : { + "type" : "array", + "description" : "Monday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + } + }, + "description" : "The rules of this availability schedule" + }, + "InlineResponse2001SegmentsRecurrence" : { + "type" : "object", + "properties" : { + "thu" : { + "type" : "array", + "description" : "Thursday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "tue" : { + "type" : "array", + "description" : "Tuesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "wed" : { + "type" : "array", + "description" : "Wednesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sat" : { + "type" : "array", + "description" : "Saturday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "fri" : { + "type" : "array", + "description" : "Friday ", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sun" : { + "type" : "array", + "description" : "Sunday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "mon" : { + "type" : "array", + "description" : "Monday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + } + } + }, + "InlineResponse200PreviousPeriod" : { + "type" : "object", + "properties" : { + "all_host_available" : { + "type" : "integer", + "description" : "The number of \"all host available\" type schedules", + "example" : 10, + "x-ballerina-name" : "allHostAvailable" + }, + "scheduled_events_rescheduled" : { + "type" : "integer", + "description" : "The number of rescheduled scheduled events", + "example" : 10, + "x-ballerina-name" : "scheduledEventsRescheduled" + }, + "scheduled_events_completed" : { + "type" : "integer", + "description" : "The number of completed scheduled events", + "example" : 10, + "x-ballerina-name" : "scheduledEventsCompleted" + }, + "schedules_canceled" : { + "type" : "integer", + "description" : "The number of cancelled schedules", + "example" : 10, + "x-ballerina-name" : "schedulesCanceled" + }, + "one_off_meeting" : { + "type" : "integer", + "description" : "The number of \"one-off\" type schedules", + "example" : 10, + "x-ballerina-name" : "oneOffMeeting" + }, + "meeting_poll" : { + "type" : "integer", + "description" : "The number of \"meeting poll\" type schedules", + "example" : 10, + "x-ballerina-name" : "meetingPoll" + }, + "one_to_many" : { + "type" : "integer", + "description" : "The number of \"one to many\" type schedules", + "example" : 10, + "x-ballerina-name" : "oneToMany" + }, + "any_host_available" : { + "type" : "integer", + "description" : "The number of \"any host available\" type schedules", + "example" : 10, + "x-ballerina-name" : "anyHostAvailable" + }, + "scheduled_events_canceled" : { + "type" : "integer", + "description" : "The number of cancelled scheduled events", + "example" : 10, + "x-ballerina-name" : "scheduledEventsCanceled" + }, + "one_to_one" : { + "type" : "integer", + "description" : "The number of \"one to one\" type schedules", + "example" : 10, + "x-ballerina-name" : "oneToOne" + }, + "scheduled_events_created" : { + "type" : "integer", + "description" : "The number of created scheduled events", + "example" : 10, + "x-ballerina-name" : "scheduledEventsCreated" + }, + "schedules_created" : { + "type" : "integer", + "description" : "The number of created schedules", + "example" : 10, + "x-ballerina-name" : "schedulesCreated" + } + }, + "description" : "the stats of the previous period with a length of also N. Last N day is counting from today and backtrace N days. Previous period is counting from N days ago and back tracking another N days", + "example" : "\"previous_period\":{{\"created_scheduled_events\":65},{\"completed_scheduled_events\":34},{\"created_schedules\":20},{\"cancelled_scheduled_events\":14},{\"rescheduled_scheduled_events\":8},{\"cancelled_schedules\":3},{\"one_to_one\":10},{\"any_host_available\":5},{\"one_off_meeting\":2},{\"all_host_available\":1},{\"meeting_poll\":1},{\"one_to_many\":1}}" + }, + "SchedulereventseventIdAttendees" : { + "type" : "object", + "properties" : { + "attendee_id" : { + "type" : "string", + "description" : "The ID of attendee", + "readOnly" : true, + "example" : "z7q0q2962w8iyj87249zbi7t10", + "x-ballerina-name" : "attendeeId" + }, + "no_show" : { + "type" : "boolean", + "description" : "This field inidcates the attendee if shown in the scheduled event", + "example" : false, + "x-ballerina-name" : "noShow" + }, + "email" : { + "type" : "string", + "description" : "The attendee's email", + "example" : "abc@zoom.us" + } + } + }, + "SchedulerSchedulesBody" : { + "required" : [ "availability_override", "availability_rules", "capacity", "end", "start", "type" ], + "type" : "object", + "properties" : { + "add_on_type" : { + "type" : "string", + "description" : "The method of the type of `addOn`, such as Zoom meeting, Zoom phone, or offline", + "example" : "zoomMeeting", + "enum" : [ "zoomMeeting", "zoomPhone", "offline" ], + "x-ballerina-name" : "addOnType" + }, + "end_date" : { + "type" : "string", + "description" : "The schedule's end date", + "example" : "2023-12-28", + "x-ballerina-name" : "endDate" + }, + "start_time_increment" : { + "maximum" : 720, + "minimum" : 5, + "type" : "number", + "description" : "This field sets the frequency of available time slots for invitees", + "example" : 30, + "x-ballerina-name" : "startTimeIncrement" + }, + "summary" : { + "maxLength" : 256, + "type" : "string", + "description" : "The event's summary", + "example" : "daily meeting" + }, + "schedule_type" : { + "type" : "string", + "description" : "This field indicates if the schedule type is \"one\" (belongs to an individual user) or \"multiple\"", + "example" : "one", + "enum" : [ "one", "multiple" ], + "x-ballerina-name" : "scheduleType" + }, + "color" : { + "type" : "string", + "description" : "The hexadecimal color value of the event type's scheduling page", + "example" : "#fff200" + }, + "custom_fields" : { + "type" : "array", + "description" : "This field contains the custom question", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesCustomFields" + }, + "x-ballerina-name" : "customFields" + }, + "description" : { + "maxLength" : 8192, + "type" : "string", + "description" : "The schedule's description", + "example" : "15 Minute Meeting" + }, + "active" : { + "type" : "boolean", + "description" : "This field indicates if the schedule is active", + "example" : true + }, + "booking_limit" : { + "maximum" : 96, + "minimum" : 0, + "type" : "number", + "description" : "This field sets the maximum events allowed per day", + "example" : 0, + "x-ballerina-name" : "bookingLimit" + }, + "secret" : { + "type" : "boolean", + "description" : "This field indicates if the event type is hidden on the owner's main scheduling page", + "example" : false + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "availability_rules" : { + "type" : "array", + "description" : "The availability of the time rule", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesAvailabilityRules" + }, + "x-ballerina-name" : "availabilityRules" + }, + "capacity" : { + "maximum" : 200, + "minimum" : 1, + "type" : "number", + "description" : "This field indicates the maximum invitees per event", + "example" : 1 + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + }, + "duration" : { + "maximum" : 1440, + "minimum" : 15, + "type" : "number", + "description" : "This field indicates the duration of the meeting in minutes, range: [1, 1440]", + "example" : 30 + }, + "cushion" : { + "maximum" : 14340, + "minimum" : 0, + "type" : "number", + "description" : "This field indicates the minimum time before a schedule starts when the attendees can book", + "example" : 0 + }, + "location" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The information for a custom location", + "example" : "AAA office" + }, + "buffer" : { + "$ref" : "#/components/schemas/SchedulerschedulesBuffer" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesSegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "interval_type" : { + "type" : "string", + "description" : "The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate`", + "example" : "fixed", + "enum" : [ "unlimited", "fixed" ], + "x-ballerina-name" : "intervalType" + }, + "slug" : { + "maxLength" : 256, + "minLength" : 3, + "type" : "string", + "description" : "The event portion of the event's URL that identifies a specific web page", + "example" : "sales" + }, + "availability_override" : { + "type" : "boolean", + "description" : "This field indicates the use of the availability rule", + "example" : false, + "x-ballerina-name" : "availabilityOverride" + }, + "start_date" : { + "type" : "string", + "description" : "The schedule's start date", + "example" : "2023-12-21", + "x-ballerina-name" : "startDate" + } + } + }, + "SchedulerschedulesSegmentsRecurrence" : { + "type" : "object", + "properties" : { + "thu" : { + "type" : "array", + "description" : "Thursday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "tue" : { + "type" : "array", + "description" : "Tuesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "wed" : { + "type" : "array", + "description" : "Wednesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sat" : { + "type" : "array", + "description" : "Saturday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "fri" : { + "type" : "array", + "description" : "Friday ", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sun" : { + "type" : "array", + "description" : "Sundays", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "mon" : { + "type" : "array", + "description" : "Monday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + } + }, + "description" : "The week of the available time rule" + }, + "InlineResponse2003TrackingParams" : { + "type" : "object", + "properties" : { + "label" : { + "type" : "string", + "description" : "The scheduler tags that correspond to UTM parameters one by one", + "example" : "UTM_Source" + }, + "value" : { + "type" : "string", + "description" : "The value of UTM parameters set in schedule links by host", + "example" : "zoom" + }, + "key" : { + "type" : "string", + "description" : "The UTM parameters in the schedule links", + "example" : "utm_source" + } + } + }, + "SchedulerschedulesBuffer" : { + "type" : "object", + "properties" : { + "before" : { + "maximum" : 240, + "minimum" : 0, + "type" : "number", + "description" : "This field adds the time after the booked schedule", + "example" : 0 + }, + "after" : { + "maximum" : 240, + "minimum" : 0, + "type" : "number", + "description" : "This field adds the time before the booked schedule", + "example" : 0 + } + }, + "description" : "This field indicates the extra time before or after the booked schedule" + }, + "SchedulerschedulesscheduleIdBuffer" : { + "type" : "object", + "properties" : { + "before" : { + "maximum" : 240, + "minimum" : 0, + "type" : "number", + "description" : "This field adds time after the booked schedule", + "example" : 0 + }, + "after" : { + "maximum" : 240, + "minimum" : 0, + "type" : "number", + "description" : "This field adds time before the booked schedule", + "example" : 0 + } + }, + "description" : "The extra time before or after booked schedule" + }, + "SchedulerschedulesscheduleIdSegments" : { + "type" : "object", + "properties" : { + "start" : { + "type" : "string", + "description" : "The start date-time of the segment", + "example" : "2023-12-21T06:00:00Z" + }, + "end" : { + "type" : "string", + "description" : "The end date-time of the segment", + "example" : "2023-12-21T06:00:00Z" + } + } + }, + "InlineResponse201" : { + "type" : "object", + "properties" : { + "owner" : { + "type" : "string", + "description" : "An URI reference to a user", + "example" : "easonfsxsysks3lgchitiw" + }, + "default" : { + "type" : "boolean", + "description" : "The default availability schedule in use", + "example" : false + }, + "name" : { + "type" : "string", + "description" : "The name of this availability schedule", + "example" : "Working hours" + }, + "availability_id" : { + "type" : "string", + "description" : "The unique ID of the availability", + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone for which this availability schedule originates", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "segments" : { + "type" : "array", + "description" : "The date on which the rule needs to be applied outside of the availability rule", + "items" : { + "type" : "object", + "description" : "The date interval to override." + } + } + }, + "description" : "The availability schedule set by the user" + }, + "InlineResponse2004Attendees" : { + "type" : "object", + "properties" : { + "created" : { + "type" : "string", + "description" : "This field indicates when the attendee attended this event", + "readOnly" : true, + "example" : "2023-12-21T06:19:23.899Z" + }, + "attendee_id" : { + "type" : "string", + "description" : "The ID of attendee", + "readOnly" : true, + "example" : "z7q0q2962w8iyj87249zbi7t10", + "x-ballerina-name" : "attendeeId" + }, + "last_name" : { + "type" : "string", + "description" : " The attendee's last name", + "example" : "tom", + "x-ballerina-name" : "lastName" + }, + "display_name" : { + "type" : "string", + "description" : "The attendee's name", + "example" : "bob", + "x-ballerina-name" : "displayName" + }, + "time_zone" : { + "type" : "string", + "description" : "The attendee's time zone", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "no_show" : { + "type" : "boolean", + "description" : "Whether or not to show the event", + "example" : false, + "x-ballerina-name" : "noShow" + }, + "booker" : { + "type" : "boolean", + "description" : "Whether the attendee is the booker", + "readOnly" : true, + "example" : true + }, + "first_name" : { + "type" : "string", + "description" : "The attendee's first name", + "example" : "green", + "x-ballerina-name" : "firstName" + }, + "email" : { + "type" : "string", + "description" : "The attendee's email", + "example" : "abc@zoom.us" + } + } + }, + "InlineResponse200" : { + "type" : "object", + "properties" : { + "popular_schedules" : { + "maxItems" : 5, + "type" : "array", + "description" : "The most popular schedules in the given time range", + "example" : { + "Popular schedules" : [ { + "Test 1-1" : 5 + }, { + "Test 1-to-many" : 4 + }, { + "Test any host available" : 3 + } ] + }, + "items" : { + "type" : "object", + "description" : "The scheduled event's name and booked times." + }, + "x-ballerina-name" : "popularSchedules" + }, + "users_with_least_events" : { + "maxItems" : 5, + "type" : "array", + "description" : "The users with the least scheduled events", + "example" : { + "Users with the least events" : [ { + "Dan Smith" : 5 + }, { + "Allan Swift" : 10 + } ] + }, + "items" : { + "type" : "object", + "description" : "The user's display name and number of scheduled events." + }, + "x-ballerina-name" : "usersWithLeastEvents" + }, + "last_n_days" : { + "allOf" : [ { + "$ref" : "#/components/schemas/InlineResponse200LastNDays" + } ], + "x-ballerina-name" : "lastNDays" + }, + "popular_time_of_day" : { + "maxItems" : 7, + "type" : "array", + "description" : "The distribution of number of events scheduled in a day", + "example" : { + "Popular times (hour of day)" : [ { + "11" : 16 + }, { + "12" : 6 + }, { + "16" : 3 + } ] + }, + "items" : { + "type" : "object", + "description" : "The hour index." + }, + "x-ballerina-name" : "popularTimeOfDay" + }, + "previous_period" : { + "allOf" : [ { + "$ref" : "#/components/schemas/InlineResponse200PreviousPeriod" + } ], + "x-ballerina-name" : "previousPeriod" + }, + "event_distribution_by_duration" : { + "maxItems" : 5, + "type" : "array", + "description" : "The event distribution by duration", + "items" : { + "type" : "object", + "properties" : { }, + "description" : "The event name and its duration in minutes.", + "example" : { + "Event distribution by duration" : [ { + "30" : 65 + }, { + "45" : 15 + }, { + "60" : 35 + } ] + } + }, + "x-ballerina-name" : "eventDistributionByDuration" + }, + "popular_time_of_week" : { + "maxItems" : 24, + "type" : "array", + "description" : "The distribution of number of events scheduled in a week", + "example" : { + "Popular times (day of week)" : [ { + "Fri" : 20 + }, { + "Wed" : 16 + }, { + "Thu" : 11 + }, { + "Tue" : 8 + }, { + "Mon" : 6 + }, { + "Sat" : 3 + }, { + "Sun" : 1 + } ] + }, + "items" : { + "type" : "object", + "description" : "day abbreviation" + }, + "x-ballerina-name" : "popularTimeOfWeek" + }, + "users_with_most_events" : { + "maxItems" : 5, + "type" : "array", + "description" : "The users with the most scheduled events", + "example" : { + "Users with the most events" : [ { + "Dan Smith" : 65 + }, { + "Allan Swift" : 20 + } ] + }, + "items" : { + "type" : "object", + "description" : "The user's display name and number of scheduled events." + }, + "x-ballerina-name" : "usersWithMostEvents" + } + } + }, + "SchedulerschedulesscheduleIdSegmentsRecurrence" : { + "type" : "object", + "properties" : { + "thu" : { + "type" : "array", + "description" : "Thursday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "tue" : { + "type" : "array", + "description" : "Tuesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "wed" : { + "type" : "array", + "description" : "Wednesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sat" : { + "type" : "array", + "description" : "Saturday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "fri" : { + "type" : "array", + "description" : "Friday ", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sun" : { + "type" : "array", + "description" : "Sunday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "mon" : { + "type" : "array", + "description" : "Monday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + } + }, + "description" : "The week of available time rule" + }, + "EventseventIdBody" : { + "type" : "object", + "properties" : { + "attendees" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SchedulereventseventIdAttendees" + } + }, + "meeting_notes" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The meeting notes of the event", + "example" : "meeting notes", + "x-ballerina-name" : "meetingNotes" + }, + "status" : { + "type" : "string", + "description" : "The status of event: confirmed or cancelled", + "example" : "confirmed", + "enum" : [ "confirmed", "cancelled" ] + } + }, + "description" : "The portions of the event resource" + }, + "AvailabilityavailabilityIdBody" : { + "required" : [ "name", "time_zone" ], + "type" : "object", + "properties" : { + "default" : { + "type" : "boolean", + "description" : "The default availability schedule in use" + }, + "name" : { + "minLength" : 1, + "type" : "string", + "description" : "The name of this availability schedule", + "example" : "Working hours" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone for which this availability schedule originates", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "segments" : { + "type" : "array", + "description" : "The date on which the rule needs to be applied outside of the availability rule", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilityavailabilityIdSegments" + } + } + }, + "description" : "The availability schedule set by the user" + }, + "SchedulerschedulesscheduleIdSegmentsRecurrence1" : { + "type" : "object", + "properties" : { + "thu" : { + "type" : "array", + "description" : "Thursday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "tue" : { + "type" : "array", + "description" : "Tuesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "wed" : { + "type" : "array", + "description" : "Wednesday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sat" : { + "type" : "array", + "description" : "Saturday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "fri" : { + "type" : "array", + "description" : "Friday ", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "sun" : { + "type" : "array", + "description" : "Sunday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + }, + "mon" : { + "type" : "array", + "description" : "Monday", + "items" : { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrenceSun" + } + } + }, + "description" : "The week of the available time rule" + }, + "InlineResponse2005Creator" : { + "type" : "object", + "properties" : { + "self" : { + "type" : "boolean", + "description" : "This field indicates if you created the schedule. The field is read-only", + "readOnly" : true, + "example" : true + }, + "display_name" : { + "type" : "string", + "description" : "This field indicates the creator of the display name", + "readOnly" : true, + "example" : "name", + "x-ballerina-name" : "displayName" + }, + "email" : { + "type" : "string", + "description" : "This field indicates the creator's email address", + "example" : "easonfsxsysks3lgchitiw@scheduler.zoom.us" + } + }, + "description" : "The creator of the schedule. This field is read-only" + }, + "InlineResponse2012" : { + "required" : [ "scheduling_url" ], + "type" : "object", + "properties" : { + "scheduling_url" : { + "type" : "string", + "description" : "The scheduling link URL", + "example" : "https://scheduler.zoomdev.us/manage/xu3o9skk6ygg8gk5hjvokjm2c0", + "x-ballerina-name" : "schedulingUrl" + } + } + }, + "InlineResponse2011" : { + "type" : "object", + "properties" : { + "end_date" : { + "type" : "string", + "description" : "The schedule's end date", + "example" : "2023-12-20", + "x-ballerina-name" : "endDate" + }, + "color" : { + "type" : "string", + "description" : "The hexadecimal color value of the event type's scheduling page", + "example" : "#fff200" + }, + "description" : { + "maxLength" : 8192, + "type" : "string", + "description" : "The schedule's description", + "example" : "15 Minute Meeting" + }, + "secret" : { + "type" : "boolean", + "description" : "This field indicates if the event type is hidden on the owner's main scheduling page", + "example" : false + }, + "availability_rules" : { + "type" : "array", + "description" : "The availability of the time rule", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2011AvailabilityRules" + }, + "x-ballerina-name" : "availabilityRules" + }, + "capacity" : { + "maximum" : 200, + "minimum" : 1, + "type" : "number", + "description" : "This field indicates the maximum invitees per event", + "example" : 1 + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + }, + "duration" : { + "maximum" : 1440, + "minimum" : 15, + "type" : "number", + "description" : "This field indicates the duration of the meeting in minutes, range: [1, 1440]", + "example" : 30 + }, + "cushion" : { + "maximum" : 14340, + "minimum" : 0, + "type" : "number", + "description" : "This field indicates the minimum time before a schedule starts when the attendees can book", + "example" : 0 + }, + "buffer" : { + "$ref" : "#/components/schemas/SchedulerschedulesBuffer" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesSegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "slug" : { + "maxLength" : 256, + "minLength" : 3, + "type" : "string", + "description" : "The event portion of the event's URL that identifies a specific web page", + "example" : "sales" + }, + "interval_type" : { + "type" : "string", + "description" : "The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate`", + "example" : "fixed", + "enum" : [ "unlimited", "fixed" ], + "x-ballerina-name" : "intervalType" + }, + "start_date" : { + "type" : "string", + "description" : "The schedule's start date", + "example" : "2023-12-21", + "x-ballerina-name" : "startDate" + }, + "add_on_type" : { + "type" : "string", + "description" : "The method of the type of `addOn`, such as Zoom meeting, Zoom phone, or offline", + "example" : "zoomMeeting", + "enum" : [ "zoomMeeting", "zoomPhone", "offline" ], + "x-ballerina-name" : "addOnType" + }, + "scheduling_url" : { + "type" : "string", + "description" : "The URL of the user’s scheduling site where invitees book this event type", + "example" : "https://scheduler.zoom.us/zoom_us/sales", + "x-ballerina-name" : "schedulingUrl" + }, + "start_time_increment" : { + "maximum" : 720, + "minimum" : 5, + "type" : "number", + "description" : "This field sets the frequency of available time slots for invitees", + "example" : 30, + "x-ballerina-name" : "startTimeIncrement" + }, + "summary" : { + "maxLength" : 256, + "type" : "string", + "description" : "The event's summary", + "example" : "daily meeting" + }, + "creator" : { + "$ref" : "#/components/schemas/InlineResponse2011Creator" + }, + "schedule_type" : { + "type" : "string", + "description" : "This field indicates if the schedule type is \"one\" (belongs to an individual user) or \"multiple\"", + "example" : "one", + "enum" : [ "one", "multiple" ], + "x-ballerina-name" : "scheduleType" + }, + "custom_fields" : { + "type" : "array", + "description" : "This field contains the custom question", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2011CustomFields" + }, + "x-ballerina-name" : "customFields" + }, + "active" : { + "type" : "boolean", + "description" : "This field indicates if the schedule is active", + "example" : true + }, + "booking_limit" : { + "maximum" : 96, + "minimum" : 0, + "type" : "number", + "description" : "This field sets the maximum events allowed per day", + "example" : 0, + "x-ballerina-name" : "bookingLimit" + }, + "time_zone" : { + "type" : "string", + "description" : "the timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "organizer" : { + "$ref" : "#/components/schemas/InlineResponse2011Organizer" + }, + "location" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The information for a custom location", + "example" : "AAA office" + }, + "schedule_id" : { + "type" : "string", + "description" : "The unique identifier of schedule", + "example" : "ygfx661g9x8dwcgeusdqhsplc0", + "x-ballerina-name" : "scheduleId" + }, + "updated" : { + "type" : "string", + "description" : "The moment the schedule type was updated", + "readOnly" : true, + "example" : "2023-12-21T06:18:32.087Z" + }, + "availability_override" : { + "type" : "boolean", + "description" : "This field indicates the use of the availability rule", + "example" : false, + "x-ballerina-name" : "availabilityOverride" + }, + "status" : { + "type" : "string", + "description" : "The status of schedule: confirmed or cancelled", + "example" : "confirmed", + "enum" : [ "confirmed", "cancelled" ] + } + } + }, + "SchedulerschedulesAvailabilityRules" : { + "type" : "object", + "properties" : { + "use_custom" : { + "type" : "boolean", + "description" : "This field indicates the use of custom availability instead of the rule", + "example" : false, + "x-ballerina-name" : "useCustom" + }, + "availability_id" : { + "type" : "string", + "description" : "The ID of this availability rule. ", + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesSegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "the timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "email" : { + "type" : "string", + "description" : "The owner of this availability rule. ", + "example" : "easonfsxsysks3lgchitiw@scheduler.zoom.us" + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + } + } + }, + "ScheduleravailabilitySegmentsRecurrenceSun" : { + "type" : "object", + "properties" : { + "start" : { + "type" : "string", + "description" : "The start time of this day", + "example" : "09:00" + }, + "end" : { + "type" : "string", + "description" : "The end time of this day", + "example" : "17:00" + } + } + }, + "InlineResponse200LastNDays" : { + "type" : "object", + "properties" : { + "all_host_available" : { + "type" : "integer", + "description" : "The number of \"all host available\" type schedules", + "example" : 10, + "x-ballerina-name" : "allHostAvailable" + }, + "scheduled_events_rescheduled" : { + "type" : "integer", + "description" : "The number of rescheduled scheduled events", + "example" : 10, + "x-ballerina-name" : "scheduledEventsRescheduled" + }, + "scheduled_events_completed" : { + "type" : "integer", + "description" : "The number of completed scheduled events", + "example" : 10, + "x-ballerina-name" : "scheduledEventsCompleted" + }, + "schedules_canceled" : { + "type" : "integer", + "description" : "The number of cancelled schedules", + "example" : 10, + "x-ballerina-name" : "schedulesCanceled" + }, + "one_off_meeting" : { + "type" : "integer", + "description" : "The number of \"one-off\" type schedules", + "example" : 10, + "x-ballerina-name" : "oneOffMeeting" + }, + "meeting_poll" : { + "type" : "integer", + "description" : "The number of \"meeting poll\" type schedules", + "example" : 10, + "x-ballerina-name" : "meetingPoll" + }, + "one_to_many" : { + "type" : "integer", + "description" : "The number of \"one to many\" type schedules", + "example" : 10, + "x-ballerina-name" : "oneToMany" + }, + "any_host_available" : { + "type" : "integer", + "description" : "The number of \"any host available\" type schedules", + "example" : 10, + "x-ballerina-name" : "anyHostAvailable" + }, + "scheduled_events_canceled" : { + "type" : "integer", + "description" : "The number of cancelled scheduled events", + "example" : 10, + "x-ballerina-name" : "scheduledEventsCanceled" + }, + "one_to_one" : { + "type" : "integer", + "description" : "The number of \"one to one\" type schedules", + "example" : 10, + "x-ballerina-name" : "oneToOne" + }, + "scheduled_events_created" : { + "type" : "integer", + "description" : "The number of created scheduled events", + "example" : 10, + "x-ballerina-name" : "scheduledEventsCreated" + }, + "schedules_created" : { + "type" : "integer", + "description" : "The number of created schedules", + "example" : 10, + "x-ballerina-name" : "schedulesCreated" + } + }, + "description" : "The stats of the last N days", + "example" : "\"last_n_days\":{{\"created_scheduled_events\":65},{\"completed_scheduled_events\":34},{\"created_schedules\":20},{\"cancelled_scheduled_events\":14},{\"rescheduled_scheduled_events\":8},{\"cancelled_schedules\":3},{\"one_to_one\":10},{\"any_host_available\":5},{\"one_off_meeting\":2},{\"all_host_available\":1},{\"meeting_poll\":1},{\"one_to_many\":1}}" + }, + "SchedulerschedulesscheduleIdCustomFields" : { + "required" : [ "enabled", "format", "include_other", "name", "position", "required" ], + "type" : "object", + "properties" : { + "answer_choices" : { + "maxItems" : 50, + "minItems" : 1, + "type" : "array", + "description" : "The invitee's option(s) for single_select or multi_select type of responses", + "items" : { + "maxLength" : 8192, + "minLength" : 1, + "type" : "string", + "description" : "The invitee's option for single_select or multi_select type of responses.", + "example" : "At home" + }, + "x-ballerina-name" : "answerChoices" + }, + "format" : { + "type" : "string", + "description" : "The type of response that the invitee provides to the custom question. It can be one or multiple lines of text, a phone number, or single- or multiple-select.[`string text phone_number single_select multi_select`]", + "example" : "text", + "enum" : [ "text", "string", "phone_number", "choices_one", "choices_many", "select" ] + }, + "custom_field_id" : { + "type" : "string", + "description" : "The ID of this question", + "example" : "0l6imf50il8jchyapni3p5ckc0", + "x-ballerina-name" : "customFieldId" + }, + "name" : { + "type" : "string", + "description" : "The custom question that the host created for the event type", + "example" : "Please share anything that will help prepare for our meeting." + }, + "include_other" : { + "type" : "boolean", + "description" : "If the custom question lets invitees record a written response, in addition to single-select or multiple-select type of responses, then it's true. Otherwise, it's false", + "example" : false, + "x-ballerina-name" : "includeOther" + }, + "position" : { + "type" : "number", + "description" : "The position of this question", + "example" : 0 + }, + "enabled" : { + "type" : "boolean", + "description" : "If the question created by the host is turned ON and visible on the event booking page, then it's true. If it's turned OFF and invisible on the event booking page, then it's false", + "example" : true + }, + "required" : { + "type" : "boolean", + "description" : "If a response to the question, created by the host, is required for invitees to book the event type, then it's true. If it's not required, it's false", + "example" : false + } + } + }, + "SchedulerschedulesSegments" : { + "type" : "object", + "properties" : { + "start" : { + "type" : "string", + "description" : "The start date and time of the segment", + "example" : "2023-12-21T06:00:00Z" + }, + "end" : { + "type" : "string", + "description" : "The end date and time of the segment", + "example" : "2023-12-21T06:00:00Z" + } + } + }, + "ScheduleravailabilityavailabilityIdSegments" : { + "required" : [ "end", "start" ], + "type" : "object", + "properties" : { + "start" : { + "type" : "string", + "description" : "The start date to override", + "example" : "2024-01-07T09:00:00Z" + }, + "end" : { + "type" : "string", + "description" : "The end date to override", + "example" : "2024-01-08T09:00:00Z" + } + }, + "description" : "The date interval that needs to overridden" + }, + "InlineResponse2001" : { + "type" : "object", + "properties" : { + "next_page_token" : { + "type" : "string", + "description" : " The token for a later to retrieve only the entries that have changed since this result was returned. It's omitted if further results are available, in which case `nextPageToken` is provided", + "example" : "Cj8KLwotCgsI3ujvqgYQgIXUGxIeChwKGjBzNzAyZWVtbjBzOTdlZXFhNXE1NWg4ZWJtGgwIzIPVrAYQwM3WrAPAPgE=", + "x-ballerina-name" : "nextPageToken" + }, + "items" : { + "type" : "array", + "description" : "array[User Availability Schedule]", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2001Items" + } + } + }, + "description" : "The availability of the schedule query result of given user" + }, + "InlineResponse2003" : { + "type" : "object", + "properties" : { + "next_page_token" : { + "type" : "string", + "description" : "The token to access the next page of this result", + "example" : "ffffffff97c5b97f_53slvrhet2n0xkxurl5ybgde40", + "x-ballerina-name" : "nextPageToken" + }, + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2003Items" + } + } + } + }, + "InlineResponse2002" : { + "type" : "object", + "properties" : { + "owner" : { + "type" : "string", + "description" : "The owner's ID", + "readOnly" : true, + "example" : "easonfsxsysks3lgchitiw@scheudler.zoom.us" + }, + "default" : { + "type" : "boolean", + "description" : "The default availability schedule in use", + "example" : true + }, + "name" : { + "type" : "string", + "description" : "The name of this availability schedule", + "example" : "Working hours" + }, + "availability_id" : { + "type" : "string", + "description" : "The unique ID of availability", + "example" : "x3h1u4id4liffdyszsp8kpxl80", + "x-ballerina-name" : "availabilityId" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/ScheduleravailabilitySegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "time_zone" : { + "type" : "string", + "description" : "The timezone for which this availability schedule originates", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + } + }, + "description" : "The availability schedule set by the user" + }, + "InlineResponse2005" : { + "type" : "object", + "properties" : { + "next_page_token" : { + "type" : "string", + "description" : "The token that accesses the next page of this result", + "example" : "aec369a4fce6ae655749b00fc7260bfd", + "x-ballerina-name" : "nextPageToken" + }, + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2005Items" + } + } + } + }, + "InlineResponse2004" : { + "type" : "object", + "properties" : { + "summary" : { + "maxLength" : 256, + "type" : "string", + "description" : "The event's summary", + "example" : "daily meeting" + }, + "attendees" : { + "type" : "array", + "description" : "The attendees of the event", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2004Attendees" + } + }, + "meeting_notes" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The meeting notes of the event", + "example" : "meeting notes", + "x-ballerina-name" : "meetingNotes" + }, + "description" : { + "maxLength" : 8192, + "type" : "string", + "description" : "The event's description", + "example" : "15 Minute Meeting" + }, + "end_date_time" : { + "type" : "string", + "description" : "The scheduled event's end date time", + "example" : "2023-12-21T16:30:00+08:00", + "x-ballerina-name" : "endDateTime" + }, + "event_id" : { + "type" : "string", + "description" : "The unique identifier of event", + "example" : "woft7torlatbw8ek24bmit5k60", + "x-ballerina-name" : "eventId" + }, + "event_type" : { + "type" : "string", + "description" : "This field indicates whether the type is default(scheduled) or a pending event", + "readOnly" : true, + "example" : "default", + "enum" : [ "default", "pending" ], + "x-ballerina-name" : "eventType" + }, + "tracking_params" : { + "type" : "array", + "description" : "The information to track the source of invitee. Only use this setting you add UTM parameters in schedule links", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2004TrackingParams" + }, + "x-ballerina-name" : "trackingParams" + }, + "guests" : { + "type" : "array", + "description" : "The guest's collection", + "items" : { + "type" : "string", + "description" : "The guest's email.", + "example" : "tom@zoom.us" + } + }, + "location" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The information for a custom location", + "example" : "AAA office" + }, + "start_date_time" : { + "type" : "string", + "description" : "The scheduled event's start date time", + "example" : "2023-12-21T16:00:00+08:00", + "x-ballerina-name" : "startDateTime" + }, + "schedule_id" : { + "type" : "string", + "description" : "The unique identifier of schedule", + "example" : "ygfx661g9x8dwcgeusdqhsplc0_20231220T160000Z", + "x-ballerina-name" : "scheduleId" + }, + "updated" : { + "type" : "string", + "description" : "The moment the event was updated", + "example" : "2023-12-21T06:19:28.309Z" + }, + "external_location" : { + "description" : "The meeting details for when users have scheduled appointments", + "readOnly" : true, + "oneOf" : [ { + "type" : "object", + "properties" : { + "kind" : { + "type" : "string", + "description" : "The type of meeting specified in the schedule.", + "example" : "zoom" + }, + "meeting_id" : { + "type" : "string", + "description" : "The unique identifier of the meeting in string format.", + "example" : "94777886776" + }, + "personal_meeting_id" : { + "type" : "string", + "description" : "The personal meeting id in string format.", + "example" : "98656786887" + }, + "meeting_passcode" : { + "type" : "string", + "description" : "The passcode of Zoom meeting.", + "example" : "958000" + }, + "meeting_description" : { + "type" : "string", + "description" : "The description of Zoom meeting.", + "example" : "Invite you to meeting" + }, + "meeting_join_url" : { + "type" : "string", + "description" : "The URL of Zoom meeting", + "example" : "https://zoom.us/j/7427752805" + } + } + } ], + "x-ballerina-name" : "externalLocation" + }, + "status" : { + "type" : "string", + "description" : "The status of event: confirmed or cancelled", + "example" : "confirmed", + "enum" : [ "confirmed", "cancelled" ] + } + } + }, + "InlineResponse2005Items" : { + "type" : "object", + "properties" : { + "end_date" : { + "type" : "string", + "description" : "The schedule's end date", + "example" : "2023-12-28", + "x-ballerina-name" : "endDate" + }, + "color" : { + "type" : "string", + "description" : "The hexadecimal color value of the event type's scheduling page", + "example" : "#fff200" + }, + "description" : { + "maxLength" : 8192, + "type" : "string", + "description" : "The schedule's description", + "example" : "15 Minute Meeting" + }, + "secret" : { + "type" : "boolean", + "description" : "This field indicates if the event type is hidden on the owner's main scheduling page", + "example" : false + }, + "availability_rules" : { + "type" : "array", + "description" : "The availability of the time rule", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2005AvailabilityRules" + }, + "x-ballerina-name" : "availabilityRules" + }, + "capacity" : { + "maximum" : 200, + "minimum" : 1, + "type" : "number", + "description" : "This field indicates the maximum invitees per event", + "example" : 1 + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + }, + "duration" : { + "maximum" : 1440, + "minimum" : 15, + "type" : "number", + "description" : "This field indicates the duration of the meeting in minutes, range: [1, 1440]", + "example" : 30 + }, + "cushion" : { + "maximum" : 14340, + "minimum" : 0, + "type" : "number", + "description" : "This field indicates the minimum time before a schedule starts when the attendees can book", + "example" : 0 + }, + "buffer" : { + "$ref" : "#/components/schemas/SchedulerschedulesBuffer" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesscheduleIdSegmentsRecurrence1" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "slug" : { + "maxLength" : 256, + "minLength" : 3, + "type" : "string", + "description" : "The event portion of the event's URL that identifies a specific web page", + "example" : "sales" + }, + "interval_type" : { + "type" : "string", + "description" : "The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate`", + "example" : "fixed", + "enum" : [ "unlimited", "fixed" ], + "x-ballerina-name" : "intervalType" + }, + "start_date" : { + "type" : "string", + "description" : "The schedule's start date", + "example" : "2023-12-21", + "x-ballerina-name" : "startDate" + }, + "add_on_type" : { + "type" : "string", + "description" : "The method of the type of `addOn`, such as Zoom meeting, Zoom phone, or offline", + "example" : "zoomMeeting", + "enum" : [ "zoomMeeting", "zoomPhone", "offline" ], + "x-ballerina-name" : "addOnType" + }, + "scheduling_url" : { + "type" : "string", + "description" : "The URL of the user's scheduling site where invitees book this event type", + "example" : "https://scheduler.zoom.us/zoom_us/sales", + "x-ballerina-name" : "schedulingUrl" + }, + "start_time_increment" : { + "maximum" : 720, + "minimum" : 5, + "type" : "number", + "description" : "This field sets the frequency of available time slots for invitees", + "example" : 30, + "x-ballerina-name" : "startTimeIncrement" + }, + "summary" : { + "maxLength" : 256, + "type" : "string", + "description" : "The event's summary", + "example" : "daily meeting" + }, + "creator" : { + "$ref" : "#/components/schemas/InlineResponse2005Creator" + }, + "schedule_type" : { + "type" : "string", + "description" : "This field indicates if the schedule type is \"one\" (belongs to an individual user) or \"multiple\"", + "example" : "one", + "enum" : [ "one", "multiple" ], + "x-ballerina-name" : "scheduleType" + }, + "custom_fields" : { + "type" : "array", + "description" : "This field contains the custom question", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2011CustomFields" + }, + "x-ballerina-name" : "customFields" + }, + "active" : { + "type" : "boolean", + "description" : "This field indicates if the schedule is active", + "example" : true + }, + "booking_limit" : { + "maximum" : 96, + "minimum" : 0, + "type" : "number", + "description" : "This field sets the maximum events allowed per day", + "example" : 0, + "x-ballerina-name" : "bookingLimit" + }, + "time_zone" : { + "type" : "string", + "description" : "the timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "organizer" : { + "$ref" : "#/components/schemas/InlineResponse2011Organizer" + }, + "location" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The information for a custom location", + "example" : "AAA office" + }, + "schedule_id" : { + "type" : "string", + "description" : "The unique identifier of the schedule", + "example" : "ygfx661g9x8dwcgeusdqhsplc0", + "x-ballerina-name" : "scheduleId" + }, + "updated" : { + "type" : "string", + "description" : "The moment the schedule type was updated", + "readOnly" : true, + "example" : "2023-12-21T06:18:32.087Z" + }, + "availability_override" : { + "type" : "boolean", + "description" : "This field indicates the use of the availability rule", + "example" : false, + "x-ballerina-name" : "availabilityOverride" + }, + "status" : { + "type" : "string", + "description" : "The status of schedule: confirmed or cancelled", + "example" : "confirmed", + "enum" : [ "confirmed", "cancelled" ] + } + } + }, + "InlineResponse2007" : { + "type" : "object", + "properties" : { + "scheduling_url" : { + "type" : "string", + "description" : "The URL of the user’s scheduling site where invitees book this event type", + "example" : "https://scheduler.zoom.us/zoom_us", + "x-ballerina-name" : "schedulingUrl" + }, + "logo" : { + "type" : "string", + "description" : "This field enables users to upload their company's logo on Zoom", + "example" : "user logo" + }, + "display_name" : { + "type" : "string", + "description" : "The user's name", + "example" : "name", + "x-ballerina-name" : "displayName" + }, + "time_zone" : { + "type" : "string", + "description" : "The time zone to use when presenting time to the user", + "example" : "America/New York", + "x-ballerina-name" : "timeZone" + }, + "slug" : { + "type" : "string", + "description" : "The portion of URL for the user's scheduling page where invitees book sessions that renders in a human-readable format", + "example" : "zoom_us" + }, + "picture" : { + "type" : "string", + "description" : "This field enables users to upload their personal avatars on Zoom", + "example" : "base64 encoding string" + } + }, + "description" : "The user's information" + }, + "InlineResponse2006" : { + "type" : "object", + "properties" : { + "end_date" : { + "type" : "string", + "description" : "The schedule's end date", + "example" : "2023-12-28", + "x-ballerina-name" : "endDate" + }, + "color" : { + "type" : "string", + "description" : "The hexadecimal color value of the event type's scheduling page", + "example" : "#fff200" + }, + "description" : { + "maxLength" : 8192, + "type" : "string", + "description" : "The schedule's description", + "example" : "15 Minute Meeting" + }, + "secret" : { + "type" : "boolean", + "description" : "This field indicates if the event type is hidden on the owner's main scheduling page", + "example" : false + }, + "availability_rules" : { + "type" : "array", + "description" : "The availability of the time rule", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2006AvailabilityRules" + }, + "x-ballerina-name" : "availabilityRules" + }, + "capacity" : { + "maximum" : 200, + "minimum" : 1, + "type" : "number", + "description" : "This field indicates the maximum invitees per event", + "example" : 1 + }, + "segments" : { + "type" : "array", + "description" : "The available time segments of the event", + "items" : { + "$ref" : "#/components/schemas/SchedulerschedulesSegments" + } + }, + "duration" : { + "maximum" : 1440, + "minimum" : 15, + "type" : "number", + "description" : "This field indicates the duration of the meeting in minutes, range: [1, 1440]", + "example" : 30 + }, + "cushion" : { + "maximum" : 14340, + "minimum" : 0, + "type" : "number", + "description" : "This field indicates the minimum time before a schedule starts when the attendees can book", + "example" : 0 + }, + "buffer" : { + "$ref" : "#/components/schemas/SchedulerschedulesBuffer" + }, + "segments_recurrence" : { + "allOf" : [ { + "$ref" : "#/components/schemas/SchedulerschedulesSegmentsRecurrence" + } ], + "x-ballerina-name" : "segmentsRecurrence" + }, + "slug" : { + "maxLength" : 256, + "minLength" : 3, + "type" : "string", + "description" : "The event portion of the event's URL that identifies a specific web page", + "example" : "sales" + }, + "interval_type" : { + "type" : "string", + "description" : "The schedule time range. Unlimited means forever and fixed means using `startDate` and `endDate`", + "example" : "fixed", + "enum" : [ "unlimited", "fixed" ], + "x-ballerina-name" : "intervalType" + }, + "start_date" : { + "type" : "string", + "description" : "The schedule's start date", + "example" : "2023-12-21", + "x-ballerina-name" : "startDate" + }, + "add_on_type" : { + "type" : "string", + "description" : "The method of the type of `addOn`, such as Zoom meeting, Zoom phone, or offline", + "example" : "zoomMeeting", + "enum" : [ "zoomMeeting", "zoomPhone", "offline" ], + "x-ballerina-name" : "addOnType" + }, + "scheduling_url" : { + "type" : "string", + "description" : "The URL of the user's scheduling site where invitees book this event type", + "example" : "https://scheduler.zoom.us/zoom_us/sales", + "x-ballerina-name" : "schedulingUrl" + }, + "start_time_increment" : { + "maximum" : 720, + "minimum" : 5, + "type" : "number", + "description" : "This field sets the frequency of available time slots for invitees", + "example" : 30, + "x-ballerina-name" : "startTimeIncrement" + }, + "summary" : { + "maxLength" : 256, + "type" : "string", + "description" : "The event's summary", + "example" : "daily meeting" + }, + "creator" : { + "$ref" : "#/components/schemas/InlineResponse2011Creator" + }, + "schedule_type" : { + "type" : "string", + "description" : "This field indicates if the schedule type is **one** (belongs to an individual user) or **multiple**", + "example" : "one", + "enum" : [ "one", "multiple" ], + "x-ballerina-name" : "scheduleType" + }, + "custom_fields" : { + "type" : "array", + "description" : "This field contains the custom question", + "items" : { + "$ref" : "#/components/schemas/InlineResponse2011CustomFields" + }, + "x-ballerina-name" : "customFields" + }, + "active" : { + "type" : "boolean", + "description" : "This field indicates if the schedule is active", + "example" : true + }, + "booking_limit" : { + "maximum" : 96, + "minimum" : 0, + "type" : "number", + "description" : "This field sets the maximum events allowed per day", + "example" : 0, + "x-ballerina-name" : "bookingLimit" + }, + "time_zone" : { + "type" : "string", + "description" : "the timezone of this availability rule. ", + "example" : "Asia/Shanghai", + "x-ballerina-name" : "timeZone" + }, + "organizer" : { + "$ref" : "#/components/schemas/InlineResponse2011Organizer" + }, + "location" : { + "maxLength" : 1024, + "type" : "string", + "description" : "The information for a custom location", + "example" : "AAA office" + }, + "schedule_id" : { + "type" : "string", + "description" : "The unique identifier of a schedule", + "example" : "ygfx661g9x8dwcgeusdqhsplc0", + "x-ballerina-name" : "scheduleId" + }, + "updated" : { + "type" : "string", + "description" : "The moment the schedule type was updated", + "readOnly" : true, + "example" : "2023-12-21T06:18:32.087Z" + }, + "availability_override" : { + "type" : "boolean", + "description" : "This field indicates the use of the availability rule", + "example" : false, + "x-ballerina-name" : "availabilityOverride" + }, + "status" : { + "type" : "string", + "description" : "The status of schedule: confirmed or cancelled", + "example" : "confirmed", + "enum" : [ "confirmed", "cancelled" ] + } + } + } + }, + "securitySchemes" : { + "bearer_token" : { + "type" : "http", + "scheme" : "bearer" + }, + "openapi_oauth" : { + "type" : "oauth2", + "flows" : { + "authorizationCode" : { + "authorizationUrl" : "/", + "tokenUrl" : "", + "refreshUrl" : "", + "scopes" : { + "scheduler:read" : "scheduler:read", + "scheduler:read:admin" : "scheduler:read:admin", + "scheduler:read:analytics" : "scheduler:read:analytics", + "scheduler:read:analytics:admin" : "scheduler:read:analytics:admin", + "scheduler:read:list_availability" : "scheduler:read:list_availability", + "scheduler:read:list_availability:admin" : "scheduler:read:list_availability:admin", + "scheduler:write:admin" : "scheduler:write:admin", + "scheduler:write" : "scheduler:write", + "scheduler:write:availability" : "scheduler:write:availability", + "scheduler:write:availability:admin" : "scheduler:write:availability:admin", + "scheduler:read:availability" : "scheduler:read:availability", + "scheduler:read:availability:admin" : "scheduler:read:availability:admin", + "scheduler:update:availability" : "scheduler:update:availability", + "scheduler:update:availability:admin" : "scheduler:update:availability:admin", + "scheduler:delete:availability" : "scheduler:delete:availability", + "scheduler:delete:availability:admin" : "scheduler:delete:availability:admin", + "scheduler:read:list_scheduled_events" : "scheduler:read:list_scheduled_events", + "scheduler:read:list_scheduled_events:admin" : "scheduler:read:list_scheduled_events:admin", + "scheduler:read:scheduled_event" : "scheduler:read:scheduled_event", + "scheduler:read:scheduled_event:admin" : "scheduler:read:scheduled_event:admin", + "scheduler:delete:scheduled_event" : "scheduler:delete:scheduled_event", + "scheduler:delete:scheduled_event:admin" : "scheduler:delete:scheduled_event:admin", + "scheduler:update:scheduled_event" : "scheduler:update:scheduled_event", + "scheduler:update:scheduled_event:admin" : "scheduler:update:scheduled_event:admin", + "scheduler:read:list_schedule" : "scheduler:read:list_schedule", + "scheduler:read:list_schedule:admin" : "scheduler:read:list_schedule:admin", + "scheduler:write:insert_schedule" : "scheduler:write:insert_schedule", + "scheduler:write:insert_schedule:admin" : "scheduler:write:insert_schedule:admin", + "scheduler:update:patch_schedule" : "scheduler:update:patch_schedule", + "scheduler:update:patch_schedule:admin" : "scheduler:update:patch_schedule:admin", + "scheduler:read:get_schedule" : "scheduler:read:get_schedule", + "scheduler:read:get_schedule:admin" : "scheduler:read:get_schedule:admin", + "scheduler:delete:delete_schedule" : "scheduler:delete:delete_schedule", + "scheduler:delete:delete_schedule:admin" : "scheduler:delete:delete_schedule:admin", + "scheduler:write:single_use_link" : "scheduler:write:single_use_link", + "scheduler:write:single_use_link:admin" : "scheduler:write:single_use_link:admin", + "scheduler:read:user" : "scheduler:read:user", + "scheduler:read:user:admin" : "scheduler:read:user:admin" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/spec/sanitations.md b/docs/spec/sanitations.md index 63ddf5d..aa6a66f 100644 --- a/docs/spec/sanitations.md +++ b/docs/spec/sanitations.md @@ -1,24 +1,46 @@ -_Author_: \ -_Created_: \ -_Updated_: \ +_Author_: @LinukaAr +_Created_: 20-06-2025 \ +_Updated_: 20-06-2025 \ _Edition_: Swan Lake # Sanitation for OpenAPI specification This document records the sanitation done on top of the official OpenAPI specification from Zoom Scheduler. -The OpenAPI specification is obtained from (TODO: Add source link). +The OpenAPI specification is obtained from the official Zoom API documentation. These changes are done in order to improve the overall usability, and as workarounds for some known language limitations. -[//]: # (TODO: Add sanitation details) -1. -2. -3. +## Sanitization Details + +1. **Security Scheme Update**: Changed authentication mechanism from API key to Bearer token + - **Before**: Used `openapi_authorization` with `apiKey` type in header + ```json + "openapi_authorization" : { + "type" : "apiKey", + "name" : "Authorization", + "in" : "header", + "x-ballerina-name" : "authorization" + } + ``` + - **After**: Updated to `bearer_token` with `http` type and `bearer` scheme + ```json + "bearer_token" : { + "type" : "http", + "scheme" : "bearer" + } + ``` + - **Reason**: The original API key authentication method was not suitable for OAuth 2.0 based authentication that Zoom uses. Bearer token authentication provides better security and aligns with Zoom's OAuth 2.0 implementation, allowing for proper token-based authorization. + +2. **Security References Update**: Updated all security references across endpoints + - **Before**: Referenced `openapi_authorization: []` in endpoint security + - **After**: Changed all references to `bearer_token: []` to maintain consistency with the new security scheme + - **Reason**: Updated to maintain consistency with the new bearer token security scheme. This ensures all endpoints use the correct authentication mechanism and prevents authentication errors when the client is generated. + ## OpenAPI cli command The following command was used to generate the Ballerina client from the OpenAPI specification. The command should be executed from the repository root directory. ```bash -# TODO: Add OpenAPI CLI command used to generate the client +bal openapi -i docs/spec/openapi.json --mode client --license docs/license.txt -o ballerina ``` -Note: The license year is hardcoded to 2024, change if necessary. +Note: The license year is hardcoded to 2025, change if necessary. diff --git a/gradle.properties b/gradle.properties index e0fa520..6a06b19 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,5 +3,5 @@ group=io.ballerina.lib version=1.0.0-SNAPSHOT releasePluginVersion=2.8.0 -ballerinaGradlePluginVersion=2.2.4 -ballerinaLangVersion=2201.12.0 +ballerinaGradlePluginVersion=2.3.0 +ballerinaLangVersion=2201.12.7