nylas 6.3.0 → 6.5.0
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.
- checksums.yaml +4 -4
- data/lib/nylas/client.rb +7 -0
- data/lib/nylas/errors.rb +6 -4
- data/lib/nylas/handler/http_client.rb +65 -17
- data/lib/nylas/resources/calendars.rb +3 -1
- data/lib/nylas/resources/events.rb +3 -1
- data/lib/nylas/resources/messages.rb +23 -0
- data/lib/nylas/resources/notetakers.rb +142 -0
- data/lib/nylas/resources/webhooks.rb +1 -0
- data/lib/nylas/version.rb +1 -1
- data/lib/nylas.rb +2 -15
- metadata +31 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9529fffa30430e822edf113d38aa1a179f0995b29d2bec8c3ac5f9a26d4d8c7
|
4
|
+
data.tar.gz: 8710b98962a46bef277461df24f5e64dedd9bdbe7949838b2b3d8aab38b36f10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20e35b192df7f3dfaf0d50065556d3ef0c19e959504dc124ec3bd2a6f657ffebb7a61b4808517494b2d79d4ceccdd8ce88e45d49109c142ad366592481a67b56
|
7
|
+
data.tar.gz: d957251f63c3c8aa8b90adde51ba2ea7fe52be3b08ca8017e1b91a22c4e42c4d428a720c1b3a18191d1861d2bf379ebd93e481b30547ffbe4ce8f99578e85fb1
|
data/lib/nylas/client.rb
CHANGED
@@ -8,6 +8,7 @@ require_relative "resources/auth"
|
|
8
8
|
require_relative "resources/webhooks"
|
9
9
|
require_relative "resources/applications"
|
10
10
|
require_relative "resources/folders"
|
11
|
+
require_relative "resources/notetakers"
|
11
12
|
require_relative "resources/scheduler"
|
12
13
|
|
13
14
|
module Nylas
|
@@ -124,5 +125,11 @@ module Nylas
|
|
124
125
|
def scheduler
|
125
126
|
Scheduler.new(self)
|
126
127
|
end
|
128
|
+
|
129
|
+
# The Notetaker resources for your Nylas application.
|
130
|
+
# @return [Nylas::Notetakers] Notetaker resources for your Nylas application.
|
131
|
+
def notetakers
|
132
|
+
Notetakers.new(self)
|
133
|
+
end
|
127
134
|
end
|
128
135
|
end
|
data/lib/nylas/errors.rb
CHANGED
@@ -14,7 +14,7 @@ module Nylas
|
|
14
14
|
|
15
15
|
# Error class representing a failed response from the Nylas API.
|
16
16
|
class NylasApiError < AbstractNylasApiError
|
17
|
-
attr_accessor :type, :request_id, :provider_error, :status_code
|
17
|
+
attr_accessor :type, :request_id, :provider_error, :status_code, :headers
|
18
18
|
|
19
19
|
# Initializes an error and assigns the given attributes to it.
|
20
20
|
#
|
@@ -23,24 +23,26 @@ module Nylas
|
|
23
23
|
# @param status_code [Integer] Error status code.
|
24
24
|
# @param provider_error [Hash, nil] The error from the provider.
|
25
25
|
# @param request_id [Hash, nil] The ID of the request.
|
26
|
-
def initialize(type, message, status_code, provider_error = nil, request_id = nil)
|
26
|
+
def initialize(type, message, status_code, provider_error = nil, request_id = nil, headers = nil)
|
27
27
|
super(message)
|
28
28
|
self.type = type
|
29
29
|
self.status_code = status_code
|
30
30
|
self.provider_error = provider_error
|
31
31
|
self.request_id = request_id
|
32
|
+
self.headers = headers
|
32
33
|
end
|
33
34
|
|
34
35
|
# Parses the error response.
|
35
36
|
#
|
36
37
|
# @param response [Hash] Response from the Nylas API.
|
37
38
|
# @param status_code [Integer] Error status code.
|
38
|
-
def self.parse_error_response(response, status_code)
|
39
|
+
def self.parse_error_response(response, status_code, headers = nil)
|
39
40
|
new(
|
40
41
|
response["type"],
|
41
42
|
response["message"],
|
42
43
|
status_code,
|
43
|
-
response["provider_error"]
|
44
|
+
response["provider_error"],
|
45
|
+
headers
|
44
46
|
)
|
45
47
|
end
|
46
48
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "httparty"
|
4
|
+
require "net/http"
|
4
5
|
|
5
6
|
require_relative "../errors"
|
6
7
|
require_relative "../version"
|
@@ -34,18 +35,18 @@ module Nylas
|
|
34
35
|
request = build_request(method: method, path: path, headers: headers,
|
35
36
|
query: query, payload: payload, api_key: api_key, timeout: timeout)
|
36
37
|
begin
|
37
|
-
|
38
|
+
httparty_execute(**request) do |response, _request, result|
|
38
39
|
content_type = nil
|
39
|
-
if response.headers && response.headers[
|
40
|
-
content_type = response.headers[
|
40
|
+
if response.headers && response.headers["content-type"]
|
41
|
+
content_type = response.headers["content-type"].downcase
|
41
42
|
end
|
42
43
|
|
43
|
-
parsed_response = parse_json_evaluate_error(result.code.to_i, response, path, content_type)
|
44
|
+
parsed_response = parse_json_evaluate_error(result.code.to_i, response.body, path, content_type)
|
44
45
|
# Include headers in the response
|
45
46
|
parsed_response[:headers] = response.headers unless parsed_response.nil?
|
46
47
|
parsed_response
|
47
48
|
end
|
48
|
-
rescue
|
49
|
+
rescue Net::OpenTimeout, Net::ReadTimeout
|
49
50
|
raise Nylas::NylasSdkTimeoutError.new(request[:path], timeout)
|
50
51
|
end
|
51
52
|
end
|
@@ -97,11 +98,17 @@ module Nylas
|
|
97
98
|
)
|
98
99
|
url = build_url(path, query)
|
99
100
|
resulting_headers = default_headers.merge(headers).merge(auth_header(api_key))
|
100
|
-
|
101
|
+
|
102
|
+
# Check for multipart flag using both string and symbol keys for backwards compatibility
|
103
|
+
is_multipart = !payload.nil? && (payload["multipart"] || payload[:multipart])
|
104
|
+
|
105
|
+
if !payload.nil? && !is_multipart
|
101
106
|
payload = payload&.to_json
|
102
107
|
resulting_headers["Content-type"] = "application/json"
|
103
|
-
elsif
|
108
|
+
elsif is_multipart
|
109
|
+
# Remove multipart flag from both possible key types
|
104
110
|
payload.delete("multipart")
|
111
|
+
payload.delete(:multipart)
|
105
112
|
end
|
106
113
|
|
107
114
|
{ method: method, url: url, payload: payload, headers: resulting_headers, timeout: timeout }
|
@@ -119,23 +126,59 @@ module Nylas
|
|
119
126
|
def parse_response(response)
|
120
127
|
return response if response.is_a?(Enumerable)
|
121
128
|
|
122
|
-
Yajl::Parser.new(symbolize_names: true).parse(response)
|
129
|
+
Yajl::Parser.new(symbolize_names: true).parse(response) || raise(Nylas::JsonParseError)
|
123
130
|
rescue Yajl::ParseError
|
124
131
|
raise Nylas::JsonParseError
|
125
132
|
end
|
126
133
|
|
127
134
|
private
|
128
135
|
|
129
|
-
# Sends a request to the Nylas REST API.
|
136
|
+
# Sends a request to the Nylas REST API using HTTParty.
|
130
137
|
#
|
131
138
|
# @param method [Symbol] HTTP method for the API call. Either :get, :post, :delete, or :patch.
|
132
139
|
# @param url [String] URL for the API call.
|
133
140
|
# @param headers [Hash] HTTP headers to include in the payload.
|
134
141
|
# @param payload [String, Hash] Body to send with the request.
|
135
142
|
# @param timeout [Hash] Timeout value to send with the request.
|
136
|
-
def
|
137
|
-
|
138
|
-
|
143
|
+
def httparty_execute(method:, url:, headers:, payload:, timeout:)
|
144
|
+
options = {
|
145
|
+
headers: headers,
|
146
|
+
timeout: timeout
|
147
|
+
}
|
148
|
+
|
149
|
+
# Handle multipart uploads
|
150
|
+
if payload.is_a?(Hash) && file_upload?(payload)
|
151
|
+
options[:multipart] = true
|
152
|
+
options[:body] = payload
|
153
|
+
elsif payload
|
154
|
+
options[:body] = payload
|
155
|
+
end
|
156
|
+
|
157
|
+
response = HTTParty.send(method, url, options)
|
158
|
+
|
159
|
+
# Create a compatible response object that mimics RestClient::Response
|
160
|
+
result = create_response_wrapper(response)
|
161
|
+
|
162
|
+
# Call the block with the response in the same format as rest-client
|
163
|
+
if block_given?
|
164
|
+
yield response, nil, result
|
165
|
+
else
|
166
|
+
response
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Create a response wrapper that mimics RestClient::Response.code behavior
|
171
|
+
def create_response_wrapper(response)
|
172
|
+
OpenStruct.new(code: response.code)
|
173
|
+
end
|
174
|
+
|
175
|
+
# Check if payload contains file uploads
|
176
|
+
def file_upload?(payload)
|
177
|
+
return false unless payload.is_a?(Hash)
|
178
|
+
|
179
|
+
payload.values.any? do |value|
|
180
|
+
value.respond_to?(:read) || (value.is_a?(File) && !value.closed?)
|
181
|
+
end
|
139
182
|
end
|
140
183
|
|
141
184
|
def setup_http(path, timeout, headers, query, api_key)
|
@@ -191,22 +234,26 @@ module Nylas
|
|
191
234
|
def error_hash_to_exception(response, status_code, path)
|
192
235
|
return if !response || !response.key?(:error)
|
193
236
|
|
237
|
+
# Safely get headers without risking KeyError
|
238
|
+
headers = response.key?(:headers) ? response[:headers] : nil
|
239
|
+
|
194
240
|
if %W[#{api_uri}/v3/connect/token #{api_uri}/v3/connect/revoke].include?(path)
|
195
241
|
NylasOAuthError.new(response[:error], response[:error_description], response[:error_uri],
|
196
242
|
response[:error_code], status_code)
|
197
243
|
else
|
198
|
-
throw_error(response, status_code)
|
244
|
+
throw_error(response, status_code, headers)
|
199
245
|
end
|
200
246
|
end
|
201
247
|
|
202
|
-
def throw_error(response, status_code)
|
248
|
+
def throw_error(response, status_code, headers = nil)
|
203
249
|
error_obj = response[:error]
|
204
250
|
|
205
251
|
# If `error_obj` is just a string, turn it into a hash with default keys.
|
206
252
|
if error_obj.is_a?(String)
|
207
253
|
error_obj = {
|
208
254
|
type: "NylasApiError",
|
209
|
-
message: error_obj
|
255
|
+
message: error_obj,
|
256
|
+
headers: headers
|
210
257
|
}
|
211
258
|
end
|
212
259
|
|
@@ -217,7 +264,8 @@ module Nylas
|
|
217
264
|
error_obj[:message],
|
218
265
|
status_code,
|
219
266
|
provider_error,
|
220
|
-
response[:request_id]
|
267
|
+
response[:request_id],
|
268
|
+
headers
|
221
269
|
)
|
222
270
|
end
|
223
271
|
|
@@ -39,6 +39,7 @@ module Nylas
|
|
39
39
|
#
|
40
40
|
# @param identifier [String] Grant ID or email account in which to create the object.
|
41
41
|
# @param request_body [Hash] The values to create the calendar with.
|
42
|
+
# This can include a `notetaker` object with settings and calendar sync rules for the Notetaker bot.
|
42
43
|
# @return [Array(Hash, String)] The created calendar and API Request ID.
|
43
44
|
def create(identifier:, request_body:)
|
44
45
|
post(
|
@@ -52,7 +53,8 @@ module Nylas
|
|
52
53
|
# @param identifier [String] Grant ID or email account in which to update an object.
|
53
54
|
# @param calendar_id [String] The id of the calendar to update.
|
54
55
|
# Use "primary" to refer to the primary calendar associated with grant.
|
55
|
-
# @param request_body [Hash] The values to update the calendar with
|
56
|
+
# @param request_body [Hash] The values to update the calendar with.
|
57
|
+
# This can include a `notetaker` object with settings and calendar sync rules for the Notetaker bot.
|
56
58
|
# @return [Array(Hash, String)] The updated calendar and API Request ID.
|
57
59
|
def update(identifier:, calendar_id:, request_body:)
|
58
60
|
put(
|
@@ -40,6 +40,7 @@ module Nylas
|
|
40
40
|
#
|
41
41
|
# @param identifier [String] Grant ID or email account in which to create the object.
|
42
42
|
# @param request_body [Hash] The values to create the event with.
|
43
|
+
# This can include a `notetaker` object with settings for the Notetaker bot.
|
43
44
|
# @param query_params [Hash] The query parameters to include in the request.
|
44
45
|
# @return [Array(Hash, String)] The created event and API Request ID.
|
45
46
|
def create(identifier:, request_body:, query_params:)
|
@@ -54,7 +55,8 @@ module Nylas
|
|
54
55
|
#
|
55
56
|
# @param identifier [String] Grant ID or email account in which to update an object.
|
56
57
|
# @param event_id [String] The id of the event to update.
|
57
|
-
# @param request_body [Hash] The values to update the event with
|
58
|
+
# @param request_body [Hash] The values to update the event with.
|
59
|
+
# This can include a `notetaker` object with settings for the Notetaker bot.
|
58
60
|
# @param query_params [Hash] The query parameters to include in the request
|
59
61
|
# @return [Array(Hash, String)] The updated event and API Request ID.
|
60
62
|
def update(identifier:, event_id:, request_body:, query_params:)
|
@@ -6,6 +6,19 @@ require_relative "../handler/api_operations"
|
|
6
6
|
require_relative "../utils/file_utils"
|
7
7
|
|
8
8
|
module Nylas
|
9
|
+
# Module representing the possible 'fields' values for Messages API requests.
|
10
|
+
# @see https://developer.nylas.com/docs/api/messages#get-/v3/grants/-identifier-/messages
|
11
|
+
module MessageFields
|
12
|
+
# Return the standard message payload (default)
|
13
|
+
STANDARD = "standard"
|
14
|
+
# Return messages and their custom headers
|
15
|
+
INCLUDE_HEADERS = "include_headers"
|
16
|
+
# Return messages and their tracking settings
|
17
|
+
INCLUDE_TRACKING_OPTIONS = "include_tracking_options"
|
18
|
+
# Return the grant_id, object, id, and raw_mime fields only
|
19
|
+
RAW_MIME = "raw_mime"
|
20
|
+
end
|
21
|
+
|
9
22
|
# Nylas Messages API
|
10
23
|
class Messages < Resource
|
11
24
|
include ApiOperations::Get
|
@@ -26,6 +39,11 @@ module Nylas
|
|
26
39
|
#
|
27
40
|
# @param identifier [String] Grant ID or email account to query.
|
28
41
|
# @param query_params [Hash, nil] Query params to pass to the request.
|
42
|
+
# You can use the fields parameter to specify which data to return:
|
43
|
+
# - MessageFields::STANDARD (default): Returns the standard message payload
|
44
|
+
# - MessageFields::INCLUDE_HEADERS: Returns messages and their custom headers
|
45
|
+
# - MessageFields::INCLUDE_TRACKING_OPTIONS: Returns messages and their tracking settings
|
46
|
+
# - MessageFields::RAW_MIME: Returns the grant_id, object, id, and raw_mime fields only
|
29
47
|
# @return [Array(Array(Hash), String, String)] The list of messages, API Request ID, and next cursor.
|
30
48
|
def list(identifier:, query_params: nil)
|
31
49
|
get_list(
|
@@ -39,6 +57,11 @@ module Nylas
|
|
39
57
|
# @param identifier [String] Grant ID or email account to query.
|
40
58
|
# @param message_id [String] The id of the message to return.
|
41
59
|
# @param query_params [Hash, nil] Query params to pass to the request.
|
60
|
+
# You can use the fields parameter to specify which data to return:
|
61
|
+
# - MessageFields::STANDARD (default): Returns the standard message payload
|
62
|
+
# - MessageFields::INCLUDE_HEADERS: Returns messages and their custom headers
|
63
|
+
# - MessageFields::INCLUDE_TRACKING_OPTIONS: Returns messages and their tracking settings
|
64
|
+
# - MessageFields::RAW_MIME: Returns the grant_id, object, id, and raw_mime fields only
|
42
65
|
# @return [Array(Hash, String)] The message and API request ID.
|
43
66
|
def find(identifier:, message_id:, query_params: nil)
|
44
67
|
get(
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "resource"
|
4
|
+
require_relative "../handler/api_operations"
|
5
|
+
|
6
|
+
module Nylas
|
7
|
+
# Nylas Notetaker API
|
8
|
+
class Notetakers < Resource
|
9
|
+
include ApiOperations::Get
|
10
|
+
include ApiOperations::Post
|
11
|
+
include ApiOperations::Put
|
12
|
+
include ApiOperations::Delete
|
13
|
+
include ApiOperations::Patch
|
14
|
+
|
15
|
+
# Return all notetakers.
|
16
|
+
#
|
17
|
+
# @param identifier [String, nil] Grant ID or email account to query.
|
18
|
+
# @param query_params [Hash, nil] Query params to pass to the request.
|
19
|
+
# @return [Array(Array(Hash), String, String)] The list of notetakers, API Request ID, and next cursor.
|
20
|
+
def list(identifier: nil, query_params: nil)
|
21
|
+
path = identifier ? "#{api_uri}/v3/grants/#{identifier}/notetakers" : "#{api_uri}/v3/notetakers"
|
22
|
+
|
23
|
+
get_list(
|
24
|
+
path: path,
|
25
|
+
query_params: query_params
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Return a notetaker.
|
30
|
+
#
|
31
|
+
# @param notetaker_id [String] The id of the notetaker to return.
|
32
|
+
# @param identifier [String, nil] Grant ID or email account to query.
|
33
|
+
# @param query_params [Hash, nil] Query params to pass to the request.
|
34
|
+
# @return [Array(Hash, String)] The notetaker and API request ID.
|
35
|
+
def find(notetaker_id:, identifier: nil, query_params: nil)
|
36
|
+
base_path = "#{api_uri}/v3"
|
37
|
+
path = if identifier
|
38
|
+
"#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}"
|
39
|
+
else
|
40
|
+
"#{base_path}/notetakers/#{notetaker_id}"
|
41
|
+
end
|
42
|
+
|
43
|
+
get(
|
44
|
+
path: path,
|
45
|
+
query_params: query_params
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Invite a notetaker to a meeting.
|
50
|
+
#
|
51
|
+
# @param request_body [Hash] The values to create the notetaker with.
|
52
|
+
# @param identifier [String, nil] Grant ID or email account in which to create the object.
|
53
|
+
# @return [Array(Hash, String)] The created notetaker and API Request ID.
|
54
|
+
def create(request_body:, identifier: nil)
|
55
|
+
path = identifier ? "#{api_uri}/v3/grants/#{identifier}/notetakers" : "#{api_uri}/v3/notetakers"
|
56
|
+
|
57
|
+
post(
|
58
|
+
path: path,
|
59
|
+
request_body: request_body
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
# Update a scheduled notetaker.
|
64
|
+
#
|
65
|
+
# @param notetaker_id [String] The id of the notetaker to update.
|
66
|
+
# @param request_body [Hash] The values to update the notetaker with
|
67
|
+
# @param identifier [String, nil] Grant ID or email account in which to update an object.
|
68
|
+
# @return [Array(Hash, String)] The updated notetaker and API Request ID.
|
69
|
+
def update(notetaker_id:, request_body:, identifier: nil)
|
70
|
+
base_path = "#{api_uri}/v3"
|
71
|
+
path = if identifier
|
72
|
+
"#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}"
|
73
|
+
else
|
74
|
+
"#{base_path}/notetakers/#{notetaker_id}"
|
75
|
+
end
|
76
|
+
|
77
|
+
patch(
|
78
|
+
path: path,
|
79
|
+
request_body: request_body
|
80
|
+
)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Download notetaker media.
|
84
|
+
#
|
85
|
+
# @param notetaker_id [String] The id of the notetaker to download media from.
|
86
|
+
# @param identifier [String, nil] Grant ID or email account to query.
|
87
|
+
# @param query_params [Hash, nil] Query params to pass to the request.
|
88
|
+
# @return [Array(Hash, String)] The media data and API request ID.
|
89
|
+
def download_media(notetaker_id:, identifier: nil, query_params: nil)
|
90
|
+
base_path = "#{api_uri}/v3"
|
91
|
+
path = if identifier
|
92
|
+
"#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}/media"
|
93
|
+
else
|
94
|
+
"#{base_path}/notetakers/#{notetaker_id}/media"
|
95
|
+
end
|
96
|
+
|
97
|
+
get(
|
98
|
+
path: path,
|
99
|
+
query_params: query_params
|
100
|
+
)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Remove a notetaker from a meeting.
|
104
|
+
#
|
105
|
+
# @param notetaker_id [String] The id of the notetaker to remove.
|
106
|
+
# @param identifier [String, nil] Grant ID or email account to query.
|
107
|
+
# @return [Array(Hash, String)] The response data and API request ID.
|
108
|
+
def leave(notetaker_id:, identifier: nil)
|
109
|
+
base_path = "#{api_uri}/v3"
|
110
|
+
path = if identifier
|
111
|
+
"#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}/leave"
|
112
|
+
else
|
113
|
+
"#{base_path}/notetakers/#{notetaker_id}/leave"
|
114
|
+
end
|
115
|
+
|
116
|
+
post(
|
117
|
+
path: path,
|
118
|
+
request_body: {}
|
119
|
+
)
|
120
|
+
end
|
121
|
+
|
122
|
+
# Cancel a scheduled notetaker.
|
123
|
+
#
|
124
|
+
# @param notetaker_id [String] The id of the notetaker to cancel.
|
125
|
+
# @param identifier [String, nil] Grant ID or email account from which to delete an object.
|
126
|
+
# @return [Array(TrueClass, String)] True and the API Request ID for the cancel operation.
|
127
|
+
def cancel(notetaker_id:, identifier: nil)
|
128
|
+
base_path = "#{api_uri}/v3"
|
129
|
+
path = if identifier
|
130
|
+
"#{base_path}/grants/#{identifier}/notetakers/#{notetaker_id}/cancel"
|
131
|
+
else
|
132
|
+
"#{base_path}/notetakers/#{notetaker_id}/cancel"
|
133
|
+
end
|
134
|
+
|
135
|
+
_, request_id = delete(
|
136
|
+
path: path
|
137
|
+
)
|
138
|
+
|
139
|
+
[true, request_id]
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
@@ -22,6 +22,7 @@ module Nylas
|
|
22
22
|
MESSAGE_CREATED = "message.created"
|
23
23
|
MESSAGE_UPDATED = "message.updated"
|
24
24
|
MESSAGE_OPENED = "message.opened"
|
25
|
+
MESSAGE_BOUNCE_DETECTED = "message.bounce_detected"
|
25
26
|
MESSAGE_LINK_CLICKED = "message.link_clicked"
|
26
27
|
THREAD_REPLIED = "thread.replied"
|
27
28
|
FOLDER_CREATED = "folder.created"
|
data/lib/nylas/version.rb
CHANGED
data/lib/nylas.rb
CHANGED
@@ -1,21 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "json"
|
4
|
-
require "
|
5
|
-
|
6
|
-
# BUGFIX
|
7
|
-
# See https://github.com/sparklemotion/http-cookie/issues/27
|
8
|
-
# and https://github.com/sparklemotion/http-cookie/issues/6
|
9
|
-
#
|
10
|
-
# CookieJar uses unsafe class caching for dynamically loading cookie jars.
|
11
|
-
# If two rest-client instances are instantiated at the same time (in threads), non-deterministic
|
12
|
-
# behaviour can occur whereby the Hash cookie jar isn't properly loaded and cached.
|
13
|
-
# Forcing an instantiation of the jar onload will force the CookieJar to load before the system has
|
14
|
-
# a chance to spawn any threads.
|
15
|
-
# Note that this should technically be fixed in rest-client itself, however that library appears to
|
16
|
-
# be stagnant so we're forced to fix it here.
|
17
|
-
# This object should get GC'd as it's not referenced by anything.
|
18
|
-
HTTP::CookieJar.new
|
4
|
+
require "httparty"
|
19
5
|
|
20
6
|
require "ostruct"
|
21
7
|
require "forwardable"
|
@@ -39,6 +25,7 @@ require_relative "nylas/resources/events"
|
|
39
25
|
require_relative "nylas/resources/folders"
|
40
26
|
require_relative "nylas/resources/grants"
|
41
27
|
require_relative "nylas/resources/messages"
|
28
|
+
require_relative "nylas/resources/notetakers"
|
42
29
|
require_relative "nylas/resources/smart_compose"
|
43
30
|
require_relative "nylas/resources/threads"
|
44
31
|
require_relative "nylas/resources/redirect_uris"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nylas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nylas, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httparty
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.21'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.21'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: mime-types
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,26 +72,6 @@ dependencies:
|
|
58
72
|
- - "~>"
|
59
73
|
- !ruby/object:Gem::Version
|
60
74
|
version: '0.6'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: rest-client
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: 2.0.0
|
68
|
-
- - "<"
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '3.0'
|
71
|
-
type: :runtime
|
72
|
-
prerelease: false
|
73
|
-
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 2.0.0
|
78
|
-
- - "<"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: '3.0'
|
81
75
|
- !ruby/object:Gem::Dependency
|
82
76
|
name: yajl-ruby
|
83
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,6 +148,20 @@ dependencies:
|
|
154
148
|
- - "~>"
|
155
149
|
- !ruby/object:Gem::Version
|
156
150
|
version: '2.22'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: rubocop-capybara
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '2.20'
|
158
|
+
type: :development
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - "~>"
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '2.20'
|
157
165
|
- !ruby/object:Gem::Dependency
|
158
166
|
name: rspec
|
159
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -277,6 +285,7 @@ files:
|
|
277
285
|
- lib/nylas/resources/folders.rb
|
278
286
|
- lib/nylas/resources/grants.rb
|
279
287
|
- lib/nylas/resources/messages.rb
|
288
|
+
- lib/nylas/resources/notetakers.rb
|
280
289
|
- lib/nylas/resources/redirect_uris.rb
|
281
290
|
- lib/nylas/resources/resource.rb
|
282
291
|
- lib/nylas/resources/scheduler.rb
|