nylas 5.11.0 → 5.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f59eea98b61cf99f73b87277cf360310f9fa8584a4164297d58faa2ef2575cd
4
- data.tar.gz: 1afd54d9481f76af4330d8e12a2f90b8fe667628247e455453211425b198f470
3
+ metadata.gz: 3e5d0a27634342959eaddf47669543e1140fa7651b4e0a62bc438bfd0cfff4d0
4
+ data.tar.gz: 18cd209379fc280946c1c5c1d07a5b5b1d430fda3cee0859bc72cc71a7108e60
5
5
  SHA512:
6
- metadata.gz: ebf09713be0037d694e9d43c3aa5b3c3c4a5557296593773bbd792f21f281662ef96fb2079ca34d1325a0c43b4810f0805a80e963de29eef0b0762b805a74581
7
- data.tar.gz: cb2c8c558dd67b36aa446d7b92a91902978b0e41af1f1a24e3629c833817ad3038fa71f2c1c42f0e79f3ab32c8bb02f836fc10f1481eaf0fb9f78ed021fbb44e
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
- execute_availability("/calendars/availability",
35
- duration_minutes: duration_minutes,
36
- interval_minutes: interval_minutes,
37
- start_time: start_time,
38
- end_time: end_time,
39
- emails: emails,
40
- buffer: buffer,
41
- round_robin: round_robin,
42
- event_collection_id: event_collection_id,
43
- free_busy: free_busy.map(&:to_h),
44
- open_hours: open_hours.map(&:to_h),
45
- calendars: calendars)
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
- execute_availability("/calendars/availability/consecutive",
72
- duration_minutes: duration_minutes,
73
- interval_minutes: interval_minutes,
74
- start_time: start_time,
75
- end_time: end_time,
76
- emails: emails,
77
- buffer: buffer,
78
- free_busy: free_busy.map(&:to_h),
79
- open_hours: open_hours.map(&:to_h),
80
- calendars: calendars)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nylas
4
- VERSION = "5.11.0"
4
+ VERSION = "5.12.0"
5
5
  end
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.11.0
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-08 00:00:00.000000000 Z
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.11
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