
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
This Node.js module provides a convenient and fully-typed interface for interacting with the [TimeZest API](https://developer.timezest.com/). It abstracts away the complexities of making HTTP requests, handling pagination, and managing API configurations,
This Node.js module provides a convenient and fully-typed interface for interacting with the TimeZest API. It abstracts away the complexities of making HTTP requests, handling pagination, and managing API configurations, allowing developers to focus on building their applications.
Install the module using npm:
npm install timezest
To use the TimeZest API, you need an API key. Generate one from your TimeZest account under the API Keys section. Use the TimeZestAPI class to configure and interact with the API:
import TimeZestAPI from "./index";
const apiKey = "your-api-key";
const timeZest = new TimeZestAPI(apiKey);
async function fetchAgents() {
try {
const agents = await timeZest.getAgents();
console.log("Agents:", agents);
} catch (error) {
console.error("Error fetching agents:", error);
}
}
fetchAgents();
async function createSchedulingRequest() {
try {
const request = await timeZest.createSchedulingRequest({
appointment_type_id: "12345",
end_user_email: "user@example.com",
end_user_name: "John Doe",
resources: [],
scheduled_agents: [],
selected_start_time: new Date().toISOString(),
selected_time_zone: "UTC",
});
console.log("Created Scheduling Request:", request);
} catch (error) {
console.error("Error creating scheduling request:", error);
}
}
createSchedulingRequest();
The TimeZestAPI supports the following methods for interacting with the TimeZest public API:
// Retrieve all agents
timeZest.getAgents(filter: TQLFilter | string | null = null): Promise<Agent[]>
// Retrieve all appointment types
timeZest.getAppointmentTypes(filter: TQLFilter | string | null = null): Promise<AppointmentType[]>
// Retrieve all resources
timeZest.getResources(filter: TQLFilter | string | null = null): Promise<Resource[]>
// Retreive all scheduling reuests
timeZest.getSchedulingRequests(filter: TQLFilter | string | null = null): Promise<SchedulingRequest[]>
// Retrieve a scheduling request by id
timeZest.getSchedulingRequest(id: string): Promise<SchedulingRequest>
// Create a scheduling request
timeZest.createSchedulingRequest(data: SchedulingRequest): Promise<SchedulingRequest>
// Retrieve all teams
timeZest.getTeams(filter: TQLFilter | string | null = null): Promise<Team[]>
You can filter results using TQL in two ways:
Both styles are supported by all list methods.
import TimeZestAPI, { TQL } from "timezest";
const timeZest = new TimeZestAPI("your-api-key");
// 1) Type-safe builder with autocomplete
const teams = await timeZest.getTeams(
TQL.forTeams().filter("internal_name").eq("Tier1")
);
// You can also chain logical operators
const scheduledRequests = await timeZest.getSchedulingRequests(
TQL.forSchedulingRequests()
.filter("status").eq("scheduled")
.and("end_user_email").like("@example.com")
);
// 2) Raw TQL string
const teamsByString = await timeZest.getTeams("team.internal_name EQ Tier1");
For more about TQL syntax, see the TimeZest TQL documentation: https://developer.timezest.com/tql/.
For endpoints that return paginated data, the library automatically handles pagination:
async function fetchAllResources() {
try {
const resources = await timeZest.getResources();
console.log("Resources:", resources);
} catch (error) {
console.error("Error fetching resources:", error);
}
}
fetchAllResources();
The TimeZestAPI class includes intelligent retry logic optimized for TimeZest's API limits. TimeZest enforces a maximum of 180 requests in any 60-second sliding window.
When a request fails due to rate limiting (429 Too Many Requests), the library automatically retries with an optimized strategy:
Retry-After header from 429 responses when provided by the APIYou can configure the retry behavior using the following options when initializing the class:
maxRetryTimeMs: The maximum amount of time (in milliseconds) to spend retrying a request. Defaults to 5 minutes (300,000ms).maxRetryDelayMs: The maximum delay (in milliseconds) between individual retry attempts. Defaults to 60 seconds (60,000ms).const options = {
maxRetryTimeMs: 10 * 60 * 1000, // Retry for up to 10 minutes
maxRetryDelayMs: 60 * 1000, // Max 60 seconds between retries
logLevel: "debug", // See detailed retry information in logs
};
const timeZest = new TimeZestAPI("your-api-key", options);
If you hit a rate limit without a Retry-After header, the retry delays will be:
The jitter ensures that if multiple clients hit the rate limit at the same time, they won't all retry simultaneously.
The TimeZestAPI class includes built-in logging. By default, it uses console for logging. You can configure the log level using the logLevel option when initializing the class. Supported log levels include silent, error, warn, info, and debug.
You can also pass a custom logger by providing a logger object with methods corresponding to the log levels (e.g., info, error, etc.).
Example:
const customLogger = {
info: (message: string, data?: any) => {
/* custom implementation */
},
error: (message: string, data?: any) => {
/* custom implementation */
},
// ...other log levels
};
const options = {
logger: customLogger,
logLevel: "info",
};
const timeZest = new TimeZestAPI(apiKey, options);
timeZest.log("info", "This is an informational message");
timeZest.log("error", "This is an error message");
For detailed API documentation, visit the TimeZest API Documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
This Node.js module provides a convenient and fully-typed interface for interacting with the [TimeZest API](https://developer.timezest.com/). It abstracts away the complexities of making HTTP requests, handling pagination, and managing API configurations,
The npm package timezest receives a total of 11 weekly downloads. As such, timezest popularity was classified as not popular.
We found that timezest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.