nylas 8.0.2 → 8.0.4

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.
@@ -166,6 +166,9 @@ class Auth extends resource_js_1.Resource {
166
166
  if (config.smtpRequired) {
167
167
  url.searchParams.set('options', 'smtp_required');
168
168
  }
169
+ if (config.credentialId) {
170
+ url.searchParams.set('credential_id', config.credentialId);
171
+ }
169
172
  return url;
170
173
  }
171
174
  hashPKCESecret(secret) {
@@ -44,7 +44,7 @@ class Credentials extends resource_js_1.Resource {
44
44
  * @return The updated credential
45
45
  */
46
46
  update({ provider, credentialsId, requestBody, overrides, }) {
47
- return super._update({
47
+ return super._updatePatch({
48
48
  path: (0, utils_js_1.makePathParams)('/v3/connectors/{provider}/creds/{credentialsId}', {
49
49
  provider,
50
50
  credentialsId,
@@ -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.2';
5
+ exports.SDK_VERSION = '8.0.4';
@@ -163,6 +163,9 @@ export class Auth extends Resource {
163
163
  if (config.smtpRequired) {
164
164
  url.searchParams.set('options', 'smtp_required');
165
165
  }
166
+ if (config.credentialId) {
167
+ url.searchParams.set('credential_id', config.credentialId);
168
+ }
166
169
  return url;
167
170
  }
168
171
  hashPKCESecret(secret) {
@@ -41,7 +41,7 @@ export class Credentials extends Resource {
41
41
  * @return The updated credential
42
42
  */
43
43
  update({ provider, credentialsId, requestBody, overrides, }) {
44
- return super._update({
44
+ return super._updatePatch({
45
45
  path: makePathParams('/v3/connectors/{provider}/creds/{credentialsId}', {
46
46
  provider,
47
47
  credentialsId,
@@ -1,2 +1,2 @@
1
1
  // This file is generated by scripts/exportVersion.js
2
- export const SDK_VERSION = '8.0.2';
2
+ export const SDK_VERSION = '8.0.4';
@@ -55,6 +55,13 @@ export interface URLForAuthenticationConfig {
55
55
  * send failures from missing SMTP configuration.
56
56
  */
57
57
  smtpRequired?: boolean;
58
+ /**
59
+ * Optional credential ID to use for hosted authentication.
60
+ * Allows selecting a specific set of provider credentials when multiple are configured under a connector.
61
+ * If not specified, the connector's default credential will be used.
62
+ * This is supported for standard OAuth flows (response_type=code).
63
+ */
64
+ credentialId?: string;
58
65
  }
59
66
  /**
60
67
  * Configuration for generating a URL for admin consent authentication for Microsoft.
@@ -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.
@@ -16,6 +16,11 @@ export interface Connector {
16
16
  * Default scopes for the connector
17
17
  */
18
18
  scope?: string[];
19
+ /**
20
+ * The active credential ID for the connector.
21
+ * This is the default credential used for authentication when no specific credential is specified.
22
+ */
23
+ activeCredentialId?: string;
19
24
  }
20
25
  /**
21
26
  * Interface representing a Google connector creation request.
@@ -115,6 +120,11 @@ export interface UpdateConnectorRequest {
115
120
  * The OAuth scopes
116
121
  */
117
122
  scope?: string[];
123
+ /**
124
+ * The active credential ID to set as the default for this connector.
125
+ * When specified, this credential will be used for authentication when no specific credential is provided.
126
+ */
127
+ activeCredentialId?: string;
118
128
  }
119
129
  /**
120
130
  * Interface of the query parameters for listing connectors.
@@ -55,6 +55,11 @@ export interface Grant {
55
55
  * Settings required by the provider that were sent as part of the OAuth request.
56
56
  */
57
57
  settings?: Record<string, unknown>;
58
+ /**
59
+ * The credential ID that was used to create this grant.
60
+ * This links the grant to a specific set of provider credentials.
61
+ */
62
+ credentialId?: string;
58
63
  }
59
64
  /**
60
65
  * Interface representing a request to create a grant.
@@ -66,8 +71,16 @@ export interface CreateGrantRequest {
66
71
  provider: Provider;
67
72
  /**
68
73
  * Settings required by provider.
69
- */
70
- settings: Record<string, unknown>;
74
+ * Can include 'credentialId' to specify which credential to use for authentication.
75
+ * If not specified, the connector's default credential will be used.
76
+ */
77
+ settings: Record<string, unknown> & {
78
+ /**
79
+ * Optional credential ID to use for this authentication.
80
+ * Allows selecting a specific set of provider credentials when multiple are configured.
81
+ */
82
+ credentialId?: string;
83
+ };
71
84
  /**
72
85
  * Optional state value to return to developer's website after authentication flow is completed.
73
86
  */
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "8.0.2";
1
+ export declare const SDK_VERSION = "8.0.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nylas",
3
- "version": "8.0.2",
3
+ "version": "8.0.4",
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",