nylas 5.11.0 → 5.12.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/api.rb +5 -1
- data/lib/nylas/calendar_collection.rb +28 -22
- data/lib/nylas/message.rb +1 -0
- data/lib/nylas/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e5d0a27634342959eaddf47669543e1140fa7651b4e0a62bc438bfd0cfff4d0
|
4
|
+
data.tar.gz: 18cd209379fc280946c1c5c1d07a5b5b1d430fda3cee0859bc72cc71a7108e60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8ad67acdb82c2e08cc988859bef6205677019619c3abaac63d3157b67d57eb491b5562c83ea80f8851749e028c827aa44e34be8d947de07002f89c2ea3e0a90
|
7
|
+
data.tar.gz: 68511185782d9586bd3530fccd6e3c5e1a8744f6662f5f369040abce1a9c664ec08ae0a2ffeed94c5a086f7fef56369d8cca917e1be85c726a4241cf7b0f19b2
|
data/lib/nylas/api.rb
CHANGED
@@ -35,15 +35,19 @@ module Nylas
|
|
35
35
|
)
|
36
36
|
end
|
37
37
|
|
38
|
-
def authentication_url(redirect_uri:, scopes:, response_type: "code", login_hint: nil, state: nil
|
38
|
+
def authentication_url(redirect_uri:, scopes:, response_type: "code", login_hint: nil, state: nil,
|
39
|
+
provider: nil, redirect_on_error: nil)
|
39
40
|
params = {
|
40
41
|
client_id: app_id,
|
41
42
|
redirect_uri: redirect_uri,
|
42
43
|
response_type: response_type,
|
43
44
|
login_hint: login_hint
|
44
45
|
}
|
46
|
+
|
45
47
|
params[:state] = state if state
|
46
48
|
params[:scopes] = scopes.join(",") if scopes
|
49
|
+
params[:provider] = provider if provider
|
50
|
+
params[:redirect_on_error] = redirect_on_error if redirect_on_error
|
47
51
|
|
48
52
|
"#{api_server}/oauth/authorize?#{URI.encode_www_form(params)}"
|
49
53
|
end
|
@@ -31,18 +31,21 @@ module Nylas
|
|
31
31
|
validate_calendars_or_emails(calendars, emails)
|
32
32
|
validate_open_hours(emails, free_busy, open_hours) unless open_hours.empty?
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
34
|
+
payload = {
|
35
|
+
duration_minutes: duration_minutes,
|
36
|
+
interval_minutes: interval_minutes,
|
37
|
+
start_time: start_time,
|
38
|
+
end_time: end_time,
|
39
|
+
emails: emails,
|
40
|
+
free_busy: free_busy.map(&:to_h),
|
41
|
+
open_hours: open_hours.map(&:to_h),
|
42
|
+
calendars: calendars
|
43
|
+
}
|
44
|
+
payload[:buffer] = buffer if buffer
|
45
|
+
payload[:round_robin] = round_robin if round_robin
|
46
|
+
payload[:event_collection_id] = event_collection_id if event_collection_id
|
47
|
+
|
48
|
+
execute_availability("/calendars/availability", **payload)
|
46
49
|
end
|
47
50
|
|
48
51
|
# Check multiple calendars to find availability for multiple meetings with several participants
|
@@ -68,16 +71,19 @@ module Nylas
|
|
68
71
|
validate_calendars_or_emails(emails, calendars)
|
69
72
|
validate_open_hours(emails, free_busy, open_hours) unless open_hours.empty?
|
70
73
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
74
|
+
payload = {
|
75
|
+
duration_minutes: duration_minutes,
|
76
|
+
interval_minutes: interval_minutes,
|
77
|
+
start_time: start_time,
|
78
|
+
end_time: end_time,
|
79
|
+
emails: emails,
|
80
|
+
free_busy: free_busy.map(&:to_h),
|
81
|
+
open_hours: open_hours.map(&:to_h),
|
82
|
+
calendars: calendars
|
83
|
+
}
|
84
|
+
payload[:buffer] = buffer if buffer
|
85
|
+
|
86
|
+
execute_availability("/calendars/availability/consecutive", **payload)
|
81
87
|
end
|
82
88
|
|
83
89
|
private
|
data/lib/nylas/message.rb
CHANGED
@@ -37,6 +37,7 @@ module Nylas
|
|
37
37
|
attribute :folder, :folder
|
38
38
|
attribute :folder_id, :string
|
39
39
|
attribute :metadata, :hash
|
40
|
+
attribute :reply_to_message_id, :string, read_only: true
|
40
41
|
attribute :job_status_id, :string, read_only: true
|
41
42
|
|
42
43
|
has_n_of_attribute :labels, :label, read_only: true
|
data/lib/nylas/version.rb
CHANGED
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: 5.
|
4
|
+
version: 5.12.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: 2022-07-
|
11
|
+
date: 2022-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -380,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
380
380
|
- !ruby/object:Gem::Version
|
381
381
|
version: '0'
|
382
382
|
requirements: []
|
383
|
-
rubygems_version: 3.3.
|
383
|
+
rubygems_version: 3.3.7
|
384
384
|
signing_key:
|
385
385
|
specification_version: 4
|
386
386
|
summary: Gem for interacting with the Nylas API
|