nylas 8.0.3 → 8.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SchedulerAvailability = void 0;
4
+ const resource_js_1 = require("./resource.js");
5
+ const utils_js_1 = require("../utils.js");
6
+ class SchedulerAvailability extends resource_js_1.Resource {
7
+ /**
8
+ * Get availability for a scheduling configuration
9
+ * @return The availability response with time slots
10
+ */
11
+ get({ queryParams, overrides, }) {
12
+ return super._find({
13
+ path: (0, utils_js_1.makePathParams)('/v3/scheduling/availability', {}),
14
+ queryParams,
15
+ overrides,
16
+ });
17
+ }
18
+ }
19
+ exports.SchedulerAvailability = SchedulerAvailability;
@@ -4,11 +4,13 @@ exports.Scheduler = void 0;
4
4
  const configurations_js_1 = require("./configurations.js");
5
5
  const sessions_js_1 = require("./sessions.js");
6
6
  const bookings_js_1 = require("./bookings.js");
7
+ const availability_js_1 = require("./availability.js");
7
8
  class Scheduler {
8
9
  constructor(apiClient) {
9
10
  this.configurations = new configurations_js_1.Configurations(apiClient);
10
11
  this.bookings = new bookings_js_1.Bookings(apiClient);
11
12
  this.sessions = new sessions_js_1.Sessions(apiClient);
13
+ this.availability = new availability_js_1.SchedulerAvailability(apiClient);
12
14
  }
13
15
  }
14
16
  exports.Scheduler = Scheduler;
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
4
  // This file is generated by scripts/exportVersion.js
5
- exports.SDK_VERSION = '8.0.3';
5
+ exports.SDK_VERSION = '8.0.5';
@@ -0,0 +1,15 @@
1
+ import { Resource } from './resource.js';
2
+ import { makePathParams } from '../utils.js';
3
+ export class SchedulerAvailability extends Resource {
4
+ /**
5
+ * Get availability for a scheduling configuration
6
+ * @return The availability response with time slots
7
+ */
8
+ get({ queryParams, overrides, }) {
9
+ return super._find({
10
+ path: makePathParams('/v3/scheduling/availability', {}),
11
+ queryParams,
12
+ overrides,
13
+ });
14
+ }
15
+ }
@@ -1,10 +1,12 @@
1
1
  import { Configurations } from './configurations.js';
2
2
  import { Sessions } from './sessions.js';
3
3
  import { Bookings } from './bookings.js';
4
+ import { SchedulerAvailability } from './availability.js';
4
5
  export class Scheduler {
5
6
  constructor(apiClient) {
6
7
  this.configurations = new Configurations(apiClient);
7
8
  this.bookings = new Bookings(apiClient);
8
9
  this.sessions = new Sessions(apiClient);
10
+ this.availability = new SchedulerAvailability(apiClient);
9
11
  }
10
12
  }
@@ -1,2 +1,2 @@
1
1
  // This file is generated by scripts/exportVersion.js
2
- export const SDK_VERSION = '8.0.3';
2
+ export const SDK_VERSION = '8.0.5';
@@ -118,6 +118,29 @@ export interface MeetingBuffer {
118
118
  */
119
119
  after: number;
120
120
  }
121
+ /**
122
+ * Interface of a participant's availability for a specific date and time range.
123
+ * This can override the open_hours configurations for the specified date.
124
+ */
125
+ export interface SpecificTimeAvailability {
126
+ /**
127
+ * The specific date in YYYY-MM-DD format.
128
+ */
129
+ date: string;
130
+ /**
131
+ * Start time in 24-hour time format. Leading 0's are left off (e.g. "9:00").
132
+ */
133
+ start: string;
134
+ /**
135
+ * End time in 24-hour time format. Leading 0's are left off (e.g. "17:00").
136
+ */
137
+ end: string;
138
+ /**
139
+ * IANA time zone database formatted string (e.g. America/Toronto).
140
+ * @see <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">List of tz database time zones</a>
141
+ */
142
+ timezone?: string;
143
+ }
121
144
  /**
122
145
  * Interface of a participant's open hours.
123
146
  */
@@ -163,6 +186,10 @@ export interface AvailabilityParticipant {
163
186
  * Open hours for this participant. The endpoint searches for free time slots during these open hours.
164
187
  */
165
188
  openHours?: OpenHours[];
189
+ /**
190
+ * Specific availability for this participant that overrides open_hours for the specified dates.
191
+ */
192
+ specificTimeAvailability?: SpecificTimeAvailability[];
166
193
  }
167
194
  /**
168
195
  * Enum representing the method used to determine availability for a meeting.
@@ -424,3 +424,23 @@ export interface FindBookingQueryParams {
424
424
  export type ConfirmBookingQueryParams = FindBookingQueryParams;
425
425
  export type RescheduleBookingQueryParams = FindBookingQueryParams;
426
426
  export type DestroyBookingQueryParams = FindBookingQueryParams;
427
+ export interface SchedulerAvailabilityTimeSlot {
428
+ emails: string[];
429
+ startTime: number;
430
+ endTime: number;
431
+ eventId?: string;
432
+ masterId?: string;
433
+ calendarId?: string;
434
+ }
435
+ export interface SchedulerAvailabilityResponse {
436
+ order?: string[];
437
+ timeSlots: SchedulerAvailabilityTimeSlot[];
438
+ }
439
+ export interface GetSchedulerAvailabilityQueryParams {
440
+ startTime: number;
441
+ endTime: number;
442
+ configurationId?: string;
443
+ slug?: string;
444
+ clientId?: string;
445
+ bookingId?: string;
446
+ }
@@ -0,0 +1,18 @@
1
+ import { Overrides } from '../config.js';
2
+ import { NylasResponse } from '../models/response.js';
3
+ import { SchedulerAvailabilityResponse, GetSchedulerAvailabilityQueryParams } from '../models/scheduler.js';
4
+ import { Resource } from './resource.js';
5
+ /**
6
+ * The parameters for the {@link SchedulerAvailability.get} method
7
+ * @property queryParams The query parameters to include in the request
8
+ */
9
+ export interface GetSchedulerAvailabilityParams {
10
+ queryParams: GetSchedulerAvailabilityQueryParams;
11
+ }
12
+ export declare class SchedulerAvailability extends Resource {
13
+ /**
14
+ * Get availability for a scheduling configuration
15
+ * @return The availability response with time slots
16
+ */
17
+ get({ queryParams, overrides, }: GetSchedulerAvailabilityParams & Overrides): Promise<NylasResponse<SchedulerAvailabilityResponse>>;
18
+ }
@@ -1,10 +1,12 @@
1
1
  import { Configurations } from './configurations.js';
2
2
  import { Sessions } from './sessions.js';
3
3
  import { Bookings } from './bookings.js';
4
+ import { SchedulerAvailability } from './availability.js';
4
5
  import APIClient from '../apiClient.js';
5
6
  export declare class Scheduler {
6
7
  configurations: Configurations;
7
8
  bookings: Bookings;
8
9
  sessions: Sessions;
10
+ availability: SchedulerAvailability;
9
11
  constructor(apiClient: APIClient);
10
12
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "8.0.3";
1
+ export declare const SDK_VERSION = "8.0.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nylas",
3
- "version": "8.0.3",
3
+ "version": "8.0.5",
4
4
  "description": "A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.",
5
5
  "main": "lib/cjs/nylas.js",
6
6
  "types": "lib/types/nylas.d.ts",