nylas 8.0.1 → 8.0.3
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.
- package/lib/cjs/resources/auth.js +6 -0
- package/lib/cjs/resources/credentials.js +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/resources/auth.js +6 -0
- package/lib/esm/resources/credentials.js +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/models/auth.d.ts +13 -0
- package/lib/types/models/connectors.d.ts +10 -0
- package/lib/types/models/grants.d.ts +15 -2
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -163,6 +163,12 @@ class Auth extends resource_js_1.Resource {
|
|
|
163
163
|
if (config.state) {
|
|
164
164
|
url.searchParams.set('state', config.state);
|
|
165
165
|
}
|
|
166
|
+
if (config.smtpRequired) {
|
|
167
|
+
url.searchParams.set('options', 'smtp_required');
|
|
168
|
+
}
|
|
169
|
+
if (config.credentialId) {
|
|
170
|
+
url.searchParams.set('credential_id', config.credentialId);
|
|
171
|
+
}
|
|
166
172
|
return url;
|
|
167
173
|
}
|
|
168
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.
|
|
47
|
+
return super._updatePatch({
|
|
48
48
|
path: (0, utils_js_1.makePathParams)('/v3/connectors/{provider}/creds/{credentialsId}', {
|
|
49
49
|
provider,
|
|
50
50
|
credentialsId,
|
package/lib/cjs/version.js
CHANGED
|
@@ -160,6 +160,12 @@ export class Auth extends Resource {
|
|
|
160
160
|
if (config.state) {
|
|
161
161
|
url.searchParams.set('state', config.state);
|
|
162
162
|
}
|
|
163
|
+
if (config.smtpRequired) {
|
|
164
|
+
url.searchParams.set('options', 'smtp_required');
|
|
165
|
+
}
|
|
166
|
+
if (config.credentialId) {
|
|
167
|
+
url.searchParams.set('credential_id', config.credentialId);
|
|
168
|
+
}
|
|
163
169
|
return url;
|
|
164
170
|
}
|
|
165
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.
|
|
44
|
+
return super._updatePatch({
|
|
45
45
|
path: makePathParams('/v3/connectors/{provider}/creds/{credentialsId}', {
|
|
46
46
|
provider,
|
|
47
47
|
credentialsId,
|
package/lib/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is generated by scripts/exportVersion.js
|
|
2
|
-
export const SDK_VERSION = '8.0.
|
|
2
|
+
export const SDK_VERSION = '8.0.3';
|
|
@@ -49,6 +49,19 @@ export interface URLForAuthenticationConfig {
|
|
|
49
49
|
* If a Grant for the provided email already exists, a Grant's re-auth will automatically be initiated.
|
|
50
50
|
*/
|
|
51
51
|
loginHint?: string;
|
|
52
|
+
/**
|
|
53
|
+
* If set to true, the options=smtp_required parameter is added to the authentication URL.
|
|
54
|
+
* This forces users to provide SMTP settings during IMAP authentication, preventing
|
|
55
|
+
* send failures from missing SMTP configuration.
|
|
56
|
+
*/
|
|
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;
|
|
52
65
|
}
|
|
53
66
|
/**
|
|
54
67
|
* Configuration for generating a URL for admin consent authentication for Microsoft.
|
|
@@ -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
|
-
|
|
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
|
*/
|
package/lib/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "8.0.
|
|
1
|
+
export declare const SDK_VERSION = "8.0.3";
|