nylas 6.0.3 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nylas/resources/auth.rb +12 -0
- data/lib/nylas/resources/messages.rb +20 -4
- data/lib/nylas/resources/webhooks.rb +5 -0
- data/lib/nylas/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02d4ddf22b4a6d57beca4b1f0d9fe0628c3d118e62dcee6e7c8ec38695035b5b
|
4
|
+
data.tar.gz: 6393d443a2c9d4f45ffff8d8094929ba767bec0f27414aa5f47eb3914dab16f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d815d22e5bf051d16465ea4985ac231ac99f61f8de9e728cb73750ca7ed325e2bbebf7d03ac3e7465d2a0abf42be31925df52f48db2a5fff2a4572d4c537498f
|
7
|
+
data.tar.gz: 6cb20979b66c86fad147bba710cd10cb1a1323712eb8986863f603c98f5c9fe11f11b3cc85384733fcd5193bce0c622e2df1ac41a2388bb7b7bf59bb4baa7d4e
|
data/lib/nylas/resources/auth.rb
CHANGED
@@ -16,6 +16,18 @@ module Nylas
|
|
16
16
|
include ApiOperations::Post
|
17
17
|
include ApiOperations::Get
|
18
18
|
|
19
|
+
# Get info about a specific token based on the identifier you include.
|
20
|
+
# Use either the ID Token or Access Token.
|
21
|
+
#
|
22
|
+
# @param ID of the request.
|
23
|
+
# @return [Hash] Token Info.
|
24
|
+
def access_token_info(query_params: nil)
|
25
|
+
get(
|
26
|
+
path: "#{api_uri}/v3/connect/tokeninfo",
|
27
|
+
query_params: query_params
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
19
31
|
# Builds the URL for authenticating users to your application with OAuth 2.0.
|
20
32
|
#
|
21
33
|
# @param config [Hash] Configuration for building the URL.
|
@@ -38,10 +38,12 @@ module Nylas
|
|
38
38
|
#
|
39
39
|
# @param identifier [String] Grant ID or email account to query.
|
40
40
|
# @param message_id [String] The id of the message to return.
|
41
|
+
# @param query_params [Hash, nil] Query params to pass to the request.
|
41
42
|
# @return [Array(Hash, String)] The message and API request ID.
|
42
|
-
def find(identifier:, message_id:)
|
43
|
+
def find(identifier:, message_id:, query_params: nil)
|
43
44
|
get(
|
44
|
-
path: "#{api_uri}/v3/grants/#{identifier}/messages/#{message_id}"
|
45
|
+
path: "#{api_uri}/v3/grants/#{identifier}/messages/#{message_id}",
|
46
|
+
query_params: query_params
|
45
47
|
)
|
46
48
|
end
|
47
49
|
|
@@ -50,11 +52,13 @@ module Nylas
|
|
50
52
|
# @param identifier [String] Grant ID or email account in which to update an object.
|
51
53
|
# @param message_id [String] The id of the message to update.
|
52
54
|
# @param request_body [Hash] The values to update the message with
|
55
|
+
# @param query_params [Hash, nil] Query params to pass to the request.
|
53
56
|
# @return [Array(Hash, String)] The updated message and API Request ID.
|
54
|
-
def update(identifier:, message_id:, request_body:)
|
57
|
+
def update(identifier:, message_id:, request_body:, query_params: nil)
|
55
58
|
put(
|
56
59
|
path: "#{api_uri}/v3/grants/#{identifier}/messages/#{message_id}",
|
57
|
-
request_body: request_body
|
60
|
+
request_body: request_body,
|
61
|
+
query_params: query_params
|
58
62
|
)
|
59
63
|
end
|
60
64
|
|
@@ -71,6 +75,18 @@ module Nylas
|
|
71
75
|
[true, request_id]
|
72
76
|
end
|
73
77
|
|
78
|
+
# Clean a message.
|
79
|
+
#
|
80
|
+
# @param identifier [String] Grant ID or email account from which to clean a message.
|
81
|
+
# @param request_body [Hash] The options to clean a message with
|
82
|
+
# @return [Array(Hash)] The list of clean messages.
|
83
|
+
def clean_messages(identifier:, request_body:)
|
84
|
+
put(
|
85
|
+
path: "#{api_uri}/v3/grants/#{identifier}/messages/clean",
|
86
|
+
request_body: request_body
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
74
90
|
# Send a message.
|
75
91
|
#
|
76
92
|
# @param identifier [String] Grant ID or email account from which to delete an object.
|
@@ -19,9 +19,14 @@ module Nylas
|
|
19
19
|
GRANT_EXPIRED = "grant.expired"
|
20
20
|
MESSAGE_SEND_SUCCESS = "message.send_success"
|
21
21
|
MESSAGE_SEND_FAILED = "message.send_failed"
|
22
|
+
MESSAGE_CREATED = "message.created"
|
23
|
+
MESSAGE_UPDATED = "message.updated"
|
22
24
|
MESSAGE_OPENED = "message.opened"
|
23
25
|
MESSAGE_LINK_CLICKED = "message.link_clicked"
|
24
26
|
THREAD_REPLIED = "thread.replied"
|
27
|
+
FOLDER_CREATED = "folder.created"
|
28
|
+
FOLDER_UPDATE = "folder.updated"
|
29
|
+
FOLDER_DELETED = "folder.deleted"
|
25
30
|
end
|
26
31
|
|
27
32
|
# Nylas Webhooks API
|
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: 6.0
|
4
|
+
version: 6.1.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: 2024-
|
11
|
+
date: 2024-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|