nylas 6.9.0 → 6.10.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/CHANGELOG.md +4 -0
- data/lib/nylas/resources/events.rb +40 -0
- data/lib/nylas/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ff0837b04ea27eef880902f2967de6bbf45b9b61e2fe25a62acdfa4b9bbd20c
|
|
4
|
+
data.tar.gz: cc6ba9bcf584f4911e042b6928bfc99108df64d9fac3cdddbc7fa9f1fecd87c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa95b84bda5aab79c64b529f7bde85411c0d4652afb6635f55fa5c5fbef96da506ea7874d845fa9612d28c5cb8bfe6ef6c1c9a6218c9df0a164443811338ebe9
|
|
7
|
+
data.tar.gz: f0faf17e26fce6a49ee2da9387818aaa6fc65063738a8074580b6943d28b6c0a8096bad59443e2655316c0363d5a85ded00dbb5332f4806bfdbf4d9d7b2a64c1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### [6.10.0] / 2026-11-04
|
|
4
|
+
* Added Events batch endpoint (Google and Microsoft). Supports create, update, and delete operations with ordered results, HTTP 207 responses, and retry safety metadata. ([#553](https://github.com/nylas/nylas-ruby/pull/553), [TT-5546](https://nylas.atlassian.net/browse/TT-5546))
|
|
5
|
+
* Validated batch grant identifiers and encoded them as a single URL path segment.
|
|
6
|
+
|
|
3
7
|
### [6.9.0] / 2026-10-26
|
|
4
8
|
* Required HTTParty 0.24.0 or later to exclude versions affected by CVE-2025-68696 (potential SSRF and API key leakage)
|
|
5
9
|
* Treat 207 Multi-Status responses as successful, so a response that carries partial results is returned instead of raising an error
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative "resource"
|
|
4
4
|
require_relative "../handler/api_operations"
|
|
5
|
+
require "uri"
|
|
5
6
|
|
|
6
7
|
module Nylas
|
|
7
8
|
# Nylas Events API
|
|
@@ -51,6 +52,45 @@ module Nylas
|
|
|
51
52
|
)
|
|
52
53
|
end
|
|
53
54
|
|
|
55
|
+
# Create, update, or delete events in one request (Google and Microsoft).
|
|
56
|
+
#
|
|
57
|
+
# Results follow the operation order. Both 200 and 207 responses return normally;
|
|
58
|
+
# inspect each result's status and error, even when every operation failed.
|
|
59
|
+
# The API validates the operations and batch size. No operations are retried automatically.
|
|
60
|
+
#
|
|
61
|
+
# @param identifier [String] Grant ID or email account in which to modify events.
|
|
62
|
+
# @param request_body [Hash] The batch request.
|
|
63
|
+
# @option request_body [Array<Hash>] :operations The event operations to execute.
|
|
64
|
+
# Each operation has a :method of "create", "update", or "delete".
|
|
65
|
+
# Create and update require :body, using the same event Hash as {#create} or {#update}.
|
|
66
|
+
# Update and delete require :event_id [String].
|
|
67
|
+
# @param query_params [Hash] Query parameters applied to every operation.
|
|
68
|
+
# @option query_params [String] :calendar_id The required calendar ID.
|
|
69
|
+
# @option query_params [Boolean] :notify_participants Defaults to true on the server.
|
|
70
|
+
# Microsoft does not support false.
|
|
71
|
+
# @option query_params [String] :grant_email Optional grant email.
|
|
72
|
+
# @option query_params [Boolean] :tentative_as_busy Whether tentative events count as busy.
|
|
73
|
+
# @option query_params [String] :select Comma-separated event fields to return.
|
|
74
|
+
# @return [Array(Array<Hash>, String, Hash)] Ordered results, API request ID, and response headers.
|
|
75
|
+
# Each result has :status [Integer], optional :data [Hash] with the event for a successful
|
|
76
|
+
# create or update, and optional :error [Hash] with :type [String], :message [String], and
|
|
77
|
+
# :provider_error [Hash]. A successful delete has no :data. Failed results may include
|
|
78
|
+
# :retry_after [Numeric] (seconds, including zero) and :provider_event_created [Boolean].
|
|
79
|
+
# Never retry an operation with :provider_event_created set to true; it would create a duplicate.
|
|
80
|
+
# @raise [ArgumentError] If the grant identifier is not a nonblank String or is a URL dot segment.
|
|
81
|
+
def batch(identifier:, request_body:, query_params:)
|
|
82
|
+
unless identifier.is_a?(String) && !identifier.strip.empty? && !%w[. ..].include?(identifier.strip)
|
|
83
|
+
raise ArgumentError, "Invalid grant identifier."
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
encoded_identifier = URI.encode_www_form_component(identifier).gsub("+", "%20")
|
|
87
|
+
post(
|
|
88
|
+
path: "#{api_uri}/v3/grants/#{encoded_identifier}/events/batch",
|
|
89
|
+
query_params: query_params,
|
|
90
|
+
request_body: request_body
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
54
94
|
# Update an event.
|
|
55
95
|
#
|
|
56
96
|
# @param identifier [String] Grant ID or email account in which to update an object.
|
data/lib/nylas/version.rb
CHANGED