nylas 5.17.0 → 6.0.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nylas/client.rb +107 -0
  3. data/lib/nylas/config.rb +19 -0
  4. data/lib/nylas/errors.rb +63 -89
  5. data/lib/nylas/handler/api_operations.rb +140 -0
  6. data/lib/nylas/handler/http_client.rb +243 -0
  7. data/lib/nylas/resources/applications.rb +27 -0
  8. data/lib/nylas/resources/attachments.rb +65 -0
  9. data/lib/nylas/resources/auth.rb +211 -0
  10. data/lib/nylas/resources/calendars.rb +101 -0
  11. data/lib/nylas/resources/connectors.rb +80 -0
  12. data/lib/nylas/resources/credentials.rb +75 -0
  13. data/lib/nylas/resources/drafts.rb +91 -0
  14. data/lib/nylas/resources/events.rb +83 -0
  15. data/lib/nylas/resources/folders.rb +73 -0
  16. data/lib/nylas/resources/grants.rb +70 -0
  17. data/lib/nylas/resources/messages.rb +126 -0
  18. data/lib/nylas/resources/redirect_uris.rb +68 -0
  19. data/lib/nylas/resources/resource.rb +18 -0
  20. data/lib/nylas/resources/smart_compose.rb +36 -0
  21. data/lib/nylas/resources/threads.rb +62 -0
  22. data/lib/nylas/resources/webhooks.rb +85 -0
  23. data/lib/nylas/utils/file_utils.rb +49 -0
  24. data/lib/nylas/version.rb +1 -1
  25. data/lib/nylas.rb +30 -148
  26. metadata +87 -247
  27. data/lib/nylas/account.rb +0 -56
  28. data/lib/nylas/api.rb +0 -246
  29. data/lib/nylas/application_details.rb +0 -13
  30. data/lib/nylas/calendar.rb +0 -46
  31. data/lib/nylas/calendar_collection.rb +0 -144
  32. data/lib/nylas/categorize.rb +0 -14
  33. data/lib/nylas/collection.rb +0 -175
  34. data/lib/nylas/component.rb +0 -35
  35. data/lib/nylas/component_collection.rb +0 -10
  36. data/lib/nylas/constraints.rb +0 -56
  37. data/lib/nylas/contact.rb +0 -53
  38. data/lib/nylas/contact_group.rb +0 -23
  39. data/lib/nylas/current_account.rb +0 -23
  40. data/lib/nylas/delta.rb +0 -56
  41. data/lib/nylas/deltas.rb +0 -19
  42. data/lib/nylas/deltas_collection.rb +0 -40
  43. data/lib/nylas/draft.rb +0 -100
  44. data/lib/nylas/email_address.rb +0 -12
  45. data/lib/nylas/event.rb +0 -144
  46. data/lib/nylas/event_collection.rb +0 -15
  47. data/lib/nylas/event_conferencing.rb +0 -12
  48. data/lib/nylas/event_conferencing_autocreate.rb +0 -10
  49. data/lib/nylas/event_conferencing_details.rb +0 -14
  50. data/lib/nylas/event_notification.rb +0 -17
  51. data/lib/nylas/file.rb +0 -75
  52. data/lib/nylas/filter_attributes.rb +0 -25
  53. data/lib/nylas/folder.rb +0 -26
  54. data/lib/nylas/free_busy.rb +0 -13
  55. data/lib/nylas/free_busy_collection.rb +0 -48
  56. data/lib/nylas/http_client.rb +0 -279
  57. data/lib/nylas/im_address.rb +0 -11
  58. data/lib/nylas/job_status.rb +0 -27
  59. data/lib/nylas/job_status_collection.rb +0 -21
  60. data/lib/nylas/label.rb +0 -27
  61. data/lib/nylas/logging.rb +0 -41
  62. data/lib/nylas/message.rb +0 -98
  63. data/lib/nylas/message_headers.rb +0 -27
  64. data/lib/nylas/message_tracking.rb +0 -13
  65. data/lib/nylas/model/attributable.rb +0 -89
  66. data/lib/nylas/model/attribute_definition.rb +0 -24
  67. data/lib/nylas/model/attributes.rb +0 -97
  68. data/lib/nylas/model/list_attribute_definition.rb +0 -39
  69. data/lib/nylas/model/transferable.rb +0 -53
  70. data/lib/nylas/model.rb +0 -217
  71. data/lib/nylas/native_authentication.rb +0 -39
  72. data/lib/nylas/neural.rb +0 -87
  73. data/lib/nylas/neural_categorizer.rb +0 -29
  74. data/lib/nylas/neural_clean_conversation.rb +0 -33
  75. data/lib/nylas/neural_contact_link.rb +0 -11
  76. data/lib/nylas/neural_contact_name.rb +0 -11
  77. data/lib/nylas/neural_message_options.rb +0 -35
  78. data/lib/nylas/neural_ocr.rb +0 -16
  79. data/lib/nylas/neural_sentiment_analysis.rb +0 -17
  80. data/lib/nylas/neural_signature_contact.rb +0 -81
  81. data/lib/nylas/neural_signature_extraction.rb +0 -18
  82. data/lib/nylas/new_message.rb +0 -39
  83. data/lib/nylas/nylas_date.rb +0 -25
  84. data/lib/nylas/open_hours.rb +0 -15
  85. data/lib/nylas/outbox.rb +0 -116
  86. data/lib/nylas/outbox_job_status.rb +0 -19
  87. data/lib/nylas/outbox_message.rb +0 -17
  88. data/lib/nylas/participant.rb +0 -13
  89. data/lib/nylas/phone_number.rb +0 -11
  90. data/lib/nylas/physical_address.rb +0 -17
  91. data/lib/nylas/raw_message.rb +0 -25
  92. data/lib/nylas/recurrence.rb +0 -11
  93. data/lib/nylas/registry.rb +0 -42
  94. data/lib/nylas/room_resource.rb +0 -19
  95. data/lib/nylas/rsvp.rb +0 -24
  96. data/lib/nylas/scheduler.rb +0 -51
  97. data/lib/nylas/scheduler_booking_confirmation.rb +0 -24
  98. data/lib/nylas/scheduler_booking_request.rb +0 -17
  99. data/lib/nylas/scheduler_collection.rb +0 -104
  100. data/lib/nylas/scheduler_config.rb +0 -20
  101. data/lib/nylas/scheduler_time_slot.rb +0 -14
  102. data/lib/nylas/search_collection.rb +0 -10
  103. data/lib/nylas/send_grid_verified_status.rb +0 -12
  104. data/lib/nylas/services/tunnel.rb +0 -128
  105. data/lib/nylas/thread.rb +0 -66
  106. data/lib/nylas/time_slot.rb +0 -16
  107. data/lib/nylas/time_slot_capacity.rb +0 -13
  108. data/lib/nylas/timespan.rb +0 -20
  109. data/lib/nylas/token_info.rb +0 -20
  110. data/lib/nylas/types.rb +0 -168
  111. data/lib/nylas/web_page.rb +0 -11
  112. data/lib/nylas/webhook.rb +0 -111
  113. data/lib/nylas/when.rb +0 -75
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "resource"
4
+ require_relative "../handler/api_operations"
5
+
6
+ module Nylas
7
+ # Nylas Smart Compose API
8
+ class SmartCompose < Resource
9
+ include ApiOperations::Post
10
+
11
+ # Compose a message.
12
+ #
13
+ # @param identifier [String] Grant ID or email account to generate a message suggestion for.
14
+ # @param request_body [Hash] The prompt that smart compose will use to generate a message suggestion.
15
+ # @return [Array(Hash, String)] The generated message and API Request ID.
16
+ def compose_message(identifier:, request_body:)
17
+ post(
18
+ path: "#{api_uri}/v3/grants/#{identifier}/messages/smart-compose",
19
+ request_body: request_body
20
+ )
21
+ end
22
+
23
+ # Compose a message reply.
24
+ #
25
+ # @param identifier [String] Grant ID or email account to generate a message suggestion for.
26
+ # @param message_id [String] The id of the message to reply to.
27
+ # @param request_body [Hash] The prompt that smart compose will use to generate a message reply.
28
+ # @return [Array(Hash, String)] The generated message reply and API Request ID.
29
+ def compose_message_reply(identifier:, message_id:, request_body:)
30
+ post(
31
+ path: "#{api_uri}/v3/grants/#{identifier}/messages/#{message_id}/smart-compose",
32
+ request_body: request_body
33
+ )
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "resource"
4
+ require_relative "../handler/api_operations"
5
+
6
+ module Nylas
7
+ # Nylas Threads API
8
+ class Threads < Resource
9
+ include ApiOperations::Get
10
+ include ApiOperations::Put
11
+ include ApiOperations::Delete
12
+
13
+ # Return all threads.
14
+ #
15
+ # @param identifier [String] Grant ID or email account to query.
16
+ # @param query_params [Hash] Query params to pass to the request.
17
+ # @return [Array(Array(Hash), String)] The list of threads and API Request ID.
18
+ def list(identifier:, query_params: nil)
19
+ get(
20
+ path: "#{api_uri}/v3/grants/#{identifier}/threads",
21
+ query_params: query_params
22
+ )
23
+ end
24
+
25
+ # Return an thread.
26
+ #
27
+ # @param identifier [String] Grant ID or email account to query.
28
+ # @param thread_id [String] The id of the thread to return.
29
+ # @return [Array(Hash, String)] The thread and API request ID.
30
+ def find(identifier:, thread_id:)
31
+ get(
32
+ path: "#{api_uri}/v3/grants/#{identifier}/threads/#{thread_id}"
33
+ )
34
+ end
35
+
36
+ # Update an thread.
37
+ #
38
+ # @param identifier [String] Grant ID or email account in which to update the thread.
39
+ # @param thread_id [String] The id of the thread to update.
40
+ # @param request_body [Hash] The values to update the thread with
41
+ # @return [Array(Hash, String)] The updated thread and API Request ID.
42
+ def update(identifier:, thread_id:, request_body:)
43
+ put(
44
+ path: "#{api_uri}/v3/grants/#{identifier}/threads/#{thread_id}",
45
+ request_body: request_body
46
+ )
47
+ end
48
+
49
+ # Delete an thread.
50
+ #
51
+ # @param identifier [String] Grant ID or email account from which to delete the thread.
52
+ # @param thread_id [String] The id of the thread to delete.
53
+ # @return [Array(TrueClass, String)] True and the API Request ID for the delete operation.
54
+ def destroy(identifier:, thread_id:)
55
+ _, request_id = delete(
56
+ path: "#{api_uri}/v3/grants/#{identifier}/threads/#{thread_id}"
57
+ )
58
+
59
+ [true, request_id]
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "resource"
4
+ require_relative "../handler/api_operations"
5
+
6
+ module Nylas
7
+ # Module representing the possible 'trigger' values in a Webhook.
8
+ # @see https://developer.nylas.com/docs/api#post/a/client_id/webhooks
9
+ module WebhookTrigger
10
+ CALENDAR_CREATED = "calendar.created"
11
+ CALENDAR_UPDATED = "calendar.updated"
12
+ CALENDAR_DELETED = "calendar.deleted"
13
+ EVENT_CREATED = "event.created"
14
+ EVENT_UPDATED = "event.updated"
15
+ EVENT_DELETED = "event.deleted"
16
+ GRANT_CREATED = "grant.created"
17
+ GRANT_UPDATED = "grant.updated"
18
+ GRANT_DELETED = "grant.deleted"
19
+ GRANT_EXPIRED = "grant.expired"
20
+ MESSAGE_SEND_SUCCESS = "message.send_success"
21
+ MESSAGE_SEND_FAILED = "message.send_failed"
22
+ end
23
+
24
+ # Nylas Webhooks API
25
+ class Webhooks < Resource
26
+ include ApiOperations::Get
27
+ include ApiOperations::Post
28
+ include ApiOperations::Put
29
+ include ApiOperations::Delete
30
+
31
+ # Return all webhooks.
32
+ #
33
+ # @return [Array(Array(Hash), String)] The list of webhooks and API Request ID.
34
+ def list
35
+ get(
36
+ path: "#{api_uri}/v3/webhooks"
37
+ )
38
+ end
39
+
40
+ # Return a webhook.
41
+ #
42
+ # @param webhook_id [String] The id of the webhook to return.
43
+ # @return [Array(Hash, String)] The webhook and API request ID.
44
+ def find(webhook_id:)
45
+ get(
46
+ path: "#{api_uri}/v3/webhooks/#{webhook_id}"
47
+ )
48
+ end
49
+
50
+ # Create a webhook.
51
+ #
52
+ # @param request_body [Hash] The values to create the webhook with.
53
+ # @return [Array(Hash, String)] The created webhook and API Request ID.
54
+ def create(request_body:)
55
+ post(
56
+ path: "#{api_uri}/v3/webhooks",
57
+ request_body: request_body
58
+ )
59
+ end
60
+
61
+ # Update a webhook.
62
+ #
63
+ # @param webhook_id [String] The id of the webhook to update.
64
+ # @param request_body [Hash] The values to update the webhook with
65
+ # @return [Array(Hash, String)] The updated webhook and API Request ID.
66
+ def update(webhook_id:, request_body:)
67
+ put(
68
+ path: "#{api_uri}/v3/webhooks/#{webhook_id}",
69
+ request_body: request_body
70
+ )
71
+ end
72
+
73
+ # Delete a webhook.
74
+ #
75
+ # @param webhook_id [String] The id of the webhook to delete.
76
+ # @return [Array(TrueClass, String)] True and the API Request ID for the delete operation.
77
+ def destroy(webhook_id:)
78
+ _, request_id = delete(
79
+ path: "#{api_uri}/v3/webhooks/#{webhook_id}"
80
+ )
81
+
82
+ [true, request_id]
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "mime/types"
4
+
5
+ module Nylas
6
+ # A collection of file-related utilities.
7
+ module FileUtils
8
+ # Build a form request for the API.
9
+ # @param request_body The values to create the message with.
10
+ # @return The form data to send to the API and the opened files.
11
+ # @!visibility private
12
+ def self.build_form_request(request_body)
13
+ attachments = request_body.delete(:attachments) || request_body.delete("attachments") || []
14
+ message_payload = request_body.to_json
15
+
16
+ # Prepare the data to return
17
+ form_data = {}
18
+ opened_files = []
19
+
20
+ attachments.each_with_index do |attachment, index|
21
+ file = attachment[:content] || attachment["content"]
22
+ form_data.merge!({ "file#{index}" => file })
23
+ opened_files << file
24
+ end
25
+
26
+ form_data.merge!({ "multipart" => true, "message" => message_payload })
27
+
28
+ [form_data, opened_files]
29
+ end
30
+
31
+ # Build the request to attach a file to a message/draft object.
32
+ # @param file_path [String] The path to the file to attach.
33
+ # @return [Hash] The request that will attach the file to the message/draft
34
+ def self.attach_file_request_builder(file_path)
35
+ filename = File.basename(file_path)
36
+ content_type = MIME::Types.type_for(file_path).first.to_s
37
+ content_type = "application/octet-stream" if content_type.empty?
38
+ size = File.size(file_path)
39
+ content = File.new(file_path, "rb")
40
+
41
+ {
42
+ filename: filename,
43
+ content_type: content_type,
44
+ size: size,
45
+ content: content
46
+ }
47
+ end
48
+ end
49
+ end
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.17.0"
4
+ VERSION = "6.0.0.beta.2"
5
5
  end
data/lib/nylas.rb CHANGED
@@ -7,15 +7,14 @@ require "rest-client"
7
7
  # See https://github.com/sparklemotion/http-cookie/issues/27
8
8
  # and https://github.com/sparklemotion/http-cookie/issues/6
9
9
  #
10
- # CookieJar uses unsafe class caching for dynamically loading cookie jars
11
- # If 2 rest-client instances are instantiated at the same time, (in threads)
12
- # non-deterministic behaviour can occur whereby the Hash cookie jar isn't
13
- # properly loaded and cached.
14
- # Forcing an instantiation of the jar onload will force the CookieJar to load
15
- # before the system has a chance to spawn any threads.
16
- # Note this should technically be fixed in rest-client itself however that
17
- # library appears to be stagnant so we're forced to fix it here
18
- # This object should get GC'd as it's not referenced by anything
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.
19
18
  HTTP::CookieJar.new
20
19
 
21
20
  require "ostruct"
@@ -23,142 +22,25 @@ require "forwardable"
23
22
 
24
23
  require_relative "nylas/version"
25
24
  require_relative "nylas/errors"
26
-
27
- require_relative "nylas/logging"
28
- require_relative "nylas/registry"
29
- require_relative "nylas/types"
30
- require_relative "nylas/constraints"
31
-
32
- require_relative "nylas/http_client"
33
- require_relative "nylas/api"
34
- require_relative "nylas/collection"
35
- require_relative "nylas/model"
36
-
37
- # Attribute types supported by the API
38
- require_relative "nylas/email_address"
39
- require_relative "nylas/event"
40
- require_relative "nylas/file"
41
- require_relative "nylas/folder"
42
- require_relative "nylas/im_address"
43
- require_relative "nylas/label"
44
- require_relative "nylas/message_headers"
45
- require_relative "nylas/message_tracking"
46
- require_relative "nylas/participant"
47
- require_relative "nylas/physical_address"
48
- require_relative "nylas/phone_number"
49
- require_relative "nylas/recurrence"
50
- require_relative "nylas/rsvp"
51
- require_relative "nylas/timespan"
52
- require_relative "nylas/web_page"
53
- require_relative "nylas/nylas_date"
54
- require_relative "nylas/when"
55
- require_relative "nylas/free_busy"
56
- require_relative "nylas/time_slot"
57
- require_relative "nylas/time_slot_capacity"
58
- require_relative "nylas/open_hours"
59
- require_relative "nylas/event_conferencing"
60
- require_relative "nylas/event_conferencing_details"
61
- require_relative "nylas/event_conferencing_autocreate"
62
- require_relative "nylas/event_notification"
63
- require_relative "nylas/component"
64
-
65
- # Custom collection types
66
- require_relative "nylas/event_collection"
67
- require_relative "nylas/search_collection"
68
- require_relative "nylas/deltas_collection"
69
- require_relative "nylas/free_busy_collection"
70
- require_relative "nylas/calendar_collection"
71
- require_relative "nylas/component_collection"
72
- require_relative "nylas/scheduler_collection"
73
- require_relative "nylas/job_status_collection"
74
- require_relative "nylas/outbox"
75
-
76
- # Models supported by the API
77
- require_relative "nylas/account"
78
- require_relative "nylas/calendar"
79
- require_relative "nylas/contact"
80
- require_relative "nylas/contact_group"
81
- require_relative "nylas/current_account"
82
- require_relative "nylas/deltas"
83
- require_relative "nylas/delta"
84
- require_relative "nylas/draft"
85
- require_relative "nylas/message"
86
- require_relative "nylas/room_resource"
87
- require_relative "nylas/new_message"
88
- require_relative "nylas/raw_message"
89
- require_relative "nylas/thread"
90
- require_relative "nylas/webhook"
91
- require_relative "nylas/scheduler"
92
- require_relative "nylas/job_status"
93
- require_relative "nylas/token_info"
94
- require_relative "nylas/application_details"
95
- require_relative "nylas/outbox_message"
96
- require_relative "nylas/outbox_job_status"
97
- require_relative "nylas/send_grid_verified_status"
98
-
99
- # Neural specific types
100
- require_relative "nylas/neural"
101
- require_relative "nylas/neural_sentiment_analysis"
102
- require_relative "nylas/neural_ocr"
103
- require_relative "nylas/neural_categorizer"
104
- require_relative "nylas/neural_clean_conversation"
105
- require_relative "nylas/neural_contact_link"
106
- require_relative "nylas/neural_contact_name"
107
- require_relative "nylas/neural_signature_contact"
108
- require_relative "nylas/neural_signature_extraction"
109
- require_relative "nylas/neural_message_options"
110
- require_relative "nylas/categorize"
111
- require_relative "nylas/scheduler_config"
112
- require_relative "nylas/scheduler_time_slot"
113
- require_relative "nylas/scheduler_booking_request"
114
- require_relative "nylas/scheduler_booking_confirmation"
115
-
116
- require_relative "nylas/native_authentication"
117
-
118
- require_relative "nylas/filter_attributes"
119
-
120
- require_relative "nylas/services/tunnel"
121
- # an SDK for interacting with the Nylas API
122
- # @see https://docs.nylas.com/reference
123
- module Nylas
124
- Types.registry[:account] = Types::ModelType.new(model: Account)
125
- Types.registry[:calendar] = Types::ModelType.new(model: Calendar)
126
- Types.registry[:contact] = Types::ModelType.new(model: Contact)
127
- Types.registry[:delta] = DeltaType.new
128
- Types.registry[:draft] = Types::ModelType.new(model: Draft)
129
- Types.registry[:email_address] = Types::ModelType.new(model: EmailAddress)
130
- Types.registry[:event] = Types::ModelType.new(model: Event)
131
- Types.registry[:file] = Types::ModelType.new(model: File)
132
- Types.registry[:folder] = Types::ModelType.new(model: Folder)
133
- Types.registry[:im_address] = Types::ModelType.new(model: IMAddress)
134
- Types.registry[:label] = Types::ModelType.new(model: Label)
135
- Types.registry[:room_resource] = Types::ModelType.new(model: RoomResource)
136
- Types.registry[:message] = Types::ModelType.new(model: Message)
137
- Types.registry[:message_headers] = MessageHeadersType.new
138
- Types.registry[:message_tracking] = Types::ModelType.new(model: MessageTracking)
139
- Types.registry[:participant] = Types::ModelType.new(model: Participant)
140
- Types.registry[:physical_address] = Types::ModelType.new(model: PhysicalAddress)
141
- Types.registry[:phone_number] = Types::ModelType.new(model: PhoneNumber)
142
- Types.registry[:recurrence] = Types::ModelType.new(model: Recurrence)
143
- Types.registry[:thread] = Types::ModelType.new(model: Thread)
144
- Types.registry[:timespan] = Types::ModelType.new(model: Timespan)
145
- Types.registry[:web_page] = Types::ModelType.new(model: WebPage)
146
- Types.registry[:nylas_date] = NylasDateType.new
147
- Types.registry[:contact_group] = Types::ModelType.new(model: ContactGroup)
148
- Types.registry[:when] = Types::ModelType.new(model: When)
149
- Types.registry[:time_slot] = Types::ModelType.new(model: TimeSlot)
150
- Types.registry[:time_slot_capacity] = Types::ModelType.new(model: TimeSlotCapacity)
151
- Types.registry[:event_conferencing] = Types::ModelType.new(model: EventConferencing)
152
- Types.registry[:event_conferencing_details] = Types::ModelType.new(model: EventConferencingDetails)
153
- Types.registry[:event_conferencing_autocreate] = Types::ModelType.new(model: EventConferencingAutocreate)
154
- Types.registry[:event_notification] = Types::ModelType.new(model: EventNotification)
155
- Types.registry[:neural] = Types::ModelType.new(model: Neural)
156
- Types.registry[:categorize] = Types::ModelType.new(model: Categorize)
157
- Types.registry[:neural_signature_contact] = Types::ModelType.new(model: NeuralSignatureContact)
158
- Types.registry[:neural_contact_link] = Types::ModelType.new(model: NeuralContactLink)
159
- Types.registry[:neural_contact_name] = Types::ModelType.new(model: NeuralContactName)
160
- Types.registry[:scheduler_config] = Types::ModelType.new(model: SchedulerConfig)
161
- Types.registry[:scheduler_time_slot] = Types::ModelType.new(model: SchedulerTimeSlot)
162
- Types.registry[:job_status] = Types::ModelType.new(model: JobStatus)
163
- Types.registry[:outbox_message] = Types::ModelType.new(model: OutboxMessage)
164
- end
25
+ require_relative "nylas/client"
26
+ require_relative "nylas/config"
27
+
28
+ require_relative "nylas/handler/http_client"
29
+
30
+ require_relative "nylas/resources/applications"
31
+ require_relative "nylas/resources/attachments"
32
+ require_relative "nylas/resources/auth"
33
+ require_relative "nylas/resources/calendars"
34
+ require_relative "nylas/resources/connectors"
35
+ require_relative "nylas/resources/credentials"
36
+ require_relative "nylas/resources/drafts"
37
+ require_relative "nylas/resources/events"
38
+ require_relative "nylas/resources/folders"
39
+ require_relative "nylas/resources/grants"
40
+ require_relative "nylas/resources/messages"
41
+ require_relative "nylas/resources/smart_compose"
42
+ require_relative "nylas/resources/threads"
43
+ require_relative "nylas/resources/redirect_uris"
44
+ require_relative "nylas/resources/webhooks"
45
+
46
+ require_relative "nylas/utils/file_utils"