spatio-sdk 0.0.2

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.
Files changed (1119) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +31 -0
  5. data/Rakefile +10 -0
  6. data/docs/AcceptOrganizationInvitationRequest.md +18 -0
  7. data/docs/AccountApi.md +793 -0
  8. data/docs/AccountChoice.md +22 -0
  9. data/docs/AccountError.md +20 -0
  10. data/docs/AccountListResponse.md +22 -0
  11. data/docs/AccountPlan.md +24 -0
  12. data/docs/AccountStatus.md +28 -0
  13. data/docs/AccountTierDetails.md +46 -0
  14. data/docs/AccountUsage.md +32 -0
  15. data/docs/ActionDescriptor.md +32 -0
  16. data/docs/ActionsApi.md +409 -0
  17. data/docs/AddOrganizationMemberRequest.md +22 -0
  18. data/docs/AddWorkspaceMemberRequest.md +20 -0
  19. data/docs/Agent.md +40 -0
  20. data/docs/AgentConversation.md +28 -0
  21. data/docs/AgentConversationListResponse.md +20 -0
  22. data/docs/AgentListResponse.md +24 -0
  23. data/docs/AgentMessage.md +28 -0
  24. data/docs/AgentMessageListResponse.md +20 -0
  25. data/docs/AgentSessionContext.md +24 -0
  26. data/docs/AgentTaskUsage.md +26 -0
  27. data/docs/AgentsApi.md +884 -0
  28. data/docs/AmbiguousAccountError.md +22 -0
  29. data/docs/ApiError.md +20 -0
  30. data/docs/App.md +32 -0
  31. data/docs/AppFileContentResponse.md +20 -0
  32. data/docs/AppFileListResponse.md +18 -0
  33. data/docs/AppListResponse.md +20 -0
  34. data/docs/AppsApi.md +984 -0
  35. data/docs/AssignContactCategoryRequest.md +18 -0
  36. data/docs/Attachment.md +26 -0
  37. data/docs/AttachmentInput.md +24 -0
  38. data/docs/AttachmentMeta.md +24 -0
  39. data/docs/Attendee.md +30 -0
  40. data/docs/AttendeeRole.md +15 -0
  41. data/docs/AttendeeStatus.md +15 -0
  42. data/docs/Block.md +36 -0
  43. data/docs/BlockContent.md +38 -0
  44. data/docs/BlockListResponse.md +20 -0
  45. data/docs/BlockType.md +15 -0
  46. data/docs/BulkArchiveRequest.md +20 -0
  47. data/docs/BulkArchiveResponse.md +22 -0
  48. data/docs/BulkArchiveResponseFailedInner.md +20 -0
  49. data/docs/BulkDeleteEmailsRequest.md +22 -0
  50. data/docs/BulkDeleteEmailsResponse.md +22 -0
  51. data/docs/BulkDeleteFilesRequest.md +24 -0
  52. data/docs/BulkDeleteTasksRequest.md +24 -0
  53. data/docs/BulkDeleteTasksResponse.md +24 -0
  54. data/docs/BulkDeleteTasksResponseFailedInner.md +20 -0
  55. data/docs/BulkFilesResponse.md +24 -0
  56. data/docs/BulkFilesResponseFailedInner.md +20 -0
  57. data/docs/BulkMarkReadRequest.md +22 -0
  58. data/docs/BulkMarkReadResponse.md +20 -0
  59. data/docs/BulkMarkReadResponseFailedInner.md +20 -0
  60. data/docs/BulkMoveFilesRequest.md +26 -0
  61. data/docs/BulkUpdateTasksRequest.md +24 -0
  62. data/docs/BulkUpdateTasksResponse.md +24 -0
  63. data/docs/CalendarAccountError.md +24 -0
  64. data/docs/CalendarApi.md +1031 -0
  65. data/docs/CalendarCapabilitiesResponse.md +22 -0
  66. data/docs/CalendarOperationResult.md +24 -0
  67. data/docs/CalendarProviderInfo.md +26 -0
  68. data/docs/CalendarProvidersInfo.md +18 -0
  69. data/docs/CalendarSyncResponse.md +26 -0
  70. data/docs/CallListResponse.md +20 -0
  71. data/docs/CallRecording.md +30 -0
  72. data/docs/CallRecordingListResponse.md +18 -0
  73. data/docs/CallsApi.md +2096 -0
  74. data/docs/Cell.md +22 -0
  75. data/docs/ChangePasswordRequest.md +20 -0
  76. data/docs/Channel.md +38 -0
  77. data/docs/ChannelMembershipRequest.md +18 -0
  78. data/docs/ChannelsApi.md +1170 -0
  79. data/docs/ChatActionDefinition.md +34 -0
  80. data/docs/ChatActionsList.md +18 -0
  81. data/docs/ChatMessage.md +36 -0
  82. data/docs/ChatUser.md +34 -0
  83. data/docs/ChunkedFileManifest.md +34 -0
  84. data/docs/ClientRegistrationRequest.md +36 -0
  85. data/docs/ClientRegistrationResponse.md +38 -0
  86. data/docs/Comment.md +32 -0
  87. data/docs/CommentAuthor.md +24 -0
  88. data/docs/CommentListResponse.md +20 -0
  89. data/docs/CommentMutationResponse.md +20 -0
  90. data/docs/CommentResponse.md +18 -0
  91. data/docs/CommitChunkedUploadRequest.md +18 -0
  92. data/docs/CommitChunkedUploadResponse.md +36 -0
  93. data/docs/ConferenceData.md +28 -0
  94. data/docs/ConnectedAppItem.md +34 -0
  95. data/docs/ConnectedAppsListResponse.md +18 -0
  96. data/docs/ConnectionAccountListResponse.md +22 -0
  97. data/docs/ConnectionListResponse.md +20 -0
  98. data/docs/ConnectionsApi.md +748 -0
  99. data/docs/ConsumeAgentTaskResponse.md +26 -0
  100. data/docs/Contact.md +46 -0
  101. data/docs/ContactCategory.md +26 -0
  102. data/docs/ContactCategoryListResponse.md +18 -0
  103. data/docs/ContactListResponse.md +22 -0
  104. data/docs/ContactProvider.md +26 -0
  105. data/docs/ContactProviderListResponse.md +18 -0
  106. data/docs/ContactsApi.md +830 -0
  107. data/docs/Conversation.md +42 -0
  108. data/docs/ConversationMessage.md +28 -0
  109. data/docs/ConversationsApi.md +636 -0
  110. data/docs/CoreAction.md +30 -0
  111. data/docs/CoreActionListResponse.md +20 -0
  112. data/docs/CreateAgentConversationRequest.md +22 -0
  113. data/docs/CreateAgentMessageRequest.md +22 -0
  114. data/docs/CreateAgentRequest.md +30 -0
  115. data/docs/CreateAppRequest.md +26 -0
  116. data/docs/CreateBlockRequest.md +26 -0
  117. data/docs/CreateCalendarEvent201Response.md +24 -0
  118. data/docs/CreateCallRequest.md +24 -0
  119. data/docs/CreateChannelRequest.md +24 -0
  120. data/docs/CreateChannelResponse.md +20 -0
  121. data/docs/CreateCommentRequest.md +24 -0
  122. data/docs/CreateContactCategoryRequest.md +22 -0
  123. data/docs/CreateContactRequest.md +32 -0
  124. data/docs/CreateConversationRequest.md +26 -0
  125. data/docs/CreateDraftRequest.md +38 -0
  126. data/docs/CreateEmailFolderRequest.md +20 -0
  127. data/docs/CreateEventRequest.md +26 -0
  128. data/docs/CreateFolderRequest.md +26 -0
  129. data/docs/CreateLabelRequest.md +26 -0
  130. data/docs/CreateLabelResponse.md +20 -0
  131. data/docs/CreateMeetingRoomRequest.md +20 -0
  132. data/docs/CreateNote400Response.md +49 -0
  133. data/docs/CreateNoteRequest.md +32 -0
  134. data/docs/CreateOrganizationInvitationRequest.md +22 -0
  135. data/docs/CreateOrganizationRequest.md +28 -0
  136. data/docs/CreatePATRequest.md +26 -0
  137. data/docs/CreatePATResponse.md +20 -0
  138. data/docs/CreatePresentationRequest.md +26 -0
  139. data/docs/CreateRecordRequest.md +26 -0
  140. data/docs/CreateRecordTypeRequest.md +28 -0
  141. data/docs/CreateRoutineRequest.md +26 -0
  142. data/docs/CreateRowRequest.md +20 -0
  143. data/docs/CreateSheetRequest.md +30 -0
  144. data/docs/CreateSlideElementRequest.md +32 -0
  145. data/docs/CreateSlideRequest.md +34 -0
  146. data/docs/CreateTaskRequest.md +44 -0
  147. data/docs/CreateWorkspaceInvitationRequest.md +20 -0
  148. data/docs/CreateWorkspaceRequest.md +24 -0
  149. data/docs/DMAttachRequest.md +34 -0
  150. data/docs/DMForwardRequest.md +22 -0
  151. data/docs/DMMarkReadRequest.md +20 -0
  152. data/docs/DMMessageEnvelope.md +18 -0
  153. data/docs/DMMuteRequest.md +22 -0
  154. data/docs/DMMuteResponse.md +18 -0
  155. data/docs/DMPinnedList.md +18 -0
  156. data/docs/DMReactionRequest.md +20 -0
  157. data/docs/DMReactionResponse.md +18 -0
  158. data/docs/DMSearchResults.md +18 -0
  159. data/docs/DMSetDraftRequest.md +20 -0
  160. data/docs/DMThreadReplyRequest.md +20 -0
  161. data/docs/DirectMessagesApi.md +2246 -0
  162. data/docs/DisconnectConnectionRequest.md +20 -0
  163. data/docs/DiscoveryDocument.md +52 -0
  164. data/docs/DownloadFileResponse.md +20 -0
  165. data/docs/Draft.md +40 -0
  166. data/docs/DraftResponse.md +20 -0
  167. data/docs/Email.md +56 -0
  168. data/docs/EmailFolder.md +26 -0
  169. data/docs/EmailFolderListResponse.md +18 -0
  170. data/docs/EnableShareRequest.md +20 -0
  171. data/docs/ExecuteActionRequest.md +22 -0
  172. data/docs/ExecuteActionResponse.md +22 -0
  173. data/docs/ExecuteChatActionRequest.md +20 -0
  174. data/docs/ExecuteChatActionResponse.md +20 -0
  175. data/docs/ExportPDFR2Response.md +24 -0
  176. data/docs/ExportPDFRequest.md +20 -0
  177. data/docs/ExportPDFRequestRasterizedSlidesInner.md +20 -0
  178. data/docs/ExtractTextResult.md +24 -0
  179. data/docs/FederatedSearch200Response.md +28 -0
  180. data/docs/FederatedSearch200ResponseItemsInner.md +38 -0
  181. data/docs/FederatedSearch200ResponsePerPlatformValue.md +20 -0
  182. data/docs/FederatedSearchRequest.md +32 -0
  183. data/docs/FileListEnvelope.md +20 -0
  184. data/docs/FilesAndFoldersResponse.md +28 -0
  185. data/docs/FilesApi.md +2471 -0
  186. data/docs/Folder.md +32 -0
  187. data/docs/FolderListEnvelope.md +20 -0
  188. data/docs/FoldersApi.md +415 -0
  189. data/docs/GetChatUserResponse.md +20 -0
  190. data/docs/GetDomainLogo200Response.md +20 -0
  191. data/docs/GetEmailResponse.md +20 -0
  192. data/docs/GetThreadResponse.md +20 -0
  193. data/docs/InboxApi.md +424 -0
  194. data/docs/InboxCounts.md +22 -0
  195. data/docs/InboxItem.md +38 -0
  196. data/docs/InboxListResponse.md +22 -0
  197. data/docs/InitChunkedUploadRequest.md +30 -0
  198. data/docs/InitChunkedUploadResponse.md +26 -0
  199. data/docs/InstallConnectionRequest.md +22 -0
  200. data/docs/IntrospectionResponse.md +30 -0
  201. data/docs/IssueCollaborationToken200Response.md +26 -0
  202. data/docs/IssueCollaborationTokenRequest.md +18 -0
  203. data/docs/JWK.md +28 -0
  204. data/docs/JWKS.md +18 -0
  205. data/docs/KeyBinding.md +38 -0
  206. data/docs/KeyBindingListResponse.md +18 -0
  207. data/docs/KeybindingsApi.md +406 -0
  208. data/docs/Label.md +28 -0
  209. data/docs/LabelColor.md +20 -0
  210. data/docs/LinkRepoTaskRequest.md +18 -0
  211. data/docs/ListCalendarEvents200Response.md +24 -0
  212. data/docs/ListChannelsResponse.md +24 -0
  213. data/docs/ListChatUsersResponse.md +24 -0
  214. data/docs/ListDraftsResponse.md +24 -0
  215. data/docs/ListEmailsResponse.md +24 -0
  216. data/docs/ListEventsData.md +24 -0
  217. data/docs/ListLabelsResponse.md +20 -0
  218. data/docs/ListMessagesResponse.md +24 -0
  219. data/docs/LogosApi.md +211 -0
  220. data/docs/MailApi.md +3803 -0
  221. data/docs/MeetingRoom.md +24 -0
  222. data/docs/MiscApi.md +1213 -0
  223. data/docs/ModelsApi.md +483 -0
  224. data/docs/MoveBlockRequest.md +20 -0
  225. data/docs/MoveEmailsRequest.md +18 -0
  226. data/docs/MoveFileRequest.md +18 -0
  227. data/docs/MoveFileResponse.md +18 -0
  228. data/docs/NativeDMApi.md +1448 -0
  229. data/docs/NavigationApi.md +72 -0
  230. data/docs/Note.md +44 -0
  231. data/docs/NoteListEnvelope.md +20 -0
  232. data/docs/NotesApi.md +2413 -0
  233. data/docs/NotificationsApi.md +140 -0
  234. data/docs/OAuthApi.md +676 -0
  235. data/docs/OAuthError.md +20 -0
  236. data/docs/Organization.md +38 -0
  237. data/docs/OrganizationDetailLegacy.md +38 -0
  238. data/docs/OrganizationInvitation.md +38 -0
  239. data/docs/OrganizationInvitationListResponse.md +18 -0
  240. data/docs/OrganizationListResponse.md +18 -0
  241. data/docs/OrganizationMember.md +28 -0
  242. data/docs/OrganizationMemberInvitedBy.md +49 -0
  243. data/docs/OrganizationMemberListResponse.md +20 -0
  244. data/docs/OrganizationWorkspacesInner.md +22 -0
  245. data/docs/OrganizationsApi.md +1956 -0
  246. data/docs/PATListResponse.md +20 -0
  247. data/docs/PATScopesResponse.md +18 -0
  248. data/docs/PasswordRequiredError.md +24 -0
  249. data/docs/PersonalAccessToken.md +34 -0
  250. data/docs/PersonalAccessTokensApi.md +629 -0
  251. data/docs/PlatformsApi.md +1032 -0
  252. data/docs/PreconfiguredAgent.md +30 -0
  253. data/docs/Presentation.md +38 -0
  254. data/docs/PresentationListEnvelope.md +20 -0
  255. data/docs/ProposeRecommendationRequest.md +28 -0
  256. data/docs/PublicInvitationPayload.md +40 -0
  257. data/docs/QuotaExceededError.md +20 -0
  258. data/docs/RealtimeApi.md +79 -0
  259. data/docs/Recommendation.md +38 -0
  260. data/docs/RecommendationListResponse.md +18 -0
  261. data/docs/RecommendationsApi.md +354 -0
  262. data/docs/Record.md +32 -0
  263. data/docs/RecordListResponse.md +22 -0
  264. data/docs/RecordType.md +34 -0
  265. data/docs/RecordTypeListResponse.md +18 -0
  266. data/docs/RecordsApi.md +560 -0
  267. data/docs/RefreshConnectionRequest.md +20 -0
  268. data/docs/Reminder.md +20 -0
  269. data/docs/ReminderMethod.md +15 -0
  270. data/docs/ReplyEmailRequest.md +30 -0
  271. data/docs/RepoApi.md +2071 -0
  272. data/docs/ResourcesApi.md +220 -0
  273. data/docs/RevokeOtherSessionsResponse.md +18 -0
  274. data/docs/RichTextObject.md +24 -0
  275. data/docs/Routine.md +34 -0
  276. data/docs/RoutineListResponse.md +18 -0
  277. data/docs/RoutineRun.md +30 -0
  278. data/docs/RoutineRunCompleteRequest.md +20 -0
  279. data/docs/RoutineRunListResponse.md +18 -0
  280. data/docs/RoutineRunProgressRequest.md +20 -0
  281. data/docs/RoutinesApi.md +696 -0
  282. data/docs/Row.md +20 -0
  283. data/docs/RowList.md +20 -0
  284. data/docs/SaveMessageRequest.md +22 -0
  285. data/docs/SearchApi.md +77 -0
  286. data/docs/SearchEmailsResponse.md +24 -0
  287. data/docs/SearchFilesResponse.md +24 -0
  288. data/docs/SendChatMessageRequest.md +26 -0
  289. data/docs/SendChatMessageResponse.md +28 -0
  290. data/docs/SendEmailRequest.md +36 -0
  291. data/docs/SendEmailResponse.md +26 -0
  292. data/docs/Session.md +38 -0
  293. data/docs/SessionListResponse.md +18 -0
  294. data/docs/SettingsApi.md +745 -0
  295. data/docs/ShareSettings.md +26 -0
  296. data/docs/Sheet.md +48 -0
  297. data/docs/SheetListEnvelope.md +20 -0
  298. data/docs/SheetsApi.md +785 -0
  299. data/docs/SignInMethods.md +22 -0
  300. data/docs/SignInMethodsProvidersInner.md +24 -0
  301. data/docs/Slide.md +44 -0
  302. data/docs/SlideElement.md +40 -0
  303. data/docs/SlideElementList.md +20 -0
  304. data/docs/SlideList.md +20 -0
  305. data/docs/SlidesApi.md +1697 -0
  306. data/docs/SpatioCall.md +38 -0
  307. data/docs/SpatioConnection.md +38 -0
  308. data/docs/SpatioEvent.md +86 -0
  309. data/docs/SpatioFile.md +40 -0
  310. data/docs/SpatioThread.md +24 -0
  311. data/docs/SuccessFlag.md +18 -0
  312. data/docs/Task.md +58 -0
  313. data/docs/TaskComment.md +28 -0
  314. data/docs/TaskCommentAuthor.md +24 -0
  315. data/docs/TaskCommentList.md +20 -0
  316. data/docs/TaskCommentMutationResponse.md +20 -0
  317. data/docs/TaskCommentRequest.md +18 -0
  318. data/docs/TaskListEnvelope.md +20 -0
  319. data/docs/TaskProvidersInfo.md +20 -0
  320. data/docs/TaskProvidersInfoPlatform.md +20 -0
  321. data/docs/TasksApi.md +1783 -0
  322. data/docs/TerminalApi.md +345 -0
  323. data/docs/TextAnnotations.md +28 -0
  324. data/docs/TokenResponse.md +28 -0
  325. data/docs/UpdateAccountRequest.md +20 -0
  326. data/docs/UpdateAgentRequest.md +30 -0
  327. data/docs/UpdateAppRequest.md +24 -0
  328. data/docs/UpdateBlockRequest.md +22 -0
  329. data/docs/UpdateCellRequest.md +18 -0
  330. data/docs/UpdateCommentRequest.md +20 -0
  331. data/docs/UpdateContactCategoryRequest.md +22 -0
  332. data/docs/UpdateContactRequest.md +32 -0
  333. data/docs/UpdateConversationRequest.md +26 -0
  334. data/docs/UpdateDraftRequest.md +32 -0
  335. data/docs/UpdateEmailFolderRequest.md +18 -0
  336. data/docs/UpdateEmailRequest.md +26 -0
  337. data/docs/UpdateEmailResponse.md +20 -0
  338. data/docs/UpdateEventRequest.md +22 -0
  339. data/docs/UpdateFileRequest.md +22 -0
  340. data/docs/UpdateKeyBindingRequest.md +20 -0
  341. data/docs/UpdateMessageMetadataRequest.md +20 -0
  342. data/docs/UpdateNoteRequest.md +30 -0
  343. data/docs/UpdateOrganizationMemberRequest.md +18 -0
  344. data/docs/UpdateOrganizationRequest.md +22 -0
  345. data/docs/UpdatePATRequest.md +20 -0
  346. data/docs/UpdateParticipantStateRequest.md +22 -0
  347. data/docs/UpdatePresentationRequest.md +22 -0
  348. data/docs/UpdateRecommendationStatusRequest.md +18 -0
  349. data/docs/UpdateRecordRequest.md +22 -0
  350. data/docs/UpdateRecordTypeRequest.md +26 -0
  351. data/docs/UpdateRoutineRequest.md +26 -0
  352. data/docs/UpdateRowRequest.md +18 -0
  353. data/docs/UpdateSheetRequest.md +30 -0
  354. data/docs/UpdateSlideElementRequest.md +32 -0
  355. data/docs/UpdateSlideRequest.md +32 -0
  356. data/docs/UpdateTaskRequest.md +34 -0
  357. data/docs/UpdateWorkspaceMemberRequest.md +18 -0
  358. data/docs/UpdateWorkspaceRequest.md +24 -0
  359. data/docs/UploadChunkedBlockResponse.md +24 -0
  360. data/docs/UploadFileBase64Request.md +32 -0
  361. data/docs/UserInfoResponse.md +34 -0
  362. data/docs/ValidateKeyBindingRequest.md +22 -0
  363. data/docs/ValidateKeyBindingResponse.md +20 -0
  364. data/docs/Workspace.md +44 -0
  365. data/docs/WorkspaceEnvelope.md +18 -0
  366. data/docs/WorkspaceInvitation.md +34 -0
  367. data/docs/WorkspaceInvitationListResponse.md +18 -0
  368. data/docs/WorkspaceListResponse.md +20 -0
  369. data/docs/WorkspaceMember.md +30 -0
  370. data/docs/WorkspaceMemberListResponse.md +20 -0
  371. data/docs/WorkspaceOrganization.md +22 -0
  372. data/docs/WorkspacesApi.md +900 -0
  373. data/docs/WriteAppFileRequest.md +20 -0
  374. data/git_push.sh +57 -0
  375. data/lib/spatio-sdk/api/account_api.rb +703 -0
  376. data/lib/spatio-sdk/api/actions_api.rb +381 -0
  377. data/lib/spatio-sdk/api/agents_api.rb +824 -0
  378. data/lib/spatio-sdk/api/apps_api.rb +974 -0
  379. data/lib/spatio-sdk/api/calendar_api.rb +1015 -0
  380. data/lib/spatio-sdk/api/calls_api.rb +2016 -0
  381. data/lib/spatio-sdk/api/channels_api.rb +1165 -0
  382. data/lib/spatio-sdk/api/connections_api.rb +695 -0
  383. data/lib/spatio-sdk/api/contacts_api.rb +801 -0
  384. data/lib/spatio-sdk/api/conversations_api.rb +612 -0
  385. data/lib/spatio-sdk/api/direct_messages_api.rb +2167 -0
  386. data/lib/spatio-sdk/api/files_api.rb +2518 -0
  387. data/lib/spatio-sdk/api/folders_api.rb +409 -0
  388. data/lib/spatio-sdk/api/inbox_api.rb +403 -0
  389. data/lib/spatio-sdk/api/keybindings_api.rb +386 -0
  390. data/lib/spatio-sdk/api/logos_api.rb +210 -0
  391. data/lib/spatio-sdk/api/mail_api.rb +3780 -0
  392. data/lib/spatio-sdk/api/misc_api.rb +1100 -0
  393. data/lib/spatio-sdk/api/models_api.rb +456 -0
  394. data/lib/spatio-sdk/api/native_dm_api.rb +1396 -0
  395. data/lib/spatio-sdk/api/navigation_api.rb +77 -0
  396. data/lib/spatio-sdk/api/notes_api.rb +2418 -0
  397. data/lib/spatio-sdk/api/notifications_api.rb +143 -0
  398. data/lib/spatio-sdk/api/o_auth_api.rb +714 -0
  399. data/lib/spatio-sdk/api/organizations_api.rb +1913 -0
  400. data/lib/spatio-sdk/api/personal_access_tokens_api.rb +625 -0
  401. data/lib/spatio-sdk/api/platforms_api.rb +981 -0
  402. data/lib/spatio-sdk/api/realtime_api.rb +86 -0
  403. data/lib/spatio-sdk/api/recommendations_api.rb +346 -0
  404. data/lib/spatio-sdk/api/records_api.rb +550 -0
  405. data/lib/spatio-sdk/api/repo_api.rb +2167 -0
  406. data/lib/spatio-sdk/api/resources_api.rb +240 -0
  407. data/lib/spatio-sdk/api/routines_api.rb +670 -0
  408. data/lib/spatio-sdk/api/search_api.rb +90 -0
  409. data/lib/spatio-sdk/api/settings_api.rb +706 -0
  410. data/lib/spatio-sdk/api/sheets_api.rb +817 -0
  411. data/lib/spatio-sdk/api/slides_api.rb +1692 -0
  412. data/lib/spatio-sdk/api/tasks_api.rb +1787 -0
  413. data/lib/spatio-sdk/api/terminal_api.rb +337 -0
  414. data/lib/spatio-sdk/api/workspaces_api.rb +876 -0
  415. data/lib/spatio-sdk/api_client.rb +441 -0
  416. data/lib/spatio-sdk/api_error.rb +58 -0
  417. data/lib/spatio-sdk/api_model_base.rb +88 -0
  418. data/lib/spatio-sdk/configuration.rb +393 -0
  419. data/lib/spatio-sdk/models/accept_organization_invitation_request.rb +164 -0
  420. data/lib/spatio-sdk/models/account_choice.rb +200 -0
  421. data/lib/spatio-sdk/models/account_error.rb +191 -0
  422. data/lib/spatio-sdk/models/account_list_response.rb +171 -0
  423. data/lib/spatio-sdk/models/account_plan.rb +228 -0
  424. data/lib/spatio-sdk/models/account_status.rb +273 -0
  425. data/lib/spatio-sdk/models/account_tier_details.rb +291 -0
  426. data/lib/spatio-sdk/models/account_usage.rb +229 -0
  427. data/lib/spatio-sdk/models/action_descriptor.rb +230 -0
  428. data/lib/spatio-sdk/models/add_organization_member_request.rb +216 -0
  429. data/lib/spatio-sdk/models/add_workspace_member_request.rb +214 -0
  430. data/lib/spatio-sdk/models/agent.rb +268 -0
  431. data/lib/spatio-sdk/models/agent_conversation.rb +212 -0
  432. data/lib/spatio-sdk/models/agent_conversation_list_response.rb +175 -0
  433. data/lib/spatio-sdk/models/agent_list_response.rb +179 -0
  434. data/lib/spatio-sdk/models/agent_message.rb +228 -0
  435. data/lib/spatio-sdk/models/agent_message_list_response.rb +175 -0
  436. data/lib/spatio-sdk/models/agent_session_context.rb +185 -0
  437. data/lib/spatio-sdk/models/agent_task_usage.rb +204 -0
  438. data/lib/spatio-sdk/models/ambiguous_account_error.rb +194 -0
  439. data/lib/spatio-sdk/models/api_error.rb +176 -0
  440. data/lib/spatio-sdk/models/app.rb +228 -0
  441. data/lib/spatio-sdk/models/app_file_content_response.rb +173 -0
  442. data/lib/spatio-sdk/models/app_file_list_response.rb +152 -0
  443. data/lib/spatio-sdk/models/app_list_response.rb +161 -0
  444. data/lib/spatio-sdk/models/assign_contact_category_request.rb +164 -0
  445. data/lib/spatio-sdk/models/attachment.rb +217 -0
  446. data/lib/spatio-sdk/models/attachment_input.rb +227 -0
  447. data/lib/spatio-sdk/models/attachment_meta.rb +243 -0
  448. data/lib/spatio-sdk/models/attendee.rb +292 -0
  449. data/lib/spatio-sdk/models/attendee_role.rb +41 -0
  450. data/lib/spatio-sdk/models/attendee_status.rb +42 -0
  451. data/lib/spatio-sdk/models/block.rb +390 -0
  452. data/lib/spatio-sdk/models/block_content.rb +252 -0
  453. data/lib/spatio-sdk/models/block_list_response.rb +193 -0
  454. data/lib/spatio-sdk/models/block_type.rb +61 -0
  455. data/lib/spatio-sdk/models/bulk_archive_request.rb +175 -0
  456. data/lib/spatio-sdk/models/bulk_archive_response.rb +222 -0
  457. data/lib/spatio-sdk/models/bulk_archive_response_failed_inner.rb +190 -0
  458. data/lib/spatio-sdk/models/bulk_delete_emails_request.rb +185 -0
  459. data/lib/spatio-sdk/models/bulk_delete_emails_response.rb +221 -0
  460. data/lib/spatio-sdk/models/bulk_delete_files_request.rb +180 -0
  461. data/lib/spatio-sdk/models/bulk_delete_tasks_request.rb +181 -0
  462. data/lib/spatio-sdk/models/bulk_delete_tasks_response.rb +247 -0
  463. data/lib/spatio-sdk/models/bulk_delete_tasks_response_failed_inner.rb +190 -0
  464. data/lib/spatio-sdk/models/bulk_files_response.rb +247 -0
  465. data/lib/spatio-sdk/models/bulk_files_response_failed_inner.rb +190 -0
  466. data/lib/spatio-sdk/models/bulk_mark_read_request.rb +187 -0
  467. data/lib/spatio-sdk/models/bulk_mark_read_response.rb +194 -0
  468. data/lib/spatio-sdk/models/bulk_mark_read_response_failed_inner.rb +190 -0
  469. data/lib/spatio-sdk/models/bulk_move_files_request.rb +191 -0
  470. data/lib/spatio-sdk/models/bulk_update_tasks_request.rb +213 -0
  471. data/lib/spatio-sdk/models/bulk_update_tasks_response.rb +246 -0
  472. data/lib/spatio-sdk/models/calendar_account_error.rb +242 -0
  473. data/lib/spatio-sdk/models/calendar_capabilities_response.rb +219 -0
  474. data/lib/spatio-sdk/models/calendar_operation_result.rb +198 -0
  475. data/lib/spatio-sdk/models/calendar_provider_info.rb +220 -0
  476. data/lib/spatio-sdk/models/calendar_providers_info.rb +167 -0
  477. data/lib/spatio-sdk/models/calendar_sync_response.rb +222 -0
  478. data/lib/spatio-sdk/models/call_list_response.rb +161 -0
  479. data/lib/spatio-sdk/models/call_recording.rb +222 -0
  480. data/lib/spatio-sdk/models/call_recording_list_response.rb +152 -0
  481. data/lib/spatio-sdk/models/cell.rb +204 -0
  482. data/lib/spatio-sdk/models/change_password_request.rb +174 -0
  483. data/lib/spatio-sdk/models/channel.rb +325 -0
  484. data/lib/spatio-sdk/models/channel_membership_request.rb +148 -0
  485. data/lib/spatio-sdk/models/chat_action_definition.rb +278 -0
  486. data/lib/spatio-sdk/models/chat_actions_list.rb +166 -0
  487. data/lib/spatio-sdk/models/chat_message.rb +317 -0
  488. data/lib/spatio-sdk/models/chat_user.rb +287 -0
  489. data/lib/spatio-sdk/models/chunked_file_manifest.rb +324 -0
  490. data/lib/spatio-sdk/models/client_registration_request.rb +314 -0
  491. data/lib/spatio-sdk/models/client_registration_response.rb +329 -0
  492. data/lib/spatio-sdk/models/comment.rb +315 -0
  493. data/lib/spatio-sdk/models/comment_author.rb +226 -0
  494. data/lib/spatio-sdk/models/comment_list_response.rb +192 -0
  495. data/lib/spatio-sdk/models/comment_mutation_response.rb +191 -0
  496. data/lib/spatio-sdk/models/comment_response.rb +165 -0
  497. data/lib/spatio-sdk/models/commit_chunked_upload_request.rb +164 -0
  498. data/lib/spatio-sdk/models/commit_chunked_upload_response.rb +313 -0
  499. data/lib/spatio-sdk/models/conference_data.rb +229 -0
  500. data/lib/spatio-sdk/models/connected_app_item.rb +308 -0
  501. data/lib/spatio-sdk/models/connected_apps_list_response.rb +166 -0
  502. data/lib/spatio-sdk/models/connection_account_list_response.rb +172 -0
  503. data/lib/spatio-sdk/models/connection_list_response.rb +177 -0
  504. data/lib/spatio-sdk/models/consume_agent_task_response.rb +204 -0
  505. data/lib/spatio-sdk/models/contact.rb +294 -0
  506. data/lib/spatio-sdk/models/contact_category.rb +217 -0
  507. data/lib/spatio-sdk/models/contact_category_list_response.rb +152 -0
  508. data/lib/spatio-sdk/models/contact_list_response.rb +184 -0
  509. data/lib/spatio-sdk/models/contact_provider.rb +217 -0
  510. data/lib/spatio-sdk/models/contact_provider_list_response.rb +166 -0
  511. data/lib/spatio-sdk/models/conversation.rb +314 -0
  512. data/lib/spatio-sdk/models/conversation_message.rb +246 -0
  513. data/lib/spatio-sdk/models/core_action.rb +221 -0
  514. data/lib/spatio-sdk/models/core_action_list_response.rb +161 -0
  515. data/lib/spatio-sdk/models/create_agent_conversation_request.rb +167 -0
  516. data/lib/spatio-sdk/models/create_agent_message_request.rb +201 -0
  517. data/lib/spatio-sdk/models/create_agent_request.rb +222 -0
  518. data/lib/spatio-sdk/models/create_app_request.rb +200 -0
  519. data/lib/spatio-sdk/models/create_block_request.rb +260 -0
  520. data/lib/spatio-sdk/models/create_calendar_event201_response.rb +202 -0
  521. data/lib/spatio-sdk/models/create_call_request.rb +176 -0
  522. data/lib/spatio-sdk/models/create_channel_request.rb +191 -0
  523. data/lib/spatio-sdk/models/create_channel_response.rb +190 -0
  524. data/lib/spatio-sdk/models/create_comment_request.rb +177 -0
  525. data/lib/spatio-sdk/models/create_contact_category_request.rb +182 -0
  526. data/lib/spatio-sdk/models/create_contact_request.rb +212 -0
  527. data/lib/spatio-sdk/models/create_conversation_request.rb +185 -0
  528. data/lib/spatio-sdk/models/create_draft_request.rb +248 -0
  529. data/lib/spatio-sdk/models/create_email_folder_request.rb +173 -0
  530. data/lib/spatio-sdk/models/create_event_request.rb +254 -0
  531. data/lib/spatio-sdk/models/create_folder_request.rb +201 -0
  532. data/lib/spatio-sdk/models/create_label_request.rb +200 -0
  533. data/lib/spatio-sdk/models/create_label_response.rb +190 -0
  534. data/lib/spatio-sdk/models/create_meeting_room_request.rb +173 -0
  535. data/lib/spatio-sdk/models/create_note400_response.rb +104 -0
  536. data/lib/spatio-sdk/models/create_note_request.rb +232 -0
  537. data/lib/spatio-sdk/models/create_organization_invitation_request.rb +224 -0
  538. data/lib/spatio-sdk/models/create_organization_request.rb +211 -0
  539. data/lib/spatio-sdk/models/create_pat_request.rb +202 -0
  540. data/lib/spatio-sdk/models/create_pat_response.rb +174 -0
  541. data/lib/spatio-sdk/models/create_presentation_request.rb +200 -0
  542. data/lib/spatio-sdk/models/create_record_request.rb +204 -0
  543. data/lib/spatio-sdk/models/create_record_type_request.rb +211 -0
  544. data/lib/spatio-sdk/models/create_routine_request.rb +204 -0
  545. data/lib/spatio-sdk/models/create_row_request.rb +176 -0
  546. data/lib/spatio-sdk/models/create_sheet_request.rb +222 -0
  547. data/lib/spatio-sdk/models/create_slide_element_request.rb +229 -0
  548. data/lib/spatio-sdk/models/create_slide_request.rb +220 -0
  549. data/lib/spatio-sdk/models/create_task_request.rb +322 -0
  550. data/lib/spatio-sdk/models/create_workspace_invitation_request.rb +214 -0
  551. data/lib/spatio-sdk/models/create_workspace_request.rb +191 -0
  552. data/lib/spatio-sdk/models/disconnect_connection_request.rb +173 -0
  553. data/lib/spatio-sdk/models/discovery_document.rb +404 -0
  554. data/lib/spatio-sdk/models/dm_attach_request.rb +254 -0
  555. data/lib/spatio-sdk/models/dm_forward_request.rb +166 -0
  556. data/lib/spatio-sdk/models/dm_mark_read_request.rb +173 -0
  557. data/lib/spatio-sdk/models/dm_message_envelope.rb +165 -0
  558. data/lib/spatio-sdk/models/dm_mute_request.rb +166 -0
  559. data/lib/spatio-sdk/models/dm_mute_response.rb +148 -0
  560. data/lib/spatio-sdk/models/dm_pinned_list.rb +149 -0
  561. data/lib/spatio-sdk/models/dm_reaction_request.rb +173 -0
  562. data/lib/spatio-sdk/models/dm_reaction_response.rb +150 -0
  563. data/lib/spatio-sdk/models/dm_search_results.rb +149 -0
  564. data/lib/spatio-sdk/models/dm_set_draft_request.rb +173 -0
  565. data/lib/spatio-sdk/models/dm_thread_reply_request.rb +173 -0
  566. data/lib/spatio-sdk/models/download_file_response.rb +191 -0
  567. data/lib/spatio-sdk/models/draft.rb +339 -0
  568. data/lib/spatio-sdk/models/draft_response.rb +190 -0
  569. data/lib/spatio-sdk/models/email.rb +488 -0
  570. data/lib/spatio-sdk/models/email_folder.rb +202 -0
  571. data/lib/spatio-sdk/models/email_folder_list_response.rb +152 -0
  572. data/lib/spatio-sdk/models/enable_share_request.rb +157 -0
  573. data/lib/spatio-sdk/models/execute_action_request.rb +185 -0
  574. data/lib/spatio-sdk/models/execute_action_response.rb +168 -0
  575. data/lib/spatio-sdk/models/execute_chat_action_request.rb +175 -0
  576. data/lib/spatio-sdk/models/execute_chat_action_response.rb +175 -0
  577. data/lib/spatio-sdk/models/export_pdf_request.rb +162 -0
  578. data/lib/spatio-sdk/models/export_pdf_request_rasterized_slides_inner.rb +191 -0
  579. data/lib/spatio-sdk/models/export_pdfr2_response.rb +269 -0
  580. data/lib/spatio-sdk/models/extract_text_result.rb +212 -0
  581. data/lib/spatio-sdk/models/federated_search200_response.rb +270 -0
  582. data/lib/spatio-sdk/models/federated_search200_response_items_inner.rb +237 -0
  583. data/lib/spatio-sdk/models/federated_search200_response_per_platform_value.rb +156 -0
  584. data/lib/spatio-sdk/models/federated_search_request.rb +276 -0
  585. data/lib/spatio-sdk/models/file_list_envelope.rb +181 -0
  586. data/lib/spatio-sdk/models/files_and_folders_response.rb +235 -0
  587. data/lib/spatio-sdk/models/folder.rb +297 -0
  588. data/lib/spatio-sdk/models/folder_list_envelope.rb +181 -0
  589. data/lib/spatio-sdk/models/get_chat_user_response.rb +190 -0
  590. data/lib/spatio-sdk/models/get_domain_logo200_response.rb +190 -0
  591. data/lib/spatio-sdk/models/get_email_response.rb +190 -0
  592. data/lib/spatio-sdk/models/get_thread_response.rb +190 -0
  593. data/lib/spatio-sdk/models/inbox_counts.rb +216 -0
  594. data/lib/spatio-sdk/models/inbox_item.rb +275 -0
  595. data/lib/spatio-sdk/models/inbox_list_response.rb +218 -0
  596. data/lib/spatio-sdk/models/init_chunked_upload_request.rb +273 -0
  597. data/lib/spatio-sdk/models/init_chunked_upload_response.rb +273 -0
  598. data/lib/spatio-sdk/models/install_connection_request.rb +184 -0
  599. data/lib/spatio-sdk/models/introspection_response.rb +219 -0
  600. data/lib/spatio-sdk/models/issue_collaboration_token200_response.rb +254 -0
  601. data/lib/spatio-sdk/models/issue_collaboration_token_request.rb +148 -0
  602. data/lib/spatio-sdk/models/jwk.rb +297 -0
  603. data/lib/spatio-sdk/models/jwks.rb +166 -0
  604. data/lib/spatio-sdk/models/key_binding.rb +276 -0
  605. data/lib/spatio-sdk/models/key_binding_list_response.rb +166 -0
  606. data/lib/spatio-sdk/models/label.rb +244 -0
  607. data/lib/spatio-sdk/models/label_color.rb +190 -0
  608. data/lib/spatio-sdk/models/link_repo_task_request.rb +164 -0
  609. data/lib/spatio-sdk/models/list_calendar_events200_response.rb +202 -0
  610. data/lib/spatio-sdk/models/list_channels_response.rb +212 -0
  611. data/lib/spatio-sdk/models/list_chat_users_response.rb +211 -0
  612. data/lib/spatio-sdk/models/list_drafts_response.rb +227 -0
  613. data/lib/spatio-sdk/models/list_emails_response.rb +213 -0
  614. data/lib/spatio-sdk/models/list_events_data.rb +196 -0
  615. data/lib/spatio-sdk/models/list_labels_response.rb +192 -0
  616. data/lib/spatio-sdk/models/list_messages_response.rb +211 -0
  617. data/lib/spatio-sdk/models/meeting_room.rb +191 -0
  618. data/lib/spatio-sdk/models/move_block_request.rb +175 -0
  619. data/lib/spatio-sdk/models/move_emails_request.rb +166 -0
  620. data/lib/spatio-sdk/models/move_file_request.rb +149 -0
  621. data/lib/spatio-sdk/models/move_file_response.rb +164 -0
  622. data/lib/spatio-sdk/models/note.rb +380 -0
  623. data/lib/spatio-sdk/models/note_list_envelope.rb +195 -0
  624. data/lib/spatio-sdk/models/o_auth_error.rb +197 -0
  625. data/lib/spatio-sdk/models/organization.rb +346 -0
  626. data/lib/spatio-sdk/models/organization_detail_legacy.rb +377 -0
  627. data/lib/spatio-sdk/models/organization_invitation.rb +343 -0
  628. data/lib/spatio-sdk/models/organization_invitation_list_response.rb +166 -0
  629. data/lib/spatio-sdk/models/organization_list_response.rb +166 -0
  630. data/lib/spatio-sdk/models/organization_member.rb +288 -0
  631. data/lib/spatio-sdk/models/organization_member_invited_by.rb +105 -0
  632. data/lib/spatio-sdk/models/organization_member_list_response.rb +192 -0
  633. data/lib/spatio-sdk/models/organization_workspaces_inner.rb +216 -0
  634. data/lib/spatio-sdk/models/password_required_error.rb +218 -0
  635. data/lib/spatio-sdk/models/pat_list_response.rb +177 -0
  636. data/lib/spatio-sdk/models/pat_scopes_response.rb +166 -0
  637. data/lib/spatio-sdk/models/personal_access_token.rb +241 -0
  638. data/lib/spatio-sdk/models/preconfigured_agent.rb +236 -0
  639. data/lib/spatio-sdk/models/presentation.rb +308 -0
  640. data/lib/spatio-sdk/models/presentation_list_envelope.rb +194 -0
  641. data/lib/spatio-sdk/models/propose_recommendation_request.rb +211 -0
  642. data/lib/spatio-sdk/models/public_invitation_payload.rb +365 -0
  643. data/lib/spatio-sdk/models/quota_exceeded_error.rb +183 -0
  644. data/lib/spatio-sdk/models/recommendation.rb +300 -0
  645. data/lib/spatio-sdk/models/recommendation_list_response.rb +166 -0
  646. data/lib/spatio-sdk/models/record.rb +231 -0
  647. data/lib/spatio-sdk/models/record_list_response.rb +184 -0
  648. data/lib/spatio-sdk/models/record_type.rb +256 -0
  649. data/lib/spatio-sdk/models/record_type_list_response.rb +166 -0
  650. data/lib/spatio-sdk/models/refresh_connection_request.rb +173 -0
  651. data/lib/spatio-sdk/models/reminder.rb +213 -0
  652. data/lib/spatio-sdk/models/reminder_method.rb +42 -0
  653. data/lib/spatio-sdk/models/reply_email_request.rb +227 -0
  654. data/lib/spatio-sdk/models/revoke_other_sessions_response.rb +148 -0
  655. data/lib/spatio-sdk/models/rich_text_object.rb +216 -0
  656. data/lib/spatio-sdk/models/routine.rb +240 -0
  657. data/lib/spatio-sdk/models/routine_list_response.rb +166 -0
  658. data/lib/spatio-sdk/models/routine_run.rb +221 -0
  659. data/lib/spatio-sdk/models/routine_run_complete_request.rb +158 -0
  660. data/lib/spatio-sdk/models/routine_run_list_response.rb +166 -0
  661. data/lib/spatio-sdk/models/routine_run_progress_request.rb +158 -0
  662. data/lib/spatio-sdk/models/row.rb +194 -0
  663. data/lib/spatio-sdk/models/row_list.rb +192 -0
  664. data/lib/spatio-sdk/models/save_message_request.rb +201 -0
  665. data/lib/spatio-sdk/models/search_emails_response.rb +212 -0
  666. data/lib/spatio-sdk/models/search_files_response.rb +229 -0
  667. data/lib/spatio-sdk/models/send_chat_message_request.rb +221 -0
  668. data/lib/spatio-sdk/models/send_chat_message_response.rb +243 -0
  669. data/lib/spatio-sdk/models/send_email_request.rb +289 -0
  670. data/lib/spatio-sdk/models/send_email_response.rb +234 -0
  671. data/lib/spatio-sdk/models/session.rb +254 -0
  672. data/lib/spatio-sdk/models/session_list_response.rb +166 -0
  673. data/lib/spatio-sdk/models/share_settings.rb +221 -0
  674. data/lib/spatio-sdk/models/sheet.rb +446 -0
  675. data/lib/spatio-sdk/models/sheet_list_envelope.rb +195 -0
  676. data/lib/spatio-sdk/models/sign_in_methods.rb +201 -0
  677. data/lib/spatio-sdk/models/sign_in_methods_providers_inner.rb +193 -0
  678. data/lib/spatio-sdk/models/slide.rb +370 -0
  679. data/lib/spatio-sdk/models/slide_element.rb +455 -0
  680. data/lib/spatio-sdk/models/slide_element_list.rb +192 -0
  681. data/lib/spatio-sdk/models/slide_list.rb +192 -0
  682. data/lib/spatio-sdk/models/spatio_call.rb +259 -0
  683. data/lib/spatio-sdk/models/spatio_connection.rb +260 -0
  684. data/lib/spatio-sdk/models/spatio_event.rb +686 -0
  685. data/lib/spatio-sdk/models/spatio_file.rb +372 -0
  686. data/lib/spatio-sdk/models/spatio_thread.rb +212 -0
  687. data/lib/spatio-sdk/models/success_flag.rb +165 -0
  688. data/lib/spatio-sdk/models/task.rb +471 -0
  689. data/lib/spatio-sdk/models/task_comment.rb +294 -0
  690. data/lib/spatio-sdk/models/task_comment_author.rb +226 -0
  691. data/lib/spatio-sdk/models/task_comment_list.rb +192 -0
  692. data/lib/spatio-sdk/models/task_comment_mutation_response.rb +190 -0
  693. data/lib/spatio-sdk/models/task_comment_request.rb +164 -0
  694. data/lib/spatio-sdk/models/task_list_envelope.rb +195 -0
  695. data/lib/spatio-sdk/models/task_providers_info.rb +194 -0
  696. data/lib/spatio-sdk/models/task_providers_info_platform.rb +190 -0
  697. data/lib/spatio-sdk/models/text_annotations.rb +278 -0
  698. data/lib/spatio-sdk/models/token_response.rb +246 -0
  699. data/lib/spatio-sdk/models/update_account_request.rb +158 -0
  700. data/lib/spatio-sdk/models/update_agent_request.rb +205 -0
  701. data/lib/spatio-sdk/models/update_app_request.rb +174 -0
  702. data/lib/spatio-sdk/models/update_block_request.rb +168 -0
  703. data/lib/spatio-sdk/models/update_cell_request.rb +151 -0
  704. data/lib/spatio-sdk/models/update_comment_request.rb +157 -0
  705. data/lib/spatio-sdk/models/update_contact_category_request.rb +165 -0
  706. data/lib/spatio-sdk/models/update_contact_request.rb +212 -0
  707. data/lib/spatio-sdk/models/update_conversation_request.rb +183 -0
  708. data/lib/spatio-sdk/models/update_draft_request.rb +219 -0
  709. data/lib/spatio-sdk/models/update_email_folder_request.rb +147 -0
  710. data/lib/spatio-sdk/models/update_email_request.rb +188 -0
  711. data/lib/spatio-sdk/models/update_email_response.rb +190 -0
  712. data/lib/spatio-sdk/models/update_event_request.rb +236 -0
  713. data/lib/spatio-sdk/models/update_file_request.rb +169 -0
  714. data/lib/spatio-sdk/models/update_key_binding_request.rb +175 -0
  715. data/lib/spatio-sdk/models/update_message_metadata_request.rb +175 -0
  716. data/lib/spatio-sdk/models/update_note_request.rb +205 -0
  717. data/lib/spatio-sdk/models/update_organization_member_request.rb +188 -0
  718. data/lib/spatio-sdk/models/update_organization_request.rb +166 -0
  719. data/lib/spatio-sdk/models/update_participant_state_request.rb +166 -0
  720. data/lib/spatio-sdk/models/update_pat_request.rb +156 -0
  721. data/lib/spatio-sdk/models/update_presentation_request.rb +166 -0
  722. data/lib/spatio-sdk/models/update_recommendation_status_request.rb +188 -0
  723. data/lib/spatio-sdk/models/update_record_request.rb +169 -0
  724. data/lib/spatio-sdk/models/update_record_type_request.rb +185 -0
  725. data/lib/spatio-sdk/models/update_routine_request.rb +187 -0
  726. data/lib/spatio-sdk/models/update_row_request.rb +167 -0
  727. data/lib/spatio-sdk/models/update_sheet_request.rb +205 -0
  728. data/lib/spatio-sdk/models/update_slide_element_request.rb +213 -0
  729. data/lib/spatio-sdk/models/update_slide_request.rb +211 -0
  730. data/lib/spatio-sdk/models/update_task_request.rb +260 -0
  731. data/lib/spatio-sdk/models/update_workspace_member_request.rb +188 -0
  732. data/lib/spatio-sdk/models/update_workspace_request.rb +176 -0
  733. data/lib/spatio-sdk/models/upload_chunked_block_response.rb +243 -0
  734. data/lib/spatio-sdk/models/upload_file_base64_request.rb +265 -0
  735. data/lib/spatio-sdk/models/user_info_response.rb +237 -0
  736. data/lib/spatio-sdk/models/validate_key_binding_request.rb +201 -0
  737. data/lib/spatio-sdk/models/validate_key_binding_response.rb +175 -0
  738. data/lib/spatio-sdk/models/workspace.rb +321 -0
  739. data/lib/spatio-sdk/models/workspace_envelope.rb +164 -0
  740. data/lib/spatio-sdk/models/workspace_invitation.rb +324 -0
  741. data/lib/spatio-sdk/models/workspace_invitation_list_response.rb +166 -0
  742. data/lib/spatio-sdk/models/workspace_list_response.rb +175 -0
  743. data/lib/spatio-sdk/models/workspace_member.rb +278 -0
  744. data/lib/spatio-sdk/models/workspace_member_list_response.rb +175 -0
  745. data/lib/spatio-sdk/models/workspace_organization.rb +166 -0
  746. data/lib/spatio-sdk/models/write_app_file_request.rb +190 -0
  747. data/lib/spatio-sdk/version.rb +15 -0
  748. data/lib/spatio-sdk.rb +408 -0
  749. data/spatio-sdk.gemspec +41 -0
  750. data/spec/api/account_api_spec.rb +158 -0
  751. data/spec/api/actions_api_spec.rb +99 -0
  752. data/spec/api/agents_api_spec.rb +176 -0
  753. data/spec/api/apps_api_spec.rb +198 -0
  754. data/spec/api/calendar_api_spec.rb +217 -0
  755. data/spec/api/calls_api_spec.rb +378 -0
  756. data/spec/api/channels_api_spec.rb +236 -0
  757. data/spec/api/connections_api_spec.rb +154 -0
  758. data/spec/api/contacts_api_spec.rb +172 -0
  759. data/spec/api/conversations_api_spec.rb +140 -0
  760. data/spec/api/direct_messages_api_spec.rb +420 -0
  761. data/spec/api/files_api_spec.rb +494 -0
  762. data/spec/api/folders_api_spec.rb +102 -0
  763. data/spec/api/inbox_api_spec.rb +103 -0
  764. data/spec/api/keybindings_api_spec.rb +99 -0
  765. data/spec/api/logos_api_spec.rb +68 -0
  766. data/spec/api/mail_api_spec.rb +701 -0
  767. data/spec/api/misc_api_spec.rb +228 -0
  768. data/spec/api/models_api_spec.rb +112 -0
  769. data/spec/api/native_dm_api_spec.rb +276 -0
  770. data/spec/api/navigation_api_spec.rb +45 -0
  771. data/spec/api/notes_api_spec.rb +474 -0
  772. data/spec/api/notifications_api_spec.rb +56 -0
  773. data/spec/api/o_auth_api_spec.rb +161 -0
  774. data/spec/api/organizations_api_spec.rb +367 -0
  775. data/spec/api/personal_access_tokens_api_spec.rb +137 -0
  776. data/spec/api/platforms_api_spec.rb +204 -0
  777. data/spec/api/realtime_api_spec.rb +47 -0
  778. data/spec/api/recommendations_api_spec.rb +93 -0
  779. data/spec/api/records_api_spec.rb +127 -0
  780. data/spec/api/repo_api_spec.rb +402 -0
  781. data/spec/api/resources_api_spec.rb +73 -0
  782. data/spec/api/routines_api_spec.rb +149 -0
  783. data/spec/api/search_api_spec.rb +47 -0
  784. data/spec/api/settings_api_spec.rb +154 -0
  785. data/spec/api/sheets_api_spec.rb +184 -0
  786. data/spec/api/slides_api_spec.rb +355 -0
  787. data/spec/api/tasks_api_spec.rb +355 -0
  788. data/spec/api/terminal_api_spec.rb +90 -0
  789. data/spec/api/workspaces_api_spec.rb +184 -0
  790. data/spec/models/accept_organization_invitation_request_spec.rb +36 -0
  791. data/spec/models/account_choice_spec.rb +48 -0
  792. data/spec/models/account_error_spec.rb +42 -0
  793. data/spec/models/account_list_response_spec.rb +48 -0
  794. data/spec/models/account_plan_spec.rb +54 -0
  795. data/spec/models/account_status_spec.rb +70 -0
  796. data/spec/models/account_tier_details_spec.rb +120 -0
  797. data/spec/models/account_usage_spec.rb +78 -0
  798. data/spec/models/action_descriptor_spec.rb +78 -0
  799. data/spec/models/add_organization_member_request_spec.rb +52 -0
  800. data/spec/models/add_workspace_member_request_spec.rb +46 -0
  801. data/spec/models/agent_conversation_list_response_spec.rb +42 -0
  802. data/spec/models/agent_conversation_spec.rb +66 -0
  803. data/spec/models/agent_list_response_spec.rb +54 -0
  804. data/spec/models/agent_message_list_response_spec.rb +42 -0
  805. data/spec/models/agent_message_spec.rb +66 -0
  806. data/spec/models/agent_session_context_spec.rb +54 -0
  807. data/spec/models/agent_spec.rb +102 -0
  808. data/spec/models/agent_task_usage_spec.rb +60 -0
  809. data/spec/models/ambiguous_account_error_spec.rb +48 -0
  810. data/spec/models/api_error_spec.rb +42 -0
  811. data/spec/models/app_file_content_response_spec.rb +42 -0
  812. data/spec/models/app_file_list_response_spec.rb +36 -0
  813. data/spec/models/app_list_response_spec.rb +42 -0
  814. data/spec/models/app_spec.rb +78 -0
  815. data/spec/models/assign_contact_category_request_spec.rb +36 -0
  816. data/spec/models/attachment_input_spec.rb +54 -0
  817. data/spec/models/attachment_meta_spec.rb +54 -0
  818. data/spec/models/attachment_spec.rb +60 -0
  819. data/spec/models/attendee_role_spec.rb +30 -0
  820. data/spec/models/attendee_spec.rb +72 -0
  821. data/spec/models/attendee_status_spec.rb +30 -0
  822. data/spec/models/block_content_spec.rb +96 -0
  823. data/spec/models/block_list_response_spec.rb +42 -0
  824. data/spec/models/block_spec.rb +90 -0
  825. data/spec/models/block_type_spec.rb +30 -0
  826. data/spec/models/bulk_archive_request_spec.rb +42 -0
  827. data/spec/models/bulk_archive_response_failed_inner_spec.rb +42 -0
  828. data/spec/models/bulk_archive_response_spec.rb +48 -0
  829. data/spec/models/bulk_delete_emails_request_spec.rb +48 -0
  830. data/spec/models/bulk_delete_emails_response_spec.rb +48 -0
  831. data/spec/models/bulk_delete_files_request_spec.rb +54 -0
  832. data/spec/models/bulk_delete_tasks_request_spec.rb +54 -0
  833. data/spec/models/bulk_delete_tasks_response_failed_inner_spec.rb +42 -0
  834. data/spec/models/bulk_delete_tasks_response_spec.rb +54 -0
  835. data/spec/models/bulk_files_response_failed_inner_spec.rb +42 -0
  836. data/spec/models/bulk_files_response_spec.rb +54 -0
  837. data/spec/models/bulk_mark_read_request_spec.rb +48 -0
  838. data/spec/models/bulk_mark_read_response_failed_inner_spec.rb +42 -0
  839. data/spec/models/bulk_mark_read_response_spec.rb +42 -0
  840. data/spec/models/bulk_move_files_request_spec.rb +60 -0
  841. data/spec/models/bulk_update_tasks_request_spec.rb +54 -0
  842. data/spec/models/bulk_update_tasks_response_spec.rb +54 -0
  843. data/spec/models/calendar_account_error_spec.rb +54 -0
  844. data/spec/models/calendar_capabilities_response_spec.rb +48 -0
  845. data/spec/models/calendar_operation_result_spec.rb +54 -0
  846. data/spec/models/calendar_provider_info_spec.rb +60 -0
  847. data/spec/models/calendar_providers_info_spec.rb +36 -0
  848. data/spec/models/calendar_sync_response_spec.rb +60 -0
  849. data/spec/models/call_list_response_spec.rb +42 -0
  850. data/spec/models/call_recording_list_response_spec.rb +36 -0
  851. data/spec/models/call_recording_spec.rb +72 -0
  852. data/spec/models/cell_spec.rb +48 -0
  853. data/spec/models/change_password_request_spec.rb +42 -0
  854. data/spec/models/channel_membership_request_spec.rb +36 -0
  855. data/spec/models/channel_spec.rb +96 -0
  856. data/spec/models/chat_action_definition_spec.rb +84 -0
  857. data/spec/models/chat_actions_list_spec.rb +36 -0
  858. data/spec/models/chat_message_spec.rb +90 -0
  859. data/spec/models/chat_user_spec.rb +84 -0
  860. data/spec/models/chunked_file_manifest_spec.rb +84 -0
  861. data/spec/models/client_registration_request_spec.rb +94 -0
  862. data/spec/models/client_registration_response_spec.rb +96 -0
  863. data/spec/models/comment_author_spec.rb +54 -0
  864. data/spec/models/comment_list_response_spec.rb +42 -0
  865. data/spec/models/comment_mutation_response_spec.rb +42 -0
  866. data/spec/models/comment_response_spec.rb +36 -0
  867. data/spec/models/comment_spec.rb +78 -0
  868. data/spec/models/commit_chunked_upload_request_spec.rb +36 -0
  869. data/spec/models/commit_chunked_upload_response_spec.rb +90 -0
  870. data/spec/models/conference_data_spec.rb +66 -0
  871. data/spec/models/connected_app_item_spec.rb +84 -0
  872. data/spec/models/connected_apps_list_response_spec.rb +36 -0
  873. data/spec/models/connection_account_list_response_spec.rb +48 -0
  874. data/spec/models/connection_list_response_spec.rb +42 -0
  875. data/spec/models/consume_agent_task_response_spec.rb +60 -0
  876. data/spec/models/contact_category_list_response_spec.rb +36 -0
  877. data/spec/models/contact_category_spec.rb +60 -0
  878. data/spec/models/contact_list_response_spec.rb +48 -0
  879. data/spec/models/contact_provider_list_response_spec.rb +36 -0
  880. data/spec/models/contact_provider_spec.rb +60 -0
  881. data/spec/models/contact_spec.rb +120 -0
  882. data/spec/models/conversation_message_spec.rb +66 -0
  883. data/spec/models/conversation_spec.rb +108 -0
  884. data/spec/models/core_action_list_response_spec.rb +42 -0
  885. data/spec/models/core_action_spec.rb +72 -0
  886. data/spec/models/create_agent_conversation_request_spec.rb +48 -0
  887. data/spec/models/create_agent_message_request_spec.rb +48 -0
  888. data/spec/models/create_agent_request_spec.rb +72 -0
  889. data/spec/models/create_app_request_spec.rb +60 -0
  890. data/spec/models/create_block_request_spec.rb +60 -0
  891. data/spec/models/create_calendar_event201_response_spec.rb +54 -0
  892. data/spec/models/create_call_request_spec.rb +54 -0
  893. data/spec/models/create_channel_request_spec.rb +54 -0
  894. data/spec/models/create_channel_response_spec.rb +42 -0
  895. data/spec/models/create_comment_request_spec.rb +54 -0
  896. data/spec/models/create_contact_category_request_spec.rb +48 -0
  897. data/spec/models/create_contact_request_spec.rb +78 -0
  898. data/spec/models/create_conversation_request_spec.rb +60 -0
  899. data/spec/models/create_draft_request_spec.rb +96 -0
  900. data/spec/models/create_email_folder_request_spec.rb +42 -0
  901. data/spec/models/create_event_request_spec.rb +64 -0
  902. data/spec/models/create_folder_request_spec.rb +60 -0
  903. data/spec/models/create_label_request_spec.rb +60 -0
  904. data/spec/models/create_label_response_spec.rb +42 -0
  905. data/spec/models/create_meeting_room_request_spec.rb +42 -0
  906. data/spec/models/create_note400_response_spec.rb +32 -0
  907. data/spec/models/create_note_request_spec.rb +78 -0
  908. data/spec/models/create_organization_invitation_request_spec.rb +52 -0
  909. data/spec/models/create_organization_request_spec.rb +66 -0
  910. data/spec/models/create_pat_request_spec.rb +60 -0
  911. data/spec/models/create_pat_response_spec.rb +42 -0
  912. data/spec/models/create_presentation_request_spec.rb +60 -0
  913. data/spec/models/create_record_request_spec.rb +60 -0
  914. data/spec/models/create_record_type_request_spec.rb +66 -0
  915. data/spec/models/create_routine_request_spec.rb +60 -0
  916. data/spec/models/create_row_request_spec.rb +42 -0
  917. data/spec/models/create_sheet_request_spec.rb +72 -0
  918. data/spec/models/create_slide_element_request_spec.rb +78 -0
  919. data/spec/models/create_slide_request_spec.rb +84 -0
  920. data/spec/models/create_task_request_spec.rb +118 -0
  921. data/spec/models/create_workspace_invitation_request_spec.rb +46 -0
  922. data/spec/models/create_workspace_request_spec.rb +54 -0
  923. data/spec/models/disconnect_connection_request_spec.rb +42 -0
  924. data/spec/models/discovery_document_spec.rb +138 -0
  925. data/spec/models/dm_attach_request_spec.rb +84 -0
  926. data/spec/models/dm_forward_request_spec.rb +48 -0
  927. data/spec/models/dm_mark_read_request_spec.rb +42 -0
  928. data/spec/models/dm_message_envelope_spec.rb +36 -0
  929. data/spec/models/dm_mute_request_spec.rb +48 -0
  930. data/spec/models/dm_mute_response_spec.rb +36 -0
  931. data/spec/models/dm_pinned_list_spec.rb +36 -0
  932. data/spec/models/dm_reaction_request_spec.rb +42 -0
  933. data/spec/models/dm_reaction_response_spec.rb +36 -0
  934. data/spec/models/dm_search_results_spec.rb +36 -0
  935. data/spec/models/dm_set_draft_request_spec.rb +42 -0
  936. data/spec/models/dm_thread_reply_request_spec.rb +42 -0
  937. data/spec/models/download_file_response_spec.rb +42 -0
  938. data/spec/models/draft_response_spec.rb +42 -0
  939. data/spec/models/draft_spec.rb +102 -0
  940. data/spec/models/email_folder_list_response_spec.rb +36 -0
  941. data/spec/models/email_folder_spec.rb +60 -0
  942. data/spec/models/email_spec.rb +150 -0
  943. data/spec/models/enable_share_request_spec.rb +42 -0
  944. data/spec/models/execute_action_request_spec.rb +48 -0
  945. data/spec/models/execute_action_response_spec.rb +48 -0
  946. data/spec/models/execute_chat_action_request_spec.rb +42 -0
  947. data/spec/models/execute_chat_action_response_spec.rb +42 -0
  948. data/spec/models/export_pdf_request_rasterized_slides_inner_spec.rb +42 -0
  949. data/spec/models/export_pdf_request_spec.rb +42 -0
  950. data/spec/models/export_pdfr2_response_spec.rb +58 -0
  951. data/spec/models/extract_text_result_spec.rb +54 -0
  952. data/spec/models/federated_search200_response_items_inner_spec.rb +96 -0
  953. data/spec/models/federated_search200_response_per_platform_value_spec.rb +42 -0
  954. data/spec/models/federated_search200_response_spec.rb +66 -0
  955. data/spec/models/federated_search_request_spec.rb +82 -0
  956. data/spec/models/file_list_envelope_spec.rb +42 -0
  957. data/spec/models/files_and_folders_response_spec.rb +66 -0
  958. data/spec/models/folder_list_envelope_spec.rb +42 -0
  959. data/spec/models/folder_spec.rb +78 -0
  960. data/spec/models/get_chat_user_response_spec.rb +42 -0
  961. data/spec/models/get_domain_logo200_response_spec.rb +42 -0
  962. data/spec/models/get_email_response_spec.rb +42 -0
  963. data/spec/models/get_thread_response_spec.rb +42 -0
  964. data/spec/models/inbox_counts_spec.rb +48 -0
  965. data/spec/models/inbox_item_spec.rb +96 -0
  966. data/spec/models/inbox_list_response_spec.rb +48 -0
  967. data/spec/models/init_chunked_upload_request_spec.rb +72 -0
  968. data/spec/models/init_chunked_upload_response_spec.rb +60 -0
  969. data/spec/models/install_connection_request_spec.rb +48 -0
  970. data/spec/models/introspection_response_spec.rb +72 -0
  971. data/spec/models/issue_collaboration_token200_response_spec.rb +60 -0
  972. data/spec/models/issue_collaboration_token_request_spec.rb +36 -0
  973. data/spec/models/jwk_spec.rb +66 -0
  974. data/spec/models/jwks_spec.rb +36 -0
  975. data/spec/models/key_binding_list_response_spec.rb +36 -0
  976. data/spec/models/key_binding_spec.rb +96 -0
  977. data/spec/models/label_color_spec.rb +42 -0
  978. data/spec/models/label_spec.rb +66 -0
  979. data/spec/models/link_repo_task_request_spec.rb +36 -0
  980. data/spec/models/list_calendar_events200_response_spec.rb +54 -0
  981. data/spec/models/list_channels_response_spec.rb +54 -0
  982. data/spec/models/list_chat_users_response_spec.rb +54 -0
  983. data/spec/models/list_drafts_response_spec.rb +54 -0
  984. data/spec/models/list_emails_response_spec.rb +54 -0
  985. data/spec/models/list_events_data_spec.rb +54 -0
  986. data/spec/models/list_labels_response_spec.rb +42 -0
  987. data/spec/models/list_messages_response_spec.rb +54 -0
  988. data/spec/models/meeting_room_spec.rb +54 -0
  989. data/spec/models/move_block_request_spec.rb +42 -0
  990. data/spec/models/move_emails_request_spec.rb +36 -0
  991. data/spec/models/move_file_request_spec.rb +36 -0
  992. data/spec/models/move_file_response_spec.rb +36 -0
  993. data/spec/models/note_list_envelope_spec.rb +42 -0
  994. data/spec/models/note_spec.rb +114 -0
  995. data/spec/models/o_auth_error_spec.rb +46 -0
  996. data/spec/models/organization_detail_legacy_spec.rb +96 -0
  997. data/spec/models/organization_invitation_list_response_spec.rb +36 -0
  998. data/spec/models/organization_invitation_spec.rb +100 -0
  999. data/spec/models/organization_list_response_spec.rb +36 -0
  1000. data/spec/models/organization_member_invited_by_spec.rb +32 -0
  1001. data/spec/models/organization_member_list_response_spec.rb +42 -0
  1002. data/spec/models/organization_member_spec.rb +70 -0
  1003. data/spec/models/organization_spec.rb +96 -0
  1004. data/spec/models/organization_workspaces_inner_spec.rb +48 -0
  1005. data/spec/models/password_required_error_spec.rb +54 -0
  1006. data/spec/models/pat_list_response_spec.rb +42 -0
  1007. data/spec/models/pat_scopes_response_spec.rb +36 -0
  1008. data/spec/models/personal_access_token_spec.rb +84 -0
  1009. data/spec/models/preconfigured_agent_spec.rb +72 -0
  1010. data/spec/models/presentation_list_envelope_spec.rb +42 -0
  1011. data/spec/models/presentation_spec.rb +96 -0
  1012. data/spec/models/propose_recommendation_request_spec.rb +66 -0
  1013. data/spec/models/public_invitation_payload_spec.rb +110 -0
  1014. data/spec/models/quota_exceeded_error_spec.rb +42 -0
  1015. data/spec/models/recommendation_list_response_spec.rb +36 -0
  1016. data/spec/models/recommendation_spec.rb +100 -0
  1017. data/spec/models/record_list_response_spec.rb +48 -0
  1018. data/spec/models/record_spec.rb +78 -0
  1019. data/spec/models/record_type_list_response_spec.rb +36 -0
  1020. data/spec/models/record_type_spec.rb +84 -0
  1021. data/spec/models/refresh_connection_request_spec.rb +42 -0
  1022. data/spec/models/reminder_method_spec.rb +30 -0
  1023. data/spec/models/reminder_spec.rb +42 -0
  1024. data/spec/models/reply_email_request_spec.rb +72 -0
  1025. data/spec/models/revoke_other_sessions_response_spec.rb +36 -0
  1026. data/spec/models/rich_text_object_spec.rb +58 -0
  1027. data/spec/models/routine_list_response_spec.rb +36 -0
  1028. data/spec/models/routine_run_complete_request_spec.rb +42 -0
  1029. data/spec/models/routine_run_list_response_spec.rb +36 -0
  1030. data/spec/models/routine_run_progress_request_spec.rb +42 -0
  1031. data/spec/models/routine_run_spec.rb +72 -0
  1032. data/spec/models/routine_spec.rb +84 -0
  1033. data/spec/models/row_list_spec.rb +42 -0
  1034. data/spec/models/row_spec.rb +42 -0
  1035. data/spec/models/save_message_request_spec.rb +48 -0
  1036. data/spec/models/search_emails_response_spec.rb +54 -0
  1037. data/spec/models/search_files_response_spec.rb +54 -0
  1038. data/spec/models/send_chat_message_request_spec.rb +60 -0
  1039. data/spec/models/send_chat_message_response_spec.rb +66 -0
  1040. data/spec/models/send_email_request_spec.rb +90 -0
  1041. data/spec/models/send_email_response_spec.rb +60 -0
  1042. data/spec/models/session_list_response_spec.rb +36 -0
  1043. data/spec/models/session_spec.rb +96 -0
  1044. data/spec/models/share_settings_spec.rb +60 -0
  1045. data/spec/models/sheet_list_envelope_spec.rb +42 -0
  1046. data/spec/models/sheet_spec.rb +126 -0
  1047. data/spec/models/sign_in_methods_providers_inner_spec.rb +54 -0
  1048. data/spec/models/sign_in_methods_spec.rb +48 -0
  1049. data/spec/models/slide_element_list_spec.rb +42 -0
  1050. data/spec/models/slide_element_spec.rb +102 -0
  1051. data/spec/models/slide_list_spec.rb +42 -0
  1052. data/spec/models/slide_spec.rb +114 -0
  1053. data/spec/models/spatio_call_spec.rb +96 -0
  1054. data/spec/models/spatio_connection_spec.rb +96 -0
  1055. data/spec/models/spatio_event_spec.rb +240 -0
  1056. data/spec/models/spatio_file_spec.rb +102 -0
  1057. data/spec/models/spatio_thread_spec.rb +54 -0
  1058. data/spec/models/success_flag_spec.rb +36 -0
  1059. data/spec/models/task_comment_author_spec.rb +54 -0
  1060. data/spec/models/task_comment_list_spec.rb +42 -0
  1061. data/spec/models/task_comment_mutation_response_spec.rb +42 -0
  1062. data/spec/models/task_comment_request_spec.rb +36 -0
  1063. data/spec/models/task_comment_spec.rb +66 -0
  1064. data/spec/models/task_list_envelope_spec.rb +42 -0
  1065. data/spec/models/task_providers_info_platform_spec.rb +42 -0
  1066. data/spec/models/task_providers_info_spec.rb +42 -0
  1067. data/spec/models/task_spec.rb +160 -0
  1068. data/spec/models/text_annotations_spec.rb +66 -0
  1069. data/spec/models/token_response_spec.rb +66 -0
  1070. data/spec/models/update_account_request_spec.rb +42 -0
  1071. data/spec/models/update_agent_request_spec.rb +72 -0
  1072. data/spec/models/update_app_request_spec.rb +54 -0
  1073. data/spec/models/update_block_request_spec.rb +48 -0
  1074. data/spec/models/update_cell_request_spec.rb +36 -0
  1075. data/spec/models/update_comment_request_spec.rb +42 -0
  1076. data/spec/models/update_contact_category_request_spec.rb +48 -0
  1077. data/spec/models/update_contact_request_spec.rb +78 -0
  1078. data/spec/models/update_conversation_request_spec.rb +60 -0
  1079. data/spec/models/update_draft_request_spec.rb +78 -0
  1080. data/spec/models/update_email_folder_request_spec.rb +36 -0
  1081. data/spec/models/update_email_request_spec.rb +60 -0
  1082. data/spec/models/update_email_response_spec.rb +42 -0
  1083. data/spec/models/update_event_request_spec.rb +52 -0
  1084. data/spec/models/update_file_request_spec.rb +48 -0
  1085. data/spec/models/update_key_binding_request_spec.rb +42 -0
  1086. data/spec/models/update_message_metadata_request_spec.rb +42 -0
  1087. data/spec/models/update_note_request_spec.rb +72 -0
  1088. data/spec/models/update_organization_member_request_spec.rb +40 -0
  1089. data/spec/models/update_organization_request_spec.rb +48 -0
  1090. data/spec/models/update_participant_state_request_spec.rb +48 -0
  1091. data/spec/models/update_pat_request_spec.rb +42 -0
  1092. data/spec/models/update_presentation_request_spec.rb +48 -0
  1093. data/spec/models/update_recommendation_status_request_spec.rb +40 -0
  1094. data/spec/models/update_record_request_spec.rb +48 -0
  1095. data/spec/models/update_record_type_request_spec.rb +60 -0
  1096. data/spec/models/update_routine_request_spec.rb +60 -0
  1097. data/spec/models/update_row_request_spec.rb +36 -0
  1098. data/spec/models/update_sheet_request_spec.rb +72 -0
  1099. data/spec/models/update_slide_element_request_spec.rb +78 -0
  1100. data/spec/models/update_slide_request_spec.rb +78 -0
  1101. data/spec/models/update_task_request_spec.rb +88 -0
  1102. data/spec/models/update_workspace_member_request_spec.rb +40 -0
  1103. data/spec/models/update_workspace_request_spec.rb +54 -0
  1104. data/spec/models/upload_chunked_block_response_spec.rb +54 -0
  1105. data/spec/models/upload_file_base64_request_spec.rb +78 -0
  1106. data/spec/models/user_info_response_spec.rb +84 -0
  1107. data/spec/models/validate_key_binding_request_spec.rb +48 -0
  1108. data/spec/models/validate_key_binding_response_spec.rb +42 -0
  1109. data/spec/models/workspace_envelope_spec.rb +36 -0
  1110. data/spec/models/workspace_invitation_list_response_spec.rb +36 -0
  1111. data/spec/models/workspace_invitation_spec.rb +88 -0
  1112. data/spec/models/workspace_list_response_spec.rb +42 -0
  1113. data/spec/models/workspace_member_list_response_spec.rb +42 -0
  1114. data/spec/models/workspace_member_spec.rb +76 -0
  1115. data/spec/models/workspace_organization_spec.rb +48 -0
  1116. data/spec/models/workspace_spec.rb +114 -0
  1117. data/spec/models/write_app_file_request_spec.rb +42 -0
  1118. data/spec/spec_helper.rb +111 -0
  1119. metadata +1597 -0
@@ -0,0 +1,3780 @@
1
+ =begin
2
+ #SpatioAPI
3
+
4
+ #The REST API that owns every resource in your Spatio workspace: notes, sheets, slides, tasks, calendar events, mail, chat, files, and contacts. SpatioMCP wraps this API; Spatio Desktop reads from it. You can call it directly from your own code. All requests must be authenticated with a Personal Access Token (`Authorization: Bearer pat_...`) or an OAuth 2.1 access token, and use HTTPS. Official SDKs (MIT, generated from this spec on every release): - TypeScript: https://github.com/spatio-labs/spatio-ts (`npm install @spatio-labs/spatio-ts`) - Python: https://github.com/spatio-labs/spatio-py (`pip install spatio-sdk`) - Go: https://github.com/spatio-labs/spatio-go (`go get github.com/spatio-labs/spatio-go`) This specification is generated from the platform-service Go source on every push to `main`. The spec, not hand-written documentation, is the source of truth: server stubs and SDKs are generated from it, and any drift between the spec and the running service fails CI.
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: hello@spatio.app
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Spatio
16
+ class MailApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Archive multiple messages (remove the INBOX label).
23
+ # @param bulk_archive_request [BulkArchiveRequest]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [BulkArchiveResponse]
26
+ def bulk_archive_emails(bulk_archive_request, opts = {})
27
+ data, _status_code, _headers = bulk_archive_emails_with_http_info(bulk_archive_request, opts)
28
+ data
29
+ end
30
+
31
+ # Archive multiple messages (remove the INBOX label).
32
+ # @param bulk_archive_request [BulkArchiveRequest]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(BulkArchiveResponse, Integer, Hash)>] BulkArchiveResponse data, response status code and response headers
35
+ def bulk_archive_emails_with_http_info(bulk_archive_request, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: MailApi.bulk_archive_emails ...'
38
+ end
39
+ # verify the required parameter 'bulk_archive_request' is set
40
+ if @api_client.config.client_side_validation && bulk_archive_request.nil?
41
+ fail ArgumentError, "Missing the required parameter 'bulk_archive_request' when calling MailApi.bulk_archive_emails"
42
+ end
43
+ # resource path
44
+ local_var_path = '/v1/mail/archive'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
+ # HTTP header 'Content-Type'
54
+ content_type = @api_client.select_header_content_type(['application/json'])
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_archive_request)
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'BulkArchiveResponse'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"MailApi.bulk_archive_emails",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: MailApi#bulk_archive_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Delete multiple messages in one call.
89
+ # Soft-delete by default (moves to provider trash). Set `permanent: true` for a hard delete.
90
+ # @param bulk_delete_emails_request [BulkDeleteEmailsRequest]
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [BulkDeleteEmailsResponse]
93
+ def bulk_delete_emails(bulk_delete_emails_request, opts = {})
94
+ data, _status_code, _headers = bulk_delete_emails_with_http_info(bulk_delete_emails_request, opts)
95
+ data
96
+ end
97
+
98
+ # Delete multiple messages in one call.
99
+ # Soft-delete by default (moves to provider trash). Set &#x60;permanent: true&#x60; for a hard delete.
100
+ # @param bulk_delete_emails_request [BulkDeleteEmailsRequest]
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [Array<(BulkDeleteEmailsResponse, Integer, Hash)>] BulkDeleteEmailsResponse data, response status code and response headers
103
+ def bulk_delete_emails_with_http_info(bulk_delete_emails_request, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: MailApi.bulk_delete_emails ...'
106
+ end
107
+ # verify the required parameter 'bulk_delete_emails_request' is set
108
+ if @api_client.config.client_side_validation && bulk_delete_emails_request.nil?
109
+ fail ArgumentError, "Missing the required parameter 'bulk_delete_emails_request' when calling MailApi.bulk_delete_emails"
110
+ end
111
+ # resource path
112
+ local_var_path = '/v1/mail/delete'
113
+
114
+ # query parameters
115
+ query_params = opts[:query_params] || {}
116
+
117
+ # header parameters
118
+ header_params = opts[:header_params] || {}
119
+ # HTTP header 'Accept' (if needed)
120
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
121
+ # HTTP header 'Content-Type'
122
+ content_type = @api_client.select_header_content_type(['application/json'])
123
+ if !content_type.nil?
124
+ header_params['Content-Type'] = content_type
125
+ end
126
+
127
+ # form parameters
128
+ form_params = opts[:form_params] || {}
129
+
130
+ # http body (model)
131
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_delete_emails_request)
132
+
133
+ # return_type
134
+ return_type = opts[:debug_return_type] || 'BulkDeleteEmailsResponse'
135
+
136
+ # auth_names
137
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
138
+
139
+ new_options = opts.merge(
140
+ :operation => :"MailApi.bulk_delete_emails",
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: MailApi#bulk_delete_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Mark multiple messages read or unread in one call.
157
+ # @param bulk_mark_read_request [BulkMarkReadRequest]
158
+ # @param [Hash] opts the optional parameters
159
+ # @return [BulkMarkReadResponse]
160
+ def bulk_mark_emails_read(bulk_mark_read_request, opts = {})
161
+ data, _status_code, _headers = bulk_mark_emails_read_with_http_info(bulk_mark_read_request, opts)
162
+ data
163
+ end
164
+
165
+ # Mark multiple messages read or unread in one call.
166
+ # @param bulk_mark_read_request [BulkMarkReadRequest]
167
+ # @param [Hash] opts the optional parameters
168
+ # @return [Array<(BulkMarkReadResponse, Integer, Hash)>] BulkMarkReadResponse data, response status code and response headers
169
+ def bulk_mark_emails_read_with_http_info(bulk_mark_read_request, opts = {})
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug 'Calling API: MailApi.bulk_mark_emails_read ...'
172
+ end
173
+ # verify the required parameter 'bulk_mark_read_request' is set
174
+ if @api_client.config.client_side_validation && bulk_mark_read_request.nil?
175
+ fail ArgumentError, "Missing the required parameter 'bulk_mark_read_request' when calling MailApi.bulk_mark_emails_read"
176
+ end
177
+ # resource path
178
+ local_var_path = '/v1/mail/mark-read'
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+
183
+ # header parameters
184
+ header_params = opts[:header_params] || {}
185
+ # HTTP header 'Accept' (if needed)
186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
187
+ # HTTP header 'Content-Type'
188
+ content_type = @api_client.select_header_content_type(['application/json'])
189
+ if !content_type.nil?
190
+ header_params['Content-Type'] = content_type
191
+ end
192
+
193
+ # form parameters
194
+ form_params = opts[:form_params] || {}
195
+
196
+ # http body (model)
197
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_mark_read_request)
198
+
199
+ # return_type
200
+ return_type = opts[:debug_return_type] || 'BulkMarkReadResponse'
201
+
202
+ # auth_names
203
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
204
+
205
+ new_options = opts.merge(
206
+ :operation => :"MailApi.bulk_mark_emails_read",
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: MailApi#bulk_mark_emails_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+
222
+ # Create a draft.
223
+ # @param create_draft_request [CreateDraftRequest]
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
226
+ # @return [DraftResponse]
227
+ def create_draft(create_draft_request, opts = {})
228
+ data, _status_code, _headers = create_draft_with_http_info(create_draft_request, opts)
229
+ data
230
+ end
231
+
232
+ # Create a draft.
233
+ # @param create_draft_request [CreateDraftRequest]
234
+ # @param [Hash] opts the optional parameters
235
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
236
+ # @return [Array<(DraftResponse, Integer, Hash)>] DraftResponse data, response status code and response headers
237
+ def create_draft_with_http_info(create_draft_request, opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: MailApi.create_draft ...'
240
+ end
241
+ # verify the required parameter 'create_draft_request' is set
242
+ if @api_client.config.client_side_validation && create_draft_request.nil?
243
+ fail ArgumentError, "Missing the required parameter 'create_draft_request' when calling MailApi.create_draft"
244
+ end
245
+ # resource path
246
+ local_var_path = '/v1/mail/drafts'
247
+
248
+ # query parameters
249
+ query_params = opts[:query_params] || {}
250
+
251
+ # header parameters
252
+ header_params = opts[:header_params] || {}
253
+ # HTTP header 'Accept' (if needed)
254
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
255
+ # HTTP header 'Content-Type'
256
+ content_type = @api_client.select_header_content_type(['application/json'])
257
+ if !content_type.nil?
258
+ header_params['Content-Type'] = content_type
259
+ end
260
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
261
+
262
+ # form parameters
263
+ form_params = opts[:form_params] || {}
264
+
265
+ # http body (model)
266
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_draft_request)
267
+
268
+ # return_type
269
+ return_type = opts[:debug_return_type] || 'DraftResponse'
270
+
271
+ # auth_names
272
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
273
+
274
+ new_options = opts.merge(
275
+ :operation => :"MailApi.create_draft",
276
+ :header_params => header_params,
277
+ :query_params => query_params,
278
+ :form_params => form_params,
279
+ :body => post_body,
280
+ :auth_names => auth_names,
281
+ :return_type => return_type
282
+ )
283
+
284
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
285
+ if @api_client.config.debugging
286
+ @api_client.config.logger.debug "API called: MailApi#create_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
+ end
288
+ return data, status_code, headers
289
+ end
290
+
291
+ # Create a label.
292
+ # @param create_label_request [CreateLabelRequest]
293
+ # @param [Hash] opts the optional parameters
294
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
295
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
296
+ # @return [CreateLabelResponse]
297
+ def create_email_label(create_label_request, opts = {})
298
+ data, _status_code, _headers = create_email_label_with_http_info(create_label_request, opts)
299
+ data
300
+ end
301
+
302
+ # Create a label.
303
+ # @param create_label_request [CreateLabelRequest]
304
+ # @param [Hash] opts the optional parameters
305
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
306
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
307
+ # @return [Array<(CreateLabelResponse, Integer, Hash)>] CreateLabelResponse data, response status code and response headers
308
+ def create_email_label_with_http_info(create_label_request, opts = {})
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug 'Calling API: MailApi.create_email_label ...'
311
+ end
312
+ # verify the required parameter 'create_label_request' is set
313
+ if @api_client.config.client_side_validation && create_label_request.nil?
314
+ fail ArgumentError, "Missing the required parameter 'create_label_request' when calling MailApi.create_email_label"
315
+ end
316
+ # resource path
317
+ local_var_path = '/v1/mail/labels'
318
+
319
+ # query parameters
320
+ query_params = opts[:query_params] || {}
321
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
322
+
323
+ # header parameters
324
+ header_params = opts[:header_params] || {}
325
+ # HTTP header 'Accept' (if needed)
326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
327
+ # HTTP header 'Content-Type'
328
+ content_type = @api_client.select_header_content_type(['application/json'])
329
+ if !content_type.nil?
330
+ header_params['Content-Type'] = content_type
331
+ end
332
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
333
+
334
+ # form parameters
335
+ form_params = opts[:form_params] || {}
336
+
337
+ # http body (model)
338
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_label_request)
339
+
340
+ # return_type
341
+ return_type = opts[:debug_return_type] || 'CreateLabelResponse'
342
+
343
+ # auth_names
344
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
345
+
346
+ new_options = opts.merge(
347
+ :operation => :"MailApi.create_email_label",
348
+ :header_params => header_params,
349
+ :query_params => query_params,
350
+ :form_params => form_params,
351
+ :body => post_body,
352
+ :auth_names => auth_names,
353
+ :return_type => return_type
354
+ )
355
+
356
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
357
+ if @api_client.config.debugging
358
+ @api_client.config.logger.debug "API called: MailApi#create_email_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
359
+ end
360
+ return data, status_code, headers
361
+ end
362
+
363
+ # Create a mail template.
364
+ # @param request_body [Hash<String, Object>]
365
+ # @param [Hash] opts the optional parameters
366
+ # @return [Hash<String, Object>]
367
+ def create_mail_template(request_body, opts = {})
368
+ data, _status_code, _headers = create_mail_template_with_http_info(request_body, opts)
369
+ data
370
+ end
371
+
372
+ # Create a mail template.
373
+ # @param request_body [Hash<String, Object>]
374
+ # @param [Hash] opts the optional parameters
375
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
376
+ def create_mail_template_with_http_info(request_body, opts = {})
377
+ if @api_client.config.debugging
378
+ @api_client.config.logger.debug 'Calling API: MailApi.create_mail_template ...'
379
+ end
380
+ # verify the required parameter 'request_body' is set
381
+ if @api_client.config.client_side_validation && request_body.nil?
382
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.create_mail_template"
383
+ end
384
+ # resource path
385
+ local_var_path = '/v1/mail/templates'
386
+
387
+ # query parameters
388
+ query_params = opts[:query_params] || {}
389
+
390
+ # header parameters
391
+ header_params = opts[:header_params] || {}
392
+ # HTTP header 'Accept' (if needed)
393
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
394
+ # HTTP header 'Content-Type'
395
+ content_type = @api_client.select_header_content_type(['application/json'])
396
+ if !content_type.nil?
397
+ header_params['Content-Type'] = content_type
398
+ end
399
+
400
+ # form parameters
401
+ form_params = opts[:form_params] || {}
402
+
403
+ # http body (model)
404
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
405
+
406
+ # return_type
407
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
408
+
409
+ # auth_names
410
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
411
+
412
+ new_options = opts.merge(
413
+ :operation => :"MailApi.create_mail_template",
414
+ :header_params => header_params,
415
+ :query_params => query_params,
416
+ :form_params => form_params,
417
+ :body => post_body,
418
+ :auth_names => auth_names,
419
+ :return_type => return_type
420
+ )
421
+
422
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
423
+ if @api_client.config.debugging
424
+ @api_client.config.logger.debug "API called: MailApi#create_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
425
+ end
426
+ return data, status_code, headers
427
+ end
428
+
429
+ # Delete a draft.
430
+ # @param id [String] Draft id.
431
+ # @param [Hash] opts the optional parameters
432
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
433
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
434
+ # @return [nil]
435
+ def delete_draft(id, opts = {})
436
+ delete_draft_with_http_info(id, opts)
437
+ nil
438
+ end
439
+
440
+ # Delete a draft.
441
+ # @param id [String] Draft id.
442
+ # @param [Hash] opts the optional parameters
443
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
444
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
445
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
446
+ def delete_draft_with_http_info(id, opts = {})
447
+ if @api_client.config.debugging
448
+ @api_client.config.logger.debug 'Calling API: MailApi.delete_draft ...'
449
+ end
450
+ # verify the required parameter 'id' is set
451
+ if @api_client.config.client_side_validation && id.nil?
452
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.delete_draft"
453
+ end
454
+ # resource path
455
+ local_var_path = '/v1/mail/drafts/{id}'.sub('{id}', CGI.escape(id.to_s))
456
+
457
+ # query parameters
458
+ query_params = opts[:query_params] || {}
459
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
460
+
461
+ # header parameters
462
+ header_params = opts[:header_params] || {}
463
+ # HTTP header 'Accept' (if needed)
464
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
465
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
466
+
467
+ # form parameters
468
+ form_params = opts[:form_params] || {}
469
+
470
+ # http body (model)
471
+ post_body = opts[:debug_body]
472
+
473
+ # return_type
474
+ return_type = opts[:debug_return_type]
475
+
476
+ # auth_names
477
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
478
+
479
+ new_options = opts.merge(
480
+ :operation => :"MailApi.delete_draft",
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => return_type
487
+ )
488
+
489
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug "API called: MailApi#delete_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
492
+ end
493
+ return data, status_code, headers
494
+ end
495
+
496
+ # Delete an email.
497
+ # Soft-deletes (moves to provider trash).
498
+ # @param id [String] Email message id.
499
+ # @param [Hash] opts the optional parameters
500
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
501
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
502
+ # @return [SuccessFlag]
503
+ def delete_email(id, opts = {})
504
+ data, _status_code, _headers = delete_email_with_http_info(id, opts)
505
+ data
506
+ end
507
+
508
+ # Delete an email.
509
+ # Soft-deletes (moves to provider trash).
510
+ # @param id [String] Email message id.
511
+ # @param [Hash] opts the optional parameters
512
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
513
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
514
+ # @return [Array<(SuccessFlag, Integer, Hash)>] SuccessFlag data, response status code and response headers
515
+ def delete_email_with_http_info(id, opts = {})
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug 'Calling API: MailApi.delete_email ...'
518
+ end
519
+ # verify the required parameter 'id' is set
520
+ if @api_client.config.client_side_validation && id.nil?
521
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.delete_email"
522
+ end
523
+ # resource path
524
+ local_var_path = '/v1/mail/email/{id}'.sub('{id}', CGI.escape(id.to_s))
525
+
526
+ # query parameters
527
+ query_params = opts[:query_params] || {}
528
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
529
+
530
+ # header parameters
531
+ header_params = opts[:header_params] || {}
532
+ # HTTP header 'Accept' (if needed)
533
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
534
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
535
+
536
+ # form parameters
537
+ form_params = opts[:form_params] || {}
538
+
539
+ # http body (model)
540
+ post_body = opts[:debug_body]
541
+
542
+ # return_type
543
+ return_type = opts[:debug_return_type] || 'SuccessFlag'
544
+
545
+ # auth_names
546
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
547
+
548
+ new_options = opts.merge(
549
+ :operation => :"MailApi.delete_email",
550
+ :header_params => header_params,
551
+ :query_params => query_params,
552
+ :form_params => form_params,
553
+ :body => post_body,
554
+ :auth_names => auth_names,
555
+ :return_type => return_type
556
+ )
557
+
558
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
559
+ if @api_client.config.debugging
560
+ @api_client.config.logger.debug "API called: MailApi#delete_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
561
+ end
562
+ return data, status_code, headers
563
+ end
564
+
565
+ # Delete a label.
566
+ # @param id [String] Label id.
567
+ # @param [Hash] opts the optional parameters
568
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
569
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
570
+ # @return [nil]
571
+ def delete_email_label(id, opts = {})
572
+ delete_email_label_with_http_info(id, opts)
573
+ nil
574
+ end
575
+
576
+ # Delete a label.
577
+ # @param id [String] Label id.
578
+ # @param [Hash] opts the optional parameters
579
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
580
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
581
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
582
+ def delete_email_label_with_http_info(id, opts = {})
583
+ if @api_client.config.debugging
584
+ @api_client.config.logger.debug 'Calling API: MailApi.delete_email_label ...'
585
+ end
586
+ # verify the required parameter 'id' is set
587
+ if @api_client.config.client_side_validation && id.nil?
588
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.delete_email_label"
589
+ end
590
+ # resource path
591
+ local_var_path = '/v1/mail/labels/{id}'.sub('{id}', CGI.escape(id.to_s))
592
+
593
+ # query parameters
594
+ query_params = opts[:query_params] || {}
595
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
596
+
597
+ # header parameters
598
+ header_params = opts[:header_params] || {}
599
+ # HTTP header 'Accept' (if needed)
600
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
601
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
602
+
603
+ # form parameters
604
+ form_params = opts[:form_params] || {}
605
+
606
+ # http body (model)
607
+ post_body = opts[:debug_body]
608
+
609
+ # return_type
610
+ return_type = opts[:debug_return_type]
611
+
612
+ # auth_names
613
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
614
+
615
+ new_options = opts.merge(
616
+ :operation => :"MailApi.delete_email_label",
617
+ :header_params => header_params,
618
+ :query_params => query_params,
619
+ :form_params => form_params,
620
+ :body => post_body,
621
+ :auth_names => auth_names,
622
+ :return_type => return_type
623
+ )
624
+
625
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
626
+ if @api_client.config.debugging
627
+ @api_client.config.logger.debug "API called: MailApi#delete_email_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
628
+ end
629
+ return data, status_code, headers
630
+ end
631
+
632
+ # Delete a mail template.
633
+ # @param id [String]
634
+ # @param [Hash] opts the optional parameters
635
+ # @return [nil]
636
+ def delete_mail_template(id, opts = {})
637
+ delete_mail_template_with_http_info(id, opts)
638
+ nil
639
+ end
640
+
641
+ # Delete a mail template.
642
+ # @param id [String]
643
+ # @param [Hash] opts the optional parameters
644
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
645
+ def delete_mail_template_with_http_info(id, opts = {})
646
+ if @api_client.config.debugging
647
+ @api_client.config.logger.debug 'Calling API: MailApi.delete_mail_template ...'
648
+ end
649
+ # verify the required parameter 'id' is set
650
+ if @api_client.config.client_side_validation && id.nil?
651
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.delete_mail_template"
652
+ end
653
+ # resource path
654
+ local_var_path = '/v1/mail/templates/{id}'.sub('{id}', CGI.escape(id.to_s))
655
+
656
+ # query parameters
657
+ query_params = opts[:query_params] || {}
658
+
659
+ # header parameters
660
+ header_params = opts[:header_params] || {}
661
+ # HTTP header 'Accept' (if needed)
662
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
663
+
664
+ # form parameters
665
+ form_params = opts[:form_params] || {}
666
+
667
+ # http body (model)
668
+ post_body = opts[:debug_body]
669
+
670
+ # return_type
671
+ return_type = opts[:debug_return_type]
672
+
673
+ # auth_names
674
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
675
+
676
+ new_options = opts.merge(
677
+ :operation => :"MailApi.delete_mail_template",
678
+ :header_params => header_params,
679
+ :query_params => query_params,
680
+ :form_params => form_params,
681
+ :body => post_body,
682
+ :auth_names => auth_names,
683
+ :return_type => return_type
684
+ )
685
+
686
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
687
+ if @api_client.config.debugging
688
+ @api_client.config.logger.debug "API called: MailApi#delete_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
689
+ end
690
+ return data, status_code, headers
691
+ end
692
+
693
+ # Fetch one email.
694
+ # @param id [String] Email message id.
695
+ # @param [Hash] opts the optional parameters
696
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
697
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
698
+ # @return [GetEmailResponse]
699
+ def get_email(id, opts = {})
700
+ data, _status_code, _headers = get_email_with_http_info(id, opts)
701
+ data
702
+ end
703
+
704
+ # Fetch one email.
705
+ # @param id [String] Email message id.
706
+ # @param [Hash] opts the optional parameters
707
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
708
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
709
+ # @return [Array<(GetEmailResponse, Integer, Hash)>] GetEmailResponse data, response status code and response headers
710
+ def get_email_with_http_info(id, opts = {})
711
+ if @api_client.config.debugging
712
+ @api_client.config.logger.debug 'Calling API: MailApi.get_email ...'
713
+ end
714
+ # verify the required parameter 'id' is set
715
+ if @api_client.config.client_side_validation && id.nil?
716
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.get_email"
717
+ end
718
+ # resource path
719
+ local_var_path = '/v1/mail/email/{id}'.sub('{id}', CGI.escape(id.to_s))
720
+
721
+ # query parameters
722
+ query_params = opts[:query_params] || {}
723
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
724
+
725
+ # header parameters
726
+ header_params = opts[:header_params] || {}
727
+ # HTTP header 'Accept' (if needed)
728
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
729
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
730
+
731
+ # form parameters
732
+ form_params = opts[:form_params] || {}
733
+
734
+ # http body (model)
735
+ post_body = opts[:debug_body]
736
+
737
+ # return_type
738
+ return_type = opts[:debug_return_type] || 'GetEmailResponse'
739
+
740
+ # auth_names
741
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
742
+
743
+ new_options = opts.merge(
744
+ :operation => :"MailApi.get_email",
745
+ :header_params => header_params,
746
+ :query_params => query_params,
747
+ :form_params => form_params,
748
+ :body => post_body,
749
+ :auth_names => auth_names,
750
+ :return_type => return_type
751
+ )
752
+
753
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
754
+ if @api_client.config.debugging
755
+ @api_client.config.logger.debug "API called: MailApi#get_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
756
+ end
757
+ return data, status_code, headers
758
+ end
759
+
760
+ # Download an attachment.
761
+ # Streams the attachment binary. Response `Content-Type` matches the attachment's declared MIME type; `Content-Disposition` sets the filename.
762
+ # @param message_id [String] Message id the attachment belongs to.
763
+ # @param attachment_id [String] Attachment id within the message.
764
+ # @param [Hash] opts the optional parameters
765
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
766
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
767
+ # @return [File]
768
+ def get_email_attachment(message_id, attachment_id, opts = {})
769
+ data, _status_code, _headers = get_email_attachment_with_http_info(message_id, attachment_id, opts)
770
+ data
771
+ end
772
+
773
+ # Download an attachment.
774
+ # Streams the attachment binary. Response &#x60;Content-Type&#x60; matches the attachment&#39;s declared MIME type; &#x60;Content-Disposition&#x60; sets the filename.
775
+ # @param message_id [String] Message id the attachment belongs to.
776
+ # @param attachment_id [String] Attachment id within the message.
777
+ # @param [Hash] opts the optional parameters
778
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
779
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
780
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
781
+ def get_email_attachment_with_http_info(message_id, attachment_id, opts = {})
782
+ if @api_client.config.debugging
783
+ @api_client.config.logger.debug 'Calling API: MailApi.get_email_attachment ...'
784
+ end
785
+ # verify the required parameter 'message_id' is set
786
+ if @api_client.config.client_side_validation && message_id.nil?
787
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.get_email_attachment"
788
+ end
789
+ # verify the required parameter 'attachment_id' is set
790
+ if @api_client.config.client_side_validation && attachment_id.nil?
791
+ fail ArgumentError, "Missing the required parameter 'attachment_id' when calling MailApi.get_email_attachment"
792
+ end
793
+ # resource path
794
+ local_var_path = '/v1/mail/attachment/{messageId}/{attachmentId}'.sub('{messageId}', CGI.escape(message_id.to_s)).sub('{attachmentId}', CGI.escape(attachment_id.to_s))
795
+
796
+ # query parameters
797
+ query_params = opts[:query_params] || {}
798
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
799
+
800
+ # header parameters
801
+ header_params = opts[:header_params] || {}
802
+ # HTTP header 'Accept' (if needed)
803
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept']
804
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
805
+
806
+ # form parameters
807
+ form_params = opts[:form_params] || {}
808
+
809
+ # http body (model)
810
+ post_body = opts[:debug_body]
811
+
812
+ # return_type
813
+ return_type = opts[:debug_return_type] || 'File'
814
+
815
+ # auth_names
816
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
817
+
818
+ new_options = opts.merge(
819
+ :operation => :"MailApi.get_email_attachment",
820
+ :header_params => header_params,
821
+ :query_params => query_params,
822
+ :form_params => form_params,
823
+ :body => post_body,
824
+ :auth_names => auth_names,
825
+ :return_type => return_type
826
+ )
827
+
828
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
829
+ if @api_client.config.debugging
830
+ @api_client.config.logger.debug "API called: MailApi#get_email_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
831
+ end
832
+ return data, status_code, headers
833
+ end
834
+
835
+ # Fetch a thread (the conversation a message belongs to).
836
+ # @param id [String] Thread id.
837
+ # @param [Hash] opts the optional parameters
838
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
839
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
840
+ # @return [GetThreadResponse]
841
+ def get_email_thread(id, opts = {})
842
+ data, _status_code, _headers = get_email_thread_with_http_info(id, opts)
843
+ data
844
+ end
845
+
846
+ # Fetch a thread (the conversation a message belongs to).
847
+ # @param id [String] Thread id.
848
+ # @param [Hash] opts the optional parameters
849
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
850
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
851
+ # @return [Array<(GetThreadResponse, Integer, Hash)>] GetThreadResponse data, response status code and response headers
852
+ def get_email_thread_with_http_info(id, opts = {})
853
+ if @api_client.config.debugging
854
+ @api_client.config.logger.debug 'Calling API: MailApi.get_email_thread ...'
855
+ end
856
+ # verify the required parameter 'id' is set
857
+ if @api_client.config.client_side_validation && id.nil?
858
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.get_email_thread"
859
+ end
860
+ # resource path
861
+ local_var_path = '/v1/mail/thread/{id}'.sub('{id}', CGI.escape(id.to_s))
862
+
863
+ # query parameters
864
+ query_params = opts[:query_params] || {}
865
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
866
+
867
+ # header parameters
868
+ header_params = opts[:header_params] || {}
869
+ # HTTP header 'Accept' (if needed)
870
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
871
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
872
+
873
+ # form parameters
874
+ form_params = opts[:form_params] || {}
875
+
876
+ # http body (model)
877
+ post_body = opts[:debug_body]
878
+
879
+ # return_type
880
+ return_type = opts[:debug_return_type] || 'GetThreadResponse'
881
+
882
+ # auth_names
883
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
884
+
885
+ new_options = opts.merge(
886
+ :operation => :"MailApi.get_email_thread",
887
+ :header_params => header_params,
888
+ :query_params => query_params,
889
+ :form_params => form_params,
890
+ :body => post_body,
891
+ :auth_names => auth_names,
892
+ :return_type => return_type
893
+ )
894
+
895
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
896
+ if @api_client.config.debugging
897
+ @api_client.config.logger.debug "API called: MailApi#get_email_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
898
+ end
899
+ return data, status_code, headers
900
+ end
901
+
902
+ # Fetch a mail template.
903
+ # @param id [String]
904
+ # @param [Hash] opts the optional parameters
905
+ # @return [Hash<String, Object>]
906
+ def get_mail_template(id, opts = {})
907
+ data, _status_code, _headers = get_mail_template_with_http_info(id, opts)
908
+ data
909
+ end
910
+
911
+ # Fetch a mail template.
912
+ # @param id [String]
913
+ # @param [Hash] opts the optional parameters
914
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
915
+ def get_mail_template_with_http_info(id, opts = {})
916
+ if @api_client.config.debugging
917
+ @api_client.config.logger.debug 'Calling API: MailApi.get_mail_template ...'
918
+ end
919
+ # verify the required parameter 'id' is set
920
+ if @api_client.config.client_side_validation && id.nil?
921
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.get_mail_template"
922
+ end
923
+ # resource path
924
+ local_var_path = '/v1/mail/templates/{id}'.sub('{id}', CGI.escape(id.to_s))
925
+
926
+ # query parameters
927
+ query_params = opts[:query_params] || {}
928
+
929
+ # header parameters
930
+ header_params = opts[:header_params] || {}
931
+ # HTTP header 'Accept' (if needed)
932
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
933
+
934
+ # form parameters
935
+ form_params = opts[:form_params] || {}
936
+
937
+ # http body (model)
938
+ post_body = opts[:debug_body]
939
+
940
+ # return_type
941
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
942
+
943
+ # auth_names
944
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
945
+
946
+ new_options = opts.merge(
947
+ :operation => :"MailApi.get_mail_template",
948
+ :header_params => header_params,
949
+ :query_params => query_params,
950
+ :form_params => form_params,
951
+ :body => post_body,
952
+ :auth_names => auth_names,
953
+ :return_type => return_type
954
+ )
955
+
956
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
957
+ if @api_client.config.debugging
958
+ @api_client.config.logger.debug "API called: MailApi#get_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
959
+ end
960
+ return data, status_code, headers
961
+ end
962
+
963
+ # Read mail-tracking events for a thread (open log, reply log, etc.).
964
+ # @param thread_id [String]
965
+ # @param [Hash] opts the optional parameters
966
+ # @return [Hash<String, Object>]
967
+ def get_mail_thread_tracking(thread_id, opts = {})
968
+ data, _status_code, _headers = get_mail_thread_tracking_with_http_info(thread_id, opts)
969
+ data
970
+ end
971
+
972
+ # Read mail-tracking events for a thread (open log, reply log, etc.).
973
+ # @param thread_id [String]
974
+ # @param [Hash] opts the optional parameters
975
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
976
+ def get_mail_thread_tracking_with_http_info(thread_id, opts = {})
977
+ if @api_client.config.debugging
978
+ @api_client.config.logger.debug 'Calling API: MailApi.get_mail_thread_tracking ...'
979
+ end
980
+ # verify the required parameter 'thread_id' is set
981
+ if @api_client.config.client_side_validation && thread_id.nil?
982
+ fail ArgumentError, "Missing the required parameter 'thread_id' when calling MailApi.get_mail_thread_tracking"
983
+ end
984
+ # resource path
985
+ local_var_path = '/v1/mail/threads/{threadId}/tracking'.sub('{threadId}', CGI.escape(thread_id.to_s))
986
+
987
+ # query parameters
988
+ query_params = opts[:query_params] || {}
989
+
990
+ # header parameters
991
+ header_params = opts[:header_params] || {}
992
+ # HTTP header 'Accept' (if needed)
993
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
994
+
995
+ # form parameters
996
+ form_params = opts[:form_params] || {}
997
+
998
+ # http body (model)
999
+ post_body = opts[:debug_body]
1000
+
1001
+ # return_type
1002
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1003
+
1004
+ # auth_names
1005
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1006
+
1007
+ new_options = opts.merge(
1008
+ :operation => :"MailApi.get_mail_thread_tracking",
1009
+ :header_params => header_params,
1010
+ :query_params => query_params,
1011
+ :form_params => form_params,
1012
+ :body => post_body,
1013
+ :auth_names => auth_names,
1014
+ :return_type => return_type
1015
+ )
1016
+
1017
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1018
+ if @api_client.config.debugging
1019
+ @api_client.config.logger.debug "API called: MailApi#get_mail_thread_tracking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1020
+ end
1021
+ return data, status_code, headers
1022
+ end
1023
+
1024
+ # Render a template with variables and return the resulting draft.
1025
+ # @param id [String]
1026
+ # @param request_body [Hash<String, Object>]
1027
+ # @param [Hash] opts the optional parameters
1028
+ # @return [Hash<String, Object>]
1029
+ def instantiate_mail_template(id, request_body, opts = {})
1030
+ data, _status_code, _headers = instantiate_mail_template_with_http_info(id, request_body, opts)
1031
+ data
1032
+ end
1033
+
1034
+ # Render a template with variables and return the resulting draft.
1035
+ # @param id [String]
1036
+ # @param request_body [Hash<String, Object>]
1037
+ # @param [Hash] opts the optional parameters
1038
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1039
+ def instantiate_mail_template_with_http_info(id, request_body, opts = {})
1040
+ if @api_client.config.debugging
1041
+ @api_client.config.logger.debug 'Calling API: MailApi.instantiate_mail_template ...'
1042
+ end
1043
+ # verify the required parameter 'id' is set
1044
+ if @api_client.config.client_side_validation && id.nil?
1045
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.instantiate_mail_template"
1046
+ end
1047
+ # verify the required parameter 'request_body' is set
1048
+ if @api_client.config.client_side_validation && request_body.nil?
1049
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.instantiate_mail_template"
1050
+ end
1051
+ # resource path
1052
+ local_var_path = '/v1/mail/templates/{id}/instantiate'.sub('{id}', CGI.escape(id.to_s))
1053
+
1054
+ # query parameters
1055
+ query_params = opts[:query_params] || {}
1056
+
1057
+ # header parameters
1058
+ header_params = opts[:header_params] || {}
1059
+ # HTTP header 'Accept' (if needed)
1060
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1061
+ # HTTP header 'Content-Type'
1062
+ content_type = @api_client.select_header_content_type(['application/json'])
1063
+ if !content_type.nil?
1064
+ header_params['Content-Type'] = content_type
1065
+ end
1066
+
1067
+ # form parameters
1068
+ form_params = opts[:form_params] || {}
1069
+
1070
+ # http body (model)
1071
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
1072
+
1073
+ # return_type
1074
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1075
+
1076
+ # auth_names
1077
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1078
+
1079
+ new_options = opts.merge(
1080
+ :operation => :"MailApi.instantiate_mail_template",
1081
+ :header_params => header_params,
1082
+ :query_params => query_params,
1083
+ :form_params => form_params,
1084
+ :body => post_body,
1085
+ :auth_names => auth_names,
1086
+ :return_type => return_type
1087
+ )
1088
+
1089
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1090
+ if @api_client.config.debugging
1091
+ @api_client.config.logger.debug "API called: MailApi#instantiate_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1092
+ end
1093
+ return data, status_code, headers
1094
+ end
1095
+
1096
+ # List drafts across connected mail accounts.
1097
+ # @param [Hash] opts the optional parameters
1098
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1099
+ # @option opts [Array<String>] :account_ids Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to &#x60;providers&#x60; — when both are set the intersection is used.
1100
+ # @option opts [Array<String>] :providers Repeatable. Restrict to these provider ids (&#x60;gmail&#x60;, &#x60;outlook&#x60;).
1101
+ # @option opts [Integer] :limit (default to 50)
1102
+ # @option opts [String] :next_page_token
1103
+ # @return [ListDraftsResponse]
1104
+ def list_drafts(opts = {})
1105
+ data, _status_code, _headers = list_drafts_with_http_info(opts)
1106
+ data
1107
+ end
1108
+
1109
+ # List drafts across connected mail accounts.
1110
+ # @param [Hash] opts the optional parameters
1111
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1112
+ # @option opts [Array<String>] :account_ids Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to &#x60;providers&#x60; — when both are set the intersection is used.
1113
+ # @option opts [Array<String>] :providers Repeatable. Restrict to these provider ids (&#x60;gmail&#x60;, &#x60;outlook&#x60;).
1114
+ # @option opts [Integer] :limit (default to 50)
1115
+ # @option opts [String] :next_page_token
1116
+ # @return [Array<(ListDraftsResponse, Integer, Hash)>] ListDraftsResponse data, response status code and response headers
1117
+ def list_drafts_with_http_info(opts = {})
1118
+ if @api_client.config.debugging
1119
+ @api_client.config.logger.debug 'Calling API: MailApi.list_drafts ...'
1120
+ end
1121
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1122
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailApi.list_drafts, must be greater than or equal to 1.'
1123
+ end
1124
+
1125
+ # resource path
1126
+ local_var_path = '/v1/mail/drafts'
1127
+
1128
+ # query parameters
1129
+ query_params = opts[:query_params] || {}
1130
+ query_params[:'accountIds'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil?
1131
+ query_params[:'providers'] = @api_client.build_collection_param(opts[:'providers'], :multi) if !opts[:'providers'].nil?
1132
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1133
+ query_params[:'nextPageToken'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
1134
+
1135
+ # header parameters
1136
+ header_params = opts[:header_params] || {}
1137
+ # HTTP header 'Accept' (if needed)
1138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1139
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1140
+
1141
+ # form parameters
1142
+ form_params = opts[:form_params] || {}
1143
+
1144
+ # http body (model)
1145
+ post_body = opts[:debug_body]
1146
+
1147
+ # return_type
1148
+ return_type = opts[:debug_return_type] || 'ListDraftsResponse'
1149
+
1150
+ # auth_names
1151
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1152
+
1153
+ new_options = opts.merge(
1154
+ :operation => :"MailApi.list_drafts",
1155
+ :header_params => header_params,
1156
+ :query_params => query_params,
1157
+ :form_params => form_params,
1158
+ :body => post_body,
1159
+ :auth_names => auth_names,
1160
+ :return_type => return_type
1161
+ )
1162
+
1163
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1164
+ if @api_client.config.debugging
1165
+ @api_client.config.logger.debug "API called: MailApi#list_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1166
+ end
1167
+ return data, status_code, headers
1168
+ end
1169
+
1170
+ # List labels on the resolved mail account.
1171
+ # Single-account list. The platform auto-resolves to the caller's sole connected account; pass `?accountId=` to disambiguate when multiple are connected.
1172
+ # @param [Hash] opts the optional parameters
1173
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
1174
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1175
+ # @return [ListLabelsResponse]
1176
+ def list_email_labels(opts = {})
1177
+ data, _status_code, _headers = list_email_labels_with_http_info(opts)
1178
+ data
1179
+ end
1180
+
1181
+ # List labels on the resolved mail account.
1182
+ # Single-account list. The platform auto-resolves to the caller&#39;s sole connected account; pass &#x60;?accountId&#x3D;&#x60; to disambiguate when multiple are connected.
1183
+ # @param [Hash] opts the optional parameters
1184
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
1185
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1186
+ # @return [Array<(ListLabelsResponse, Integer, Hash)>] ListLabelsResponse data, response status code and response headers
1187
+ def list_email_labels_with_http_info(opts = {})
1188
+ if @api_client.config.debugging
1189
+ @api_client.config.logger.debug 'Calling API: MailApi.list_email_labels ...'
1190
+ end
1191
+ # resource path
1192
+ local_var_path = '/v1/mail/labels'
1193
+
1194
+ # query parameters
1195
+ query_params = opts[:query_params] || {}
1196
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
1197
+
1198
+ # header parameters
1199
+ header_params = opts[:header_params] || {}
1200
+ # HTTP header 'Accept' (if needed)
1201
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1202
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1203
+
1204
+ # form parameters
1205
+ form_params = opts[:form_params] || {}
1206
+
1207
+ # http body (model)
1208
+ post_body = opts[:debug_body]
1209
+
1210
+ # return_type
1211
+ return_type = opts[:debug_return_type] || 'ListLabelsResponse'
1212
+
1213
+ # auth_names
1214
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1215
+
1216
+ new_options = opts.merge(
1217
+ :operation => :"MailApi.list_email_labels",
1218
+ :header_params => header_params,
1219
+ :query_params => query_params,
1220
+ :form_params => form_params,
1221
+ :body => post_body,
1222
+ :auth_names => auth_names,
1223
+ :return_type => return_type
1224
+ )
1225
+
1226
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1227
+ if @api_client.config.debugging
1228
+ @api_client.config.logger.debug "API called: MailApi#list_email_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1229
+ end
1230
+ return data, status_code, headers
1231
+ end
1232
+
1233
+ # List emails across connected mail accounts.
1234
+ # Fan-out list. Returns messages across every connected mail provider unless filtered. Pass `?accountIds=` (repeatable) to restrict to specific accounts, `?providers=` to restrict to specific provider ids, or both for the intersection.
1235
+ # @param [Hash] opts the optional parameters
1236
+ # @option opts [Array<String>] :account_ids Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to &#x60;providers&#x60; — when both are set the intersection is used.
1237
+ # @option opts [Array<String>] :providers Repeatable. Restrict to these provider ids (&#x60;gmail&#x60;, &#x60;outlook&#x60;).
1238
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1239
+ # @option opts [String] :query Provider-specific full-text query (e.g. Gmail search syntax).
1240
+ # @option opts [Array<String>] :labels Repeatable. Filter to messages carrying every label.
1241
+ # @option opts [String] :folder Logical folder filter. Canonical values: &#x60;inbox&#x60;, &#x60;sent&#x60;, &#x60;starred&#x60;, &#x60;trash&#x60;, &#x60;archive&#x60;. Provider-specific folders accepted as opaque strings.
1242
+ # @option opts [Integer] :limit (default to 50)
1243
+ # @option opts [Integer] :offset (default to 0)
1244
+ # @return [ListEmailsResponse]
1245
+ def list_emails(opts = {})
1246
+ data, _status_code, _headers = list_emails_with_http_info(opts)
1247
+ data
1248
+ end
1249
+
1250
+ # List emails across connected mail accounts.
1251
+ # Fan-out list. Returns messages across every connected mail provider unless filtered. Pass &#x60;?accountIds&#x3D;&#x60; (repeatable) to restrict to specific accounts, &#x60;?providers&#x3D;&#x60; to restrict to specific provider ids, or both for the intersection.
1252
+ # @param [Hash] opts the optional parameters
1253
+ # @option opts [Array<String>] :account_ids Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to &#x60;providers&#x60; — when both are set the intersection is used.
1254
+ # @option opts [Array<String>] :providers Repeatable. Restrict to these provider ids (&#x60;gmail&#x60;, &#x60;outlook&#x60;).
1255
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1256
+ # @option opts [String] :query Provider-specific full-text query (e.g. Gmail search syntax).
1257
+ # @option opts [Array<String>] :labels Repeatable. Filter to messages carrying every label.
1258
+ # @option opts [String] :folder Logical folder filter. Canonical values: &#x60;inbox&#x60;, &#x60;sent&#x60;, &#x60;starred&#x60;, &#x60;trash&#x60;, &#x60;archive&#x60;. Provider-specific folders accepted as opaque strings.
1259
+ # @option opts [Integer] :limit (default to 50)
1260
+ # @option opts [Integer] :offset (default to 0)
1261
+ # @return [Array<(ListEmailsResponse, Integer, Hash)>] ListEmailsResponse data, response status code and response headers
1262
+ def list_emails_with_http_info(opts = {})
1263
+ if @api_client.config.debugging
1264
+ @api_client.config.logger.debug 'Calling API: MailApi.list_emails ...'
1265
+ end
1266
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1267
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailApi.list_emails, must be greater than or equal to 1.'
1268
+ end
1269
+
1270
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
1271
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling MailApi.list_emails, must be greater than or equal to 0.'
1272
+ end
1273
+
1274
+ # resource path
1275
+ local_var_path = '/v1/mail/list'
1276
+
1277
+ # query parameters
1278
+ query_params = opts[:query_params] || {}
1279
+ query_params[:'accountIds'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil?
1280
+ query_params[:'providers'] = @api_client.build_collection_param(opts[:'providers'], :multi) if !opts[:'providers'].nil?
1281
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
1282
+ query_params[:'labels'] = @api_client.build_collection_param(opts[:'labels'], :multi) if !opts[:'labels'].nil?
1283
+ query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
1284
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1285
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1286
+
1287
+ # header parameters
1288
+ header_params = opts[:header_params] || {}
1289
+ # HTTP header 'Accept' (if needed)
1290
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1291
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1292
+
1293
+ # form parameters
1294
+ form_params = opts[:form_params] || {}
1295
+
1296
+ # http body (model)
1297
+ post_body = opts[:debug_body]
1298
+
1299
+ # return_type
1300
+ return_type = opts[:debug_return_type] || 'ListEmailsResponse'
1301
+
1302
+ # auth_names
1303
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1304
+
1305
+ new_options = opts.merge(
1306
+ :operation => :"MailApi.list_emails",
1307
+ :header_params => header_params,
1308
+ :query_params => query_params,
1309
+ :form_params => form_params,
1310
+ :body => post_body,
1311
+ :auth_names => auth_names,
1312
+ :return_type => return_type
1313
+ )
1314
+
1315
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1316
+ if @api_client.config.debugging
1317
+ @api_client.config.logger.debug "API called: MailApi#list_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1318
+ end
1319
+ return data, status_code, headers
1320
+ end
1321
+
1322
+ # List the caller's saved mail templates.
1323
+ # @param [Hash] opts the optional parameters
1324
+ # @return [Hash<String, Object>]
1325
+ def list_mail_templates(opts = {})
1326
+ data, _status_code, _headers = list_mail_templates_with_http_info(opts)
1327
+ data
1328
+ end
1329
+
1330
+ # List the caller&#39;s saved mail templates.
1331
+ # @param [Hash] opts the optional parameters
1332
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1333
+ def list_mail_templates_with_http_info(opts = {})
1334
+ if @api_client.config.debugging
1335
+ @api_client.config.logger.debug 'Calling API: MailApi.list_mail_templates ...'
1336
+ end
1337
+ # resource path
1338
+ local_var_path = '/v1/mail/templates'
1339
+
1340
+ # query parameters
1341
+ query_params = opts[:query_params] || {}
1342
+
1343
+ # header parameters
1344
+ header_params = opts[:header_params] || {}
1345
+ # HTTP header 'Accept' (if needed)
1346
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1347
+
1348
+ # form parameters
1349
+ form_params = opts[:form_params] || {}
1350
+
1351
+ # http body (model)
1352
+ post_body = opts[:debug_body]
1353
+
1354
+ # return_type
1355
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1356
+
1357
+ # auth_names
1358
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1359
+
1360
+ new_options = opts.merge(
1361
+ :operation => :"MailApi.list_mail_templates",
1362
+ :header_params => header_params,
1363
+ :query_params => query_params,
1364
+ :form_params => form_params,
1365
+ :body => post_body,
1366
+ :auth_names => auth_names,
1367
+ :return_type => return_type
1368
+ )
1369
+
1370
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1371
+ if @api_client.config.debugging
1372
+ @api_client.config.logger.debug "API called: MailApi#list_mail_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1373
+ end
1374
+ return data, status_code, headers
1375
+ end
1376
+
1377
+ # Reply to a specific email.
1378
+ # The original message is identified by `?messageId=`. Body defaults to the original sender as recipient — pass `to`, `cc`, `bcc` to override.
1379
+ # @param message_id [String] Id of the message being replied to.
1380
+ # @param reply_email_request [ReplyEmailRequest]
1381
+ # @param [Hash] opts the optional parameters
1382
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1383
+ # @return [SendEmailResponse]
1384
+ def reply_email(message_id, reply_email_request, opts = {})
1385
+ data, _status_code, _headers = reply_email_with_http_info(message_id, reply_email_request, opts)
1386
+ data
1387
+ end
1388
+
1389
+ # Reply to a specific email.
1390
+ # The original message is identified by &#x60;?messageId&#x3D;&#x60;. Body defaults to the original sender as recipient — pass &#x60;to&#x60;, &#x60;cc&#x60;, &#x60;bcc&#x60; to override.
1391
+ # @param message_id [String] Id of the message being replied to.
1392
+ # @param reply_email_request [ReplyEmailRequest]
1393
+ # @param [Hash] opts the optional parameters
1394
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1395
+ # @return [Array<(SendEmailResponse, Integer, Hash)>] SendEmailResponse data, response status code and response headers
1396
+ def reply_email_with_http_info(message_id, reply_email_request, opts = {})
1397
+ if @api_client.config.debugging
1398
+ @api_client.config.logger.debug 'Calling API: MailApi.reply_email ...'
1399
+ end
1400
+ # verify the required parameter 'message_id' is set
1401
+ if @api_client.config.client_side_validation && message_id.nil?
1402
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.reply_email"
1403
+ end
1404
+ # verify the required parameter 'reply_email_request' is set
1405
+ if @api_client.config.client_side_validation && reply_email_request.nil?
1406
+ fail ArgumentError, "Missing the required parameter 'reply_email_request' when calling MailApi.reply_email"
1407
+ end
1408
+ # resource path
1409
+ local_var_path = '/v1/mail/reply'
1410
+
1411
+ # query parameters
1412
+ query_params = opts[:query_params] || {}
1413
+ query_params[:'messageId'] = message_id
1414
+
1415
+ # header parameters
1416
+ header_params = opts[:header_params] || {}
1417
+ # HTTP header 'Accept' (if needed)
1418
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1419
+ # HTTP header 'Content-Type'
1420
+ content_type = @api_client.select_header_content_type(['application/json'])
1421
+ if !content_type.nil?
1422
+ header_params['Content-Type'] = content_type
1423
+ end
1424
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1425
+
1426
+ # form parameters
1427
+ form_params = opts[:form_params] || {}
1428
+
1429
+ # http body (model)
1430
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(reply_email_request)
1431
+
1432
+ # return_type
1433
+ return_type = opts[:debug_return_type] || 'SendEmailResponse'
1434
+
1435
+ # auth_names
1436
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1437
+
1438
+ new_options = opts.merge(
1439
+ :operation => :"MailApi.reply_email",
1440
+ :header_params => header_params,
1441
+ :query_params => query_params,
1442
+ :form_params => form_params,
1443
+ :body => post_body,
1444
+ :auth_names => auth_names,
1445
+ :return_type => return_type
1446
+ )
1447
+
1448
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1449
+ if @api_client.config.debugging
1450
+ @api_client.config.logger.debug "API called: MailApi#reply_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1451
+ end
1452
+ return data, status_code, headers
1453
+ end
1454
+
1455
+ # Save-or-create endpoint used by the renderer's \"save as template\" flow. Distinct from POST /v1/mail/templates which is the strict create.
1456
+ # @param request_body [Hash<String, Object>]
1457
+ # @param [Hash] opts the optional parameters
1458
+ # @return [Hash<String, Object>]
1459
+ def save_mail_template(request_body, opts = {})
1460
+ data, _status_code, _headers = save_mail_template_with_http_info(request_body, opts)
1461
+ data
1462
+ end
1463
+
1464
+ # Save-or-create endpoint used by the renderer&#39;s \&quot;save as template\&quot; flow. Distinct from POST /v1/mail/templates which is the strict create.
1465
+ # @param request_body [Hash<String, Object>]
1466
+ # @param [Hash] opts the optional parameters
1467
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1468
+ def save_mail_template_with_http_info(request_body, opts = {})
1469
+ if @api_client.config.debugging
1470
+ @api_client.config.logger.debug 'Calling API: MailApi.save_mail_template ...'
1471
+ end
1472
+ # verify the required parameter 'request_body' is set
1473
+ if @api_client.config.client_side_validation && request_body.nil?
1474
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.save_mail_template"
1475
+ end
1476
+ # resource path
1477
+ local_var_path = '/v1/mail/templates/save'
1478
+
1479
+ # query parameters
1480
+ query_params = opts[:query_params] || {}
1481
+
1482
+ # header parameters
1483
+ header_params = opts[:header_params] || {}
1484
+ # HTTP header 'Accept' (if needed)
1485
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1486
+ # HTTP header 'Content-Type'
1487
+ content_type = @api_client.select_header_content_type(['application/json'])
1488
+ if !content_type.nil?
1489
+ header_params['Content-Type'] = content_type
1490
+ end
1491
+
1492
+ # form parameters
1493
+ form_params = opts[:form_params] || {}
1494
+
1495
+ # http body (model)
1496
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
1497
+
1498
+ # return_type
1499
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1500
+
1501
+ # auth_names
1502
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1503
+
1504
+ new_options = opts.merge(
1505
+ :operation => :"MailApi.save_mail_template",
1506
+ :header_params => header_params,
1507
+ :query_params => query_params,
1508
+ :form_params => form_params,
1509
+ :body => post_body,
1510
+ :auth_names => auth_names,
1511
+ :return_type => return_type
1512
+ )
1513
+
1514
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1515
+ if @api_client.config.debugging
1516
+ @api_client.config.logger.debug "API called: MailApi#save_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1517
+ end
1518
+ return data, status_code, headers
1519
+ end
1520
+
1521
+ # Structured search across connected mail accounts.
1522
+ # Fan-out search. Mirrors `listEmails`'s account/provider filter semantics. Date range filters are inclusive. The query string itself is passed via `?q=` (not `?query=`); structured filters go in their own params.
1523
+ # @param q [String] Provider-specific full-text query string.
1524
+ # @param [Hash] opts the optional parameters
1525
+ # @option opts [Array<String>] :account_ids Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to &#x60;providers&#x60; — when both are set the intersection is used.
1526
+ # @option opts [Array<String>] :providers Repeatable. Restrict to these provider ids (&#x60;gmail&#x60;, &#x60;outlook&#x60;).
1527
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1528
+ # @option opts [String] :from
1529
+ # @option opts [String] :to
1530
+ # @option opts [String] :subject
1531
+ # @option opts [Boolean] :has_attachment
1532
+ # @option opts [Boolean] :is_unread
1533
+ # @option opts [Boolean] :is_starred
1534
+ # @option opts [Array<String>] :labels
1535
+ # @option opts [Time] :after Inclusive lower-bound date.
1536
+ # @option opts [Time] :before Inclusive upper-bound date.
1537
+ # @option opts [Integer] :limit (default to 50)
1538
+ # @option opts [String] :next_page_token Cursor returned by the previous call.
1539
+ # @return [SearchEmailsResponse]
1540
+ def search_emails(q, opts = {})
1541
+ data, _status_code, _headers = search_emails_with_http_info(q, opts)
1542
+ data
1543
+ end
1544
+
1545
+ # Structured search across connected mail accounts.
1546
+ # Fan-out search. Mirrors &#x60;listEmails&#x60;&#39;s account/provider filter semantics. Date range filters are inclusive. The query string itself is passed via &#x60;?q&#x3D;&#x60; (not &#x60;?query&#x3D;&#x60;); structured filters go in their own params.
1547
+ # @param q [String] Provider-specific full-text query string.
1548
+ # @param [Hash] opts the optional parameters
1549
+ # @option opts [Array<String>] :account_ids Repeatable. Restrict to these connected-account row ids. Mutually orthogonal to &#x60;providers&#x60; — when both are set the intersection is used.
1550
+ # @option opts [Array<String>] :providers Repeatable. Restrict to these provider ids (&#x60;gmail&#x60;, &#x60;outlook&#x60;).
1551
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1552
+ # @option opts [String] :from
1553
+ # @option opts [String] :to
1554
+ # @option opts [String] :subject
1555
+ # @option opts [Boolean] :has_attachment
1556
+ # @option opts [Boolean] :is_unread
1557
+ # @option opts [Boolean] :is_starred
1558
+ # @option opts [Array<String>] :labels
1559
+ # @option opts [Time] :after Inclusive lower-bound date.
1560
+ # @option opts [Time] :before Inclusive upper-bound date.
1561
+ # @option opts [Integer] :limit (default to 50)
1562
+ # @option opts [String] :next_page_token Cursor returned by the previous call.
1563
+ # @return [Array<(SearchEmailsResponse, Integer, Hash)>] SearchEmailsResponse data, response status code and response headers
1564
+ def search_emails_with_http_info(q, opts = {})
1565
+ if @api_client.config.debugging
1566
+ @api_client.config.logger.debug 'Calling API: MailApi.search_emails ...'
1567
+ end
1568
+ # verify the required parameter 'q' is set
1569
+ if @api_client.config.client_side_validation && q.nil?
1570
+ fail ArgumentError, "Missing the required parameter 'q' when calling MailApi.search_emails"
1571
+ end
1572
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1573
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailApi.search_emails, must be greater than or equal to 1.'
1574
+ end
1575
+
1576
+ # resource path
1577
+ local_var_path = '/v1/mail/search'
1578
+
1579
+ # query parameters
1580
+ query_params = opts[:query_params] || {}
1581
+ query_params[:'q'] = q
1582
+ query_params[:'accountIds'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil?
1583
+ query_params[:'providers'] = @api_client.build_collection_param(opts[:'providers'], :multi) if !opts[:'providers'].nil?
1584
+ query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
1585
+ query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
1586
+ query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil?
1587
+ query_params[:'hasAttachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil?
1588
+ query_params[:'isUnread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil?
1589
+ query_params[:'isStarred'] = opts[:'is_starred'] if !opts[:'is_starred'].nil?
1590
+ query_params[:'labels'] = @api_client.build_collection_param(opts[:'labels'], :multi) if !opts[:'labels'].nil?
1591
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1592
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1593
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1594
+ query_params[:'nextPageToken'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil?
1595
+
1596
+ # header parameters
1597
+ header_params = opts[:header_params] || {}
1598
+ # HTTP header 'Accept' (if needed)
1599
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1600
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1601
+
1602
+ # form parameters
1603
+ form_params = opts[:form_params] || {}
1604
+
1605
+ # http body (model)
1606
+ post_body = opts[:debug_body]
1607
+
1608
+ # return_type
1609
+ return_type = opts[:debug_return_type] || 'SearchEmailsResponse'
1610
+
1611
+ # auth_names
1612
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1613
+
1614
+ new_options = opts.merge(
1615
+ :operation => :"MailApi.search_emails",
1616
+ :header_params => header_params,
1617
+ :query_params => query_params,
1618
+ :form_params => form_params,
1619
+ :body => post_body,
1620
+ :auth_names => auth_names,
1621
+ :return_type => return_type
1622
+ )
1623
+
1624
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1625
+ if @api_client.config.debugging
1626
+ @api_client.config.logger.debug "API called: MailApi#search_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1627
+ end
1628
+ return data, status_code, headers
1629
+ end
1630
+
1631
+ # Send a draft.
1632
+ # Submits the draft as an outbound message. The draft is consumed by the provider — subsequent `getDraft`/`updateDraft` calls return `404`.
1633
+ # @param id [String] Draft id.
1634
+ # @param [Hash] opts the optional parameters
1635
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
1636
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1637
+ # @return [SendEmailResponse]
1638
+ def send_draft(id, opts = {})
1639
+ data, _status_code, _headers = send_draft_with_http_info(id, opts)
1640
+ data
1641
+ end
1642
+
1643
+ # Send a draft.
1644
+ # Submits the draft as an outbound message. The draft is consumed by the provider — subsequent &#x60;getDraft&#x60;/&#x60;updateDraft&#x60; calls return &#x60;404&#x60;.
1645
+ # @param id [String] Draft id.
1646
+ # @param [Hash] opts the optional parameters
1647
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
1648
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1649
+ # @return [Array<(SendEmailResponse, Integer, Hash)>] SendEmailResponse data, response status code and response headers
1650
+ def send_draft_with_http_info(id, opts = {})
1651
+ if @api_client.config.debugging
1652
+ @api_client.config.logger.debug 'Calling API: MailApi.send_draft ...'
1653
+ end
1654
+ # verify the required parameter 'id' is set
1655
+ if @api_client.config.client_side_validation && id.nil?
1656
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.send_draft"
1657
+ end
1658
+ # resource path
1659
+ local_var_path = '/v1/mail/drafts/{id}/send'.sub('{id}', CGI.escape(id.to_s))
1660
+
1661
+ # query parameters
1662
+ query_params = opts[:query_params] || {}
1663
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
1664
+
1665
+ # header parameters
1666
+ header_params = opts[:header_params] || {}
1667
+ # HTTP header 'Accept' (if needed)
1668
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1669
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1670
+
1671
+ # form parameters
1672
+ form_params = opts[:form_params] || {}
1673
+
1674
+ # http body (model)
1675
+ post_body = opts[:debug_body]
1676
+
1677
+ # return_type
1678
+ return_type = opts[:debug_return_type] || 'SendEmailResponse'
1679
+
1680
+ # auth_names
1681
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1682
+
1683
+ new_options = opts.merge(
1684
+ :operation => :"MailApi.send_draft",
1685
+ :header_params => header_params,
1686
+ :query_params => query_params,
1687
+ :form_params => form_params,
1688
+ :body => post_body,
1689
+ :auth_names => auth_names,
1690
+ :return_type => return_type
1691
+ )
1692
+
1693
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1694
+ if @api_client.config.debugging
1695
+ @api_client.config.logger.debug "API called: MailApi#send_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1696
+ end
1697
+ return data, status_code, headers
1698
+ end
1699
+
1700
+ # Send an email.
1701
+ # Sends through the resolved connected account (auto-picks if the caller has exactly one connected mail account; errors `ambiguous_account` otherwise unless `accountId` is supplied).
1702
+ # @param send_email_request [SendEmailRequest]
1703
+ # @param [Hash] opts the optional parameters
1704
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1705
+ # @return [SendEmailResponse]
1706
+ def send_email(send_email_request, opts = {})
1707
+ data, _status_code, _headers = send_email_with_http_info(send_email_request, opts)
1708
+ data
1709
+ end
1710
+
1711
+ # Send an email.
1712
+ # Sends through the resolved connected account (auto-picks if the caller has exactly one connected mail account; errors &#x60;ambiguous_account&#x60; otherwise unless &#x60;accountId&#x60; is supplied).
1713
+ # @param send_email_request [SendEmailRequest]
1714
+ # @param [Hash] opts the optional parameters
1715
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1716
+ # @return [Array<(SendEmailResponse, Integer, Hash)>] SendEmailResponse data, response status code and response headers
1717
+ def send_email_with_http_info(send_email_request, opts = {})
1718
+ if @api_client.config.debugging
1719
+ @api_client.config.logger.debug 'Calling API: MailApi.send_email ...'
1720
+ end
1721
+ # verify the required parameter 'send_email_request' is set
1722
+ if @api_client.config.client_side_validation && send_email_request.nil?
1723
+ fail ArgumentError, "Missing the required parameter 'send_email_request' when calling MailApi.send_email"
1724
+ end
1725
+ # resource path
1726
+ local_var_path = '/v1/mail/send'
1727
+
1728
+ # query parameters
1729
+ query_params = opts[:query_params] || {}
1730
+
1731
+ # header parameters
1732
+ header_params = opts[:header_params] || {}
1733
+ # HTTP header 'Accept' (if needed)
1734
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1735
+ # HTTP header 'Content-Type'
1736
+ content_type = @api_client.select_header_content_type(['application/json'])
1737
+ if !content_type.nil?
1738
+ header_params['Content-Type'] = content_type
1739
+ end
1740
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1741
+
1742
+ # form parameters
1743
+ form_params = opts[:form_params] || {}
1744
+
1745
+ # http body (model)
1746
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(send_email_request)
1747
+
1748
+ # return_type
1749
+ return_type = opts[:debug_return_type] || 'SendEmailResponse'
1750
+
1751
+ # auth_names
1752
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1753
+
1754
+ new_options = opts.merge(
1755
+ :operation => :"MailApi.send_email",
1756
+ :header_params => header_params,
1757
+ :query_params => query_params,
1758
+ :form_params => form_params,
1759
+ :body => post_body,
1760
+ :auth_names => auth_names,
1761
+ :return_type => return_type
1762
+ )
1763
+
1764
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1765
+ if @api_client.config.debugging
1766
+ @api_client.config.logger.debug "API called: MailApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1767
+ end
1768
+ return data, status_code, headers
1769
+ end
1770
+
1771
+ # Update a draft (full replacement of provided fields).
1772
+ # PUT replaces the full set of provided fields on the draft. Fields omitted from the body are not modified.
1773
+ # @param id [String] Draft id.
1774
+ # @param update_draft_request [UpdateDraftRequest]
1775
+ # @param [Hash] opts the optional parameters
1776
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
1777
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1778
+ # @return [DraftResponse]
1779
+ def update_draft(id, update_draft_request, opts = {})
1780
+ data, _status_code, _headers = update_draft_with_http_info(id, update_draft_request, opts)
1781
+ data
1782
+ end
1783
+
1784
+ # Update a draft (full replacement of provided fields).
1785
+ # PUT replaces the full set of provided fields on the draft. Fields omitted from the body are not modified.
1786
+ # @param id [String] Draft id.
1787
+ # @param update_draft_request [UpdateDraftRequest]
1788
+ # @param [Hash] opts the optional parameters
1789
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
1790
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1791
+ # @return [Array<(DraftResponse, Integer, Hash)>] DraftResponse data, response status code and response headers
1792
+ def update_draft_with_http_info(id, update_draft_request, opts = {})
1793
+ if @api_client.config.debugging
1794
+ @api_client.config.logger.debug 'Calling API: MailApi.update_draft ...'
1795
+ end
1796
+ # verify the required parameter 'id' is set
1797
+ if @api_client.config.client_side_validation && id.nil?
1798
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.update_draft"
1799
+ end
1800
+ # verify the required parameter 'update_draft_request' is set
1801
+ if @api_client.config.client_side_validation && update_draft_request.nil?
1802
+ fail ArgumentError, "Missing the required parameter 'update_draft_request' when calling MailApi.update_draft"
1803
+ end
1804
+ # resource path
1805
+ local_var_path = '/v1/mail/drafts/{id}'.sub('{id}', CGI.escape(id.to_s))
1806
+
1807
+ # query parameters
1808
+ query_params = opts[:query_params] || {}
1809
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
1810
+
1811
+ # header parameters
1812
+ header_params = opts[:header_params] || {}
1813
+ # HTTP header 'Accept' (if needed)
1814
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1815
+ # HTTP header 'Content-Type'
1816
+ content_type = @api_client.select_header_content_type(['application/json'])
1817
+ if !content_type.nil?
1818
+ header_params['Content-Type'] = content_type
1819
+ end
1820
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1821
+
1822
+ # form parameters
1823
+ form_params = opts[:form_params] || {}
1824
+
1825
+ # http body (model)
1826
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_draft_request)
1827
+
1828
+ # return_type
1829
+ return_type = opts[:debug_return_type] || 'DraftResponse'
1830
+
1831
+ # auth_names
1832
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1833
+
1834
+ new_options = opts.merge(
1835
+ :operation => :"MailApi.update_draft",
1836
+ :header_params => header_params,
1837
+ :query_params => query_params,
1838
+ :form_params => form_params,
1839
+ :body => post_body,
1840
+ :auth_names => auth_names,
1841
+ :return_type => return_type
1842
+ )
1843
+
1844
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1845
+ if @api_client.config.debugging
1846
+ @api_client.config.logger.debug "API called: MailApi#update_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1847
+ end
1848
+ return data, status_code, headers
1849
+ end
1850
+
1851
+ # Update an email (mark read/star, add/remove labels).
1852
+ # @param id [String] Email message id.
1853
+ # @param update_email_request [UpdateEmailRequest]
1854
+ # @param [Hash] opts the optional parameters
1855
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
1856
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1857
+ # @return [UpdateEmailResponse]
1858
+ def update_email(id, update_email_request, opts = {})
1859
+ data, _status_code, _headers = update_email_with_http_info(id, update_email_request, opts)
1860
+ data
1861
+ end
1862
+
1863
+ # Update an email (mark read/star, add/remove labels).
1864
+ # @param id [String] Email message id.
1865
+ # @param update_email_request [UpdateEmailRequest]
1866
+ # @param [Hash] opts the optional parameters
1867
+ # @option opts [String] :account_id Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with &#x60;provider&#x60;. If omitted on a list endpoint the call fans out across every connected account.
1868
+ # @option opts [String] :x_workspace_id Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
1869
+ # @return [Array<(UpdateEmailResponse, Integer, Hash)>] UpdateEmailResponse data, response status code and response headers
1870
+ def update_email_with_http_info(id, update_email_request, opts = {})
1871
+ if @api_client.config.debugging
1872
+ @api_client.config.logger.debug 'Calling API: MailApi.update_email ...'
1873
+ end
1874
+ # verify the required parameter 'id' is set
1875
+ if @api_client.config.client_side_validation && id.nil?
1876
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.update_email"
1877
+ end
1878
+ # verify the required parameter 'update_email_request' is set
1879
+ if @api_client.config.client_side_validation && update_email_request.nil?
1880
+ fail ArgumentError, "Missing the required parameter 'update_email_request' when calling MailApi.update_email"
1881
+ end
1882
+ # resource path
1883
+ local_var_path = '/v1/mail/email/{id}'.sub('{id}', CGI.escape(id.to_s))
1884
+
1885
+ # query parameters
1886
+ query_params = opts[:query_params] || {}
1887
+ query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
1888
+
1889
+ # header parameters
1890
+ header_params = opts[:header_params] || {}
1891
+ # HTTP header 'Accept' (if needed)
1892
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1893
+ # HTTP header 'Content-Type'
1894
+ content_type = @api_client.select_header_content_type(['application/json'])
1895
+ if !content_type.nil?
1896
+ header_params['Content-Type'] = content_type
1897
+ end
1898
+ header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil?
1899
+
1900
+ # form parameters
1901
+ form_params = opts[:form_params] || {}
1902
+
1903
+ # http body (model)
1904
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_email_request)
1905
+
1906
+ # return_type
1907
+ return_type = opts[:debug_return_type] || 'UpdateEmailResponse'
1908
+
1909
+ # auth_names
1910
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1911
+
1912
+ new_options = opts.merge(
1913
+ :operation => :"MailApi.update_email",
1914
+ :header_params => header_params,
1915
+ :query_params => query_params,
1916
+ :form_params => form_params,
1917
+ :body => post_body,
1918
+ :auth_names => auth_names,
1919
+ :return_type => return_type
1920
+ )
1921
+
1922
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1923
+ if @api_client.config.debugging
1924
+ @api_client.config.logger.debug "API called: MailApi#update_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1925
+ end
1926
+ return data, status_code, headers
1927
+ end
1928
+
1929
+ # Update a mail template.
1930
+ # @param id [String]
1931
+ # @param request_body [Hash<String, Object>]
1932
+ # @param [Hash] opts the optional parameters
1933
+ # @return [Hash<String, Object>]
1934
+ def update_mail_template(id, request_body, opts = {})
1935
+ data, _status_code, _headers = update_mail_template_with_http_info(id, request_body, opts)
1936
+ data
1937
+ end
1938
+
1939
+ # Update a mail template.
1940
+ # @param id [String]
1941
+ # @param request_body [Hash<String, Object>]
1942
+ # @param [Hash] opts the optional parameters
1943
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1944
+ def update_mail_template_with_http_info(id, request_body, opts = {})
1945
+ if @api_client.config.debugging
1946
+ @api_client.config.logger.debug 'Calling API: MailApi.update_mail_template ...'
1947
+ end
1948
+ # verify the required parameter 'id' is set
1949
+ if @api_client.config.client_side_validation && id.nil?
1950
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.update_mail_template"
1951
+ end
1952
+ # verify the required parameter 'request_body' is set
1953
+ if @api_client.config.client_side_validation && request_body.nil?
1954
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.update_mail_template"
1955
+ end
1956
+ # resource path
1957
+ local_var_path = '/v1/mail/templates/{id}'.sub('{id}', CGI.escape(id.to_s))
1958
+
1959
+ # query parameters
1960
+ query_params = opts[:query_params] || {}
1961
+
1962
+ # header parameters
1963
+ header_params = opts[:header_params] || {}
1964
+ # HTTP header 'Accept' (if needed)
1965
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1966
+ # HTTP header 'Content-Type'
1967
+ content_type = @api_client.select_header_content_type(['application/json'])
1968
+ if !content_type.nil?
1969
+ header_params['Content-Type'] = content_type
1970
+ end
1971
+
1972
+ # form parameters
1973
+ form_params = opts[:form_params] || {}
1974
+
1975
+ # http body (model)
1976
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
1977
+
1978
+ # return_type
1979
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1980
+
1981
+ # auth_names
1982
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1983
+
1984
+ new_options = opts.merge(
1985
+ :operation => :"MailApi.update_mail_template",
1986
+ :header_params => header_params,
1987
+ :query_params => query_params,
1988
+ :form_params => form_params,
1989
+ :body => post_body,
1990
+ :auth_names => auth_names,
1991
+ :return_type => return_type
1992
+ )
1993
+
1994
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1995
+ if @api_client.config.debugging
1996
+ @api_client.config.logger.debug "API called: MailApi#update_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1997
+ end
1998
+ return data, status_code, headers
1999
+ end
2000
+
2001
+ # @param org [String]
2002
+ # @param workspace [String]
2003
+ # @param message_id [String]
2004
+ # @param request_body [Hash<String, Object>]
2005
+ # @param [Hash] opts the optional parameters
2006
+ # @return [Hash<String, Object>]
2007
+ def workspace_add_mail_message_labels(org, workspace, message_id, request_body, opts = {})
2008
+ data, _status_code, _headers = workspace_add_mail_message_labels_with_http_info(org, workspace, message_id, request_body, opts)
2009
+ data
2010
+ end
2011
+
2012
+ # @param org [String]
2013
+ # @param workspace [String]
2014
+ # @param message_id [String]
2015
+ # @param request_body [Hash<String, Object>]
2016
+ # @param [Hash] opts the optional parameters
2017
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2018
+ def workspace_add_mail_message_labels_with_http_info(org, workspace, message_id, request_body, opts = {})
2019
+ if @api_client.config.debugging
2020
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_add_mail_message_labels ...'
2021
+ end
2022
+ # verify the required parameter 'org' is set
2023
+ if @api_client.config.client_side_validation && org.nil?
2024
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_add_mail_message_labels"
2025
+ end
2026
+ # verify the required parameter 'workspace' is set
2027
+ if @api_client.config.client_side_validation && workspace.nil?
2028
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_add_mail_message_labels"
2029
+ end
2030
+ # verify the required parameter 'message_id' is set
2031
+ if @api_client.config.client_side_validation && message_id.nil?
2032
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.workspace_add_mail_message_labels"
2033
+ end
2034
+ # verify the required parameter 'request_body' is set
2035
+ if @api_client.config.client_side_validation && request_body.nil?
2036
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_add_mail_message_labels"
2037
+ end
2038
+ # resource path
2039
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/{messageId}/labels'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{messageId}', CGI.escape(message_id.to_s))
2040
+
2041
+ # query parameters
2042
+ query_params = opts[:query_params] || {}
2043
+
2044
+ # header parameters
2045
+ header_params = opts[:header_params] || {}
2046
+ # HTTP header 'Accept' (if needed)
2047
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2048
+ # HTTP header 'Content-Type'
2049
+ content_type = @api_client.select_header_content_type(['application/json'])
2050
+ if !content_type.nil?
2051
+ header_params['Content-Type'] = content_type
2052
+ end
2053
+
2054
+ # form parameters
2055
+ form_params = opts[:form_params] || {}
2056
+
2057
+ # http body (model)
2058
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
2059
+
2060
+ # return_type
2061
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2062
+
2063
+ # auth_names
2064
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2065
+
2066
+ new_options = opts.merge(
2067
+ :operation => :"MailApi.workspace_add_mail_message_labels",
2068
+ :header_params => header_params,
2069
+ :query_params => query_params,
2070
+ :form_params => form_params,
2071
+ :body => post_body,
2072
+ :auth_names => auth_names,
2073
+ :return_type => return_type
2074
+ )
2075
+
2076
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2077
+ if @api_client.config.debugging
2078
+ @api_client.config.logger.debug "API called: MailApi#workspace_add_mail_message_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2079
+ end
2080
+ return data, status_code, headers
2081
+ end
2082
+
2083
+ # @param org [String]
2084
+ # @param workspace [String]
2085
+ # @param request_body [Hash<String, Object>]
2086
+ # @param [Hash] opts the optional parameters
2087
+ # @return [Hash<String, Object>]
2088
+ def workspace_create_mail_draft(org, workspace, request_body, opts = {})
2089
+ data, _status_code, _headers = workspace_create_mail_draft_with_http_info(org, workspace, request_body, opts)
2090
+ data
2091
+ end
2092
+
2093
+ # @param org [String]
2094
+ # @param workspace [String]
2095
+ # @param request_body [Hash<String, Object>]
2096
+ # @param [Hash] opts the optional parameters
2097
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2098
+ def workspace_create_mail_draft_with_http_info(org, workspace, request_body, opts = {})
2099
+ if @api_client.config.debugging
2100
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_create_mail_draft ...'
2101
+ end
2102
+ # verify the required parameter 'org' is set
2103
+ if @api_client.config.client_side_validation && org.nil?
2104
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_create_mail_draft"
2105
+ end
2106
+ # verify the required parameter 'workspace' is set
2107
+ if @api_client.config.client_side_validation && workspace.nil?
2108
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_create_mail_draft"
2109
+ end
2110
+ # verify the required parameter 'request_body' is set
2111
+ if @api_client.config.client_side_validation && request_body.nil?
2112
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_create_mail_draft"
2113
+ end
2114
+ # resource path
2115
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
2116
+
2117
+ # query parameters
2118
+ query_params = opts[:query_params] || {}
2119
+
2120
+ # header parameters
2121
+ header_params = opts[:header_params] || {}
2122
+ # HTTP header 'Accept' (if needed)
2123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2124
+ # HTTP header 'Content-Type'
2125
+ content_type = @api_client.select_header_content_type(['application/json'])
2126
+ if !content_type.nil?
2127
+ header_params['Content-Type'] = content_type
2128
+ end
2129
+
2130
+ # form parameters
2131
+ form_params = opts[:form_params] || {}
2132
+
2133
+ # http body (model)
2134
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
2135
+
2136
+ # return_type
2137
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2138
+
2139
+ # auth_names
2140
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2141
+
2142
+ new_options = opts.merge(
2143
+ :operation => :"MailApi.workspace_create_mail_draft",
2144
+ :header_params => header_params,
2145
+ :query_params => query_params,
2146
+ :form_params => form_params,
2147
+ :body => post_body,
2148
+ :auth_names => auth_names,
2149
+ :return_type => return_type
2150
+ )
2151
+
2152
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2153
+ if @api_client.config.debugging
2154
+ @api_client.config.logger.debug "API called: MailApi#workspace_create_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2155
+ end
2156
+ return data, status_code, headers
2157
+ end
2158
+
2159
+ # @param org [String]
2160
+ # @param workspace [String]
2161
+ # @param request_body [Hash<String, Object>]
2162
+ # @param [Hash] opts the optional parameters
2163
+ # @return [Hash<String, Object>]
2164
+ def workspace_create_mail_label(org, workspace, request_body, opts = {})
2165
+ data, _status_code, _headers = workspace_create_mail_label_with_http_info(org, workspace, request_body, opts)
2166
+ data
2167
+ end
2168
+
2169
+ # @param org [String]
2170
+ # @param workspace [String]
2171
+ # @param request_body [Hash<String, Object>]
2172
+ # @param [Hash] opts the optional parameters
2173
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2174
+ def workspace_create_mail_label_with_http_info(org, workspace, request_body, opts = {})
2175
+ if @api_client.config.debugging
2176
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_create_mail_label ...'
2177
+ end
2178
+ # verify the required parameter 'org' is set
2179
+ if @api_client.config.client_side_validation && org.nil?
2180
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_create_mail_label"
2181
+ end
2182
+ # verify the required parameter 'workspace' is set
2183
+ if @api_client.config.client_side_validation && workspace.nil?
2184
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_create_mail_label"
2185
+ end
2186
+ # verify the required parameter 'request_body' is set
2187
+ if @api_client.config.client_side_validation && request_body.nil?
2188
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_create_mail_label"
2189
+ end
2190
+ # resource path
2191
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/labels'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
2192
+
2193
+ # query parameters
2194
+ query_params = opts[:query_params] || {}
2195
+
2196
+ # header parameters
2197
+ header_params = opts[:header_params] || {}
2198
+ # HTTP header 'Accept' (if needed)
2199
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2200
+ # HTTP header 'Content-Type'
2201
+ content_type = @api_client.select_header_content_type(['application/json'])
2202
+ if !content_type.nil?
2203
+ header_params['Content-Type'] = content_type
2204
+ end
2205
+
2206
+ # form parameters
2207
+ form_params = opts[:form_params] || {}
2208
+
2209
+ # http body (model)
2210
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
2211
+
2212
+ # return_type
2213
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2214
+
2215
+ # auth_names
2216
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2217
+
2218
+ new_options = opts.merge(
2219
+ :operation => :"MailApi.workspace_create_mail_label",
2220
+ :header_params => header_params,
2221
+ :query_params => query_params,
2222
+ :form_params => form_params,
2223
+ :body => post_body,
2224
+ :auth_names => auth_names,
2225
+ :return_type => return_type
2226
+ )
2227
+
2228
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2229
+ if @api_client.config.debugging
2230
+ @api_client.config.logger.debug "API called: MailApi#workspace_create_mail_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2231
+ end
2232
+ return data, status_code, headers
2233
+ end
2234
+
2235
+ # @param org [String]
2236
+ # @param workspace [String]
2237
+ # @param id [String]
2238
+ # @param [Hash] opts the optional parameters
2239
+ # @return [nil]
2240
+ def workspace_delete_mail(org, workspace, id, opts = {})
2241
+ workspace_delete_mail_with_http_info(org, workspace, id, opts)
2242
+ nil
2243
+ end
2244
+
2245
+ # @param org [String]
2246
+ # @param workspace [String]
2247
+ # @param id [String]
2248
+ # @param [Hash] opts the optional parameters
2249
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2250
+ def workspace_delete_mail_with_http_info(org, workspace, id, opts = {})
2251
+ if @api_client.config.debugging
2252
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_delete_mail ...'
2253
+ end
2254
+ # verify the required parameter 'org' is set
2255
+ if @api_client.config.client_side_validation && org.nil?
2256
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_delete_mail"
2257
+ end
2258
+ # verify the required parameter 'workspace' is set
2259
+ if @api_client.config.client_side_validation && workspace.nil?
2260
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_delete_mail"
2261
+ end
2262
+ # verify the required parameter 'id' is set
2263
+ if @api_client.config.client_side_validation && id.nil?
2264
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_delete_mail"
2265
+ end
2266
+ # resource path
2267
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
2268
+
2269
+ # query parameters
2270
+ query_params = opts[:query_params] || {}
2271
+
2272
+ # header parameters
2273
+ header_params = opts[:header_params] || {}
2274
+ # HTTP header 'Accept' (if needed)
2275
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2276
+
2277
+ # form parameters
2278
+ form_params = opts[:form_params] || {}
2279
+
2280
+ # http body (model)
2281
+ post_body = opts[:debug_body]
2282
+
2283
+ # return_type
2284
+ return_type = opts[:debug_return_type]
2285
+
2286
+ # auth_names
2287
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2288
+
2289
+ new_options = opts.merge(
2290
+ :operation => :"MailApi.workspace_delete_mail",
2291
+ :header_params => header_params,
2292
+ :query_params => query_params,
2293
+ :form_params => form_params,
2294
+ :body => post_body,
2295
+ :auth_names => auth_names,
2296
+ :return_type => return_type
2297
+ )
2298
+
2299
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2300
+ if @api_client.config.debugging
2301
+ @api_client.config.logger.debug "API called: MailApi#workspace_delete_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2302
+ end
2303
+ return data, status_code, headers
2304
+ end
2305
+
2306
+ # @param org [String]
2307
+ # @param workspace [String]
2308
+ # @param id [String]
2309
+ # @param [Hash] opts the optional parameters
2310
+ # @return [nil]
2311
+ def workspace_delete_mail_draft(org, workspace, id, opts = {})
2312
+ workspace_delete_mail_draft_with_http_info(org, workspace, id, opts)
2313
+ nil
2314
+ end
2315
+
2316
+ # @param org [String]
2317
+ # @param workspace [String]
2318
+ # @param id [String]
2319
+ # @param [Hash] opts the optional parameters
2320
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2321
+ def workspace_delete_mail_draft_with_http_info(org, workspace, id, opts = {})
2322
+ if @api_client.config.debugging
2323
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_delete_mail_draft ...'
2324
+ end
2325
+ # verify the required parameter 'org' is set
2326
+ if @api_client.config.client_side_validation && org.nil?
2327
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_delete_mail_draft"
2328
+ end
2329
+ # verify the required parameter 'workspace' is set
2330
+ if @api_client.config.client_side_validation && workspace.nil?
2331
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_delete_mail_draft"
2332
+ end
2333
+ # verify the required parameter 'id' is set
2334
+ if @api_client.config.client_side_validation && id.nil?
2335
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_delete_mail_draft"
2336
+ end
2337
+ # resource path
2338
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
2339
+
2340
+ # query parameters
2341
+ query_params = opts[:query_params] || {}
2342
+
2343
+ # header parameters
2344
+ header_params = opts[:header_params] || {}
2345
+ # HTTP header 'Accept' (if needed)
2346
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2347
+
2348
+ # form parameters
2349
+ form_params = opts[:form_params] || {}
2350
+
2351
+ # http body (model)
2352
+ post_body = opts[:debug_body]
2353
+
2354
+ # return_type
2355
+ return_type = opts[:debug_return_type]
2356
+
2357
+ # auth_names
2358
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2359
+
2360
+ new_options = opts.merge(
2361
+ :operation => :"MailApi.workspace_delete_mail_draft",
2362
+ :header_params => header_params,
2363
+ :query_params => query_params,
2364
+ :form_params => form_params,
2365
+ :body => post_body,
2366
+ :auth_names => auth_names,
2367
+ :return_type => return_type
2368
+ )
2369
+
2370
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2371
+ if @api_client.config.debugging
2372
+ @api_client.config.logger.debug "API called: MailApi#workspace_delete_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2373
+ end
2374
+ return data, status_code, headers
2375
+ end
2376
+
2377
+ # @param org [String]
2378
+ # @param workspace [String]
2379
+ # @param id [String]
2380
+ # @param [Hash] opts the optional parameters
2381
+ # @return [nil]
2382
+ def workspace_delete_mail_label(org, workspace, id, opts = {})
2383
+ workspace_delete_mail_label_with_http_info(org, workspace, id, opts)
2384
+ nil
2385
+ end
2386
+
2387
+ # @param org [String]
2388
+ # @param workspace [String]
2389
+ # @param id [String]
2390
+ # @param [Hash] opts the optional parameters
2391
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2392
+ def workspace_delete_mail_label_with_http_info(org, workspace, id, opts = {})
2393
+ if @api_client.config.debugging
2394
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_delete_mail_label ...'
2395
+ end
2396
+ # verify the required parameter 'org' is set
2397
+ if @api_client.config.client_side_validation && org.nil?
2398
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_delete_mail_label"
2399
+ end
2400
+ # verify the required parameter 'workspace' is set
2401
+ if @api_client.config.client_side_validation && workspace.nil?
2402
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_delete_mail_label"
2403
+ end
2404
+ # verify the required parameter 'id' is set
2405
+ if @api_client.config.client_side_validation && id.nil?
2406
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_delete_mail_label"
2407
+ end
2408
+ # resource path
2409
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/labels/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
2410
+
2411
+ # query parameters
2412
+ query_params = opts[:query_params] || {}
2413
+
2414
+ # header parameters
2415
+ header_params = opts[:header_params] || {}
2416
+ # HTTP header 'Accept' (if needed)
2417
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2418
+
2419
+ # form parameters
2420
+ form_params = opts[:form_params] || {}
2421
+
2422
+ # http body (model)
2423
+ post_body = opts[:debug_body]
2424
+
2425
+ # return_type
2426
+ return_type = opts[:debug_return_type]
2427
+
2428
+ # auth_names
2429
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2430
+
2431
+ new_options = opts.merge(
2432
+ :operation => :"MailApi.workspace_delete_mail_label",
2433
+ :header_params => header_params,
2434
+ :query_params => query_params,
2435
+ :form_params => form_params,
2436
+ :body => post_body,
2437
+ :auth_names => auth_names,
2438
+ :return_type => return_type
2439
+ )
2440
+
2441
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2442
+ if @api_client.config.debugging
2443
+ @api_client.config.logger.debug "API called: MailApi#workspace_delete_mail_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2444
+ end
2445
+ return data, status_code, headers
2446
+ end
2447
+
2448
+ # @param org [String]
2449
+ # @param workspace [String]
2450
+ # @param id [String]
2451
+ # @param [Hash] opts the optional parameters
2452
+ # @return [Hash<String, Object>]
2453
+ def workspace_get_mail(org, workspace, id, opts = {})
2454
+ data, _status_code, _headers = workspace_get_mail_with_http_info(org, workspace, id, opts)
2455
+ data
2456
+ end
2457
+
2458
+ # @param org [String]
2459
+ # @param workspace [String]
2460
+ # @param id [String]
2461
+ # @param [Hash] opts the optional parameters
2462
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2463
+ def workspace_get_mail_with_http_info(org, workspace, id, opts = {})
2464
+ if @api_client.config.debugging
2465
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail ...'
2466
+ end
2467
+ # verify the required parameter 'org' is set
2468
+ if @api_client.config.client_side_validation && org.nil?
2469
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail"
2470
+ end
2471
+ # verify the required parameter 'workspace' is set
2472
+ if @api_client.config.client_side_validation && workspace.nil?
2473
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail"
2474
+ end
2475
+ # verify the required parameter 'id' is set
2476
+ if @api_client.config.client_side_validation && id.nil?
2477
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_get_mail"
2478
+ end
2479
+ # resource path
2480
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
2481
+
2482
+ # query parameters
2483
+ query_params = opts[:query_params] || {}
2484
+
2485
+ # header parameters
2486
+ header_params = opts[:header_params] || {}
2487
+ # HTTP header 'Accept' (if needed)
2488
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2489
+
2490
+ # form parameters
2491
+ form_params = opts[:form_params] || {}
2492
+
2493
+ # http body (model)
2494
+ post_body = opts[:debug_body]
2495
+
2496
+ # return_type
2497
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2498
+
2499
+ # auth_names
2500
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2501
+
2502
+ new_options = opts.merge(
2503
+ :operation => :"MailApi.workspace_get_mail",
2504
+ :header_params => header_params,
2505
+ :query_params => query_params,
2506
+ :form_params => form_params,
2507
+ :body => post_body,
2508
+ :auth_names => auth_names,
2509
+ :return_type => return_type
2510
+ )
2511
+
2512
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2513
+ if @api_client.config.debugging
2514
+ @api_client.config.logger.debug "API called: MailApi#workspace_get_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2515
+ end
2516
+ return data, status_code, headers
2517
+ end
2518
+
2519
+ # @param org [String]
2520
+ # @param workspace [String]
2521
+ # @param message_id [String]
2522
+ # @param attachment_id [String]
2523
+ # @param [Hash] opts the optional parameters
2524
+ # @return [Hash<String, Object>]
2525
+ def workspace_get_mail_attachment(org, workspace, message_id, attachment_id, opts = {})
2526
+ data, _status_code, _headers = workspace_get_mail_attachment_with_http_info(org, workspace, message_id, attachment_id, opts)
2527
+ data
2528
+ end
2529
+
2530
+ # @param org [String]
2531
+ # @param workspace [String]
2532
+ # @param message_id [String]
2533
+ # @param attachment_id [String]
2534
+ # @param [Hash] opts the optional parameters
2535
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2536
+ def workspace_get_mail_attachment_with_http_info(org, workspace, message_id, attachment_id, opts = {})
2537
+ if @api_client.config.debugging
2538
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail_attachment ...'
2539
+ end
2540
+ # verify the required parameter 'org' is set
2541
+ if @api_client.config.client_side_validation && org.nil?
2542
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail_attachment"
2543
+ end
2544
+ # verify the required parameter 'workspace' is set
2545
+ if @api_client.config.client_side_validation && workspace.nil?
2546
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail_attachment"
2547
+ end
2548
+ # verify the required parameter 'message_id' is set
2549
+ if @api_client.config.client_side_validation && message_id.nil?
2550
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.workspace_get_mail_attachment"
2551
+ end
2552
+ # verify the required parameter 'attachment_id' is set
2553
+ if @api_client.config.client_side_validation && attachment_id.nil?
2554
+ fail ArgumentError, "Missing the required parameter 'attachment_id' when calling MailApi.workspace_get_mail_attachment"
2555
+ end
2556
+ # resource path
2557
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/attachment/{messageId}/{attachmentId}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{messageId}', CGI.escape(message_id.to_s)).sub('{attachmentId}', CGI.escape(attachment_id.to_s))
2558
+
2559
+ # query parameters
2560
+ query_params = opts[:query_params] || {}
2561
+
2562
+ # header parameters
2563
+ header_params = opts[:header_params] || {}
2564
+ # HTTP header 'Accept' (if needed)
2565
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2566
+
2567
+ # form parameters
2568
+ form_params = opts[:form_params] || {}
2569
+
2570
+ # http body (model)
2571
+ post_body = opts[:debug_body]
2572
+
2573
+ # return_type
2574
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2575
+
2576
+ # auth_names
2577
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2578
+
2579
+ new_options = opts.merge(
2580
+ :operation => :"MailApi.workspace_get_mail_attachment",
2581
+ :header_params => header_params,
2582
+ :query_params => query_params,
2583
+ :form_params => form_params,
2584
+ :body => post_body,
2585
+ :auth_names => auth_names,
2586
+ :return_type => return_type
2587
+ )
2588
+
2589
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2590
+ if @api_client.config.debugging
2591
+ @api_client.config.logger.debug "API called: MailApi#workspace_get_mail_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2592
+ end
2593
+ return data, status_code, headers
2594
+ end
2595
+
2596
+ # Workspace-scoped renderer-compat alias for mail/email/{id}.
2597
+ # @param org [String]
2598
+ # @param workspace [String]
2599
+ # @param id [String]
2600
+ # @param [Hash] opts the optional parameters
2601
+ # @return [Hash<String, Object>]
2602
+ def workspace_get_mail_by_id(org, workspace, id, opts = {})
2603
+ data, _status_code, _headers = workspace_get_mail_by_id_with_http_info(org, workspace, id, opts)
2604
+ data
2605
+ end
2606
+
2607
+ # Workspace-scoped renderer-compat alias for mail/email/{id}.
2608
+ # @param org [String]
2609
+ # @param workspace [String]
2610
+ # @param id [String]
2611
+ # @param [Hash] opts the optional parameters
2612
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2613
+ def workspace_get_mail_by_id_with_http_info(org, workspace, id, opts = {})
2614
+ if @api_client.config.debugging
2615
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail_by_id ...'
2616
+ end
2617
+ # verify the required parameter 'org' is set
2618
+ if @api_client.config.client_side_validation && org.nil?
2619
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail_by_id"
2620
+ end
2621
+ # verify the required parameter 'workspace' is set
2622
+ if @api_client.config.client_side_validation && workspace.nil?
2623
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail_by_id"
2624
+ end
2625
+ # verify the required parameter 'id' is set
2626
+ if @api_client.config.client_side_validation && id.nil?
2627
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_get_mail_by_id"
2628
+ end
2629
+ # resource path
2630
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
2631
+
2632
+ # query parameters
2633
+ query_params = opts[:query_params] || {}
2634
+
2635
+ # header parameters
2636
+ header_params = opts[:header_params] || {}
2637
+ # HTTP header 'Accept' (if needed)
2638
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2639
+
2640
+ # form parameters
2641
+ form_params = opts[:form_params] || {}
2642
+
2643
+ # http body (model)
2644
+ post_body = opts[:debug_body]
2645
+
2646
+ # return_type
2647
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2648
+
2649
+ # auth_names
2650
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2651
+
2652
+ new_options = opts.merge(
2653
+ :operation => :"MailApi.workspace_get_mail_by_id",
2654
+ :header_params => header_params,
2655
+ :query_params => query_params,
2656
+ :form_params => form_params,
2657
+ :body => post_body,
2658
+ :auth_names => auth_names,
2659
+ :return_type => return_type
2660
+ )
2661
+
2662
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2663
+ if @api_client.config.debugging
2664
+ @api_client.config.logger.debug "API called: MailApi#workspace_get_mail_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2665
+ end
2666
+ return data, status_code, headers
2667
+ end
2668
+
2669
+ # @param org [String]
2670
+ # @param workspace [String]
2671
+ # @param id [String]
2672
+ # @param [Hash] opts the optional parameters
2673
+ # @return [Hash<String, Object>]
2674
+ def workspace_get_mail_draft(org, workspace, id, opts = {})
2675
+ data, _status_code, _headers = workspace_get_mail_draft_with_http_info(org, workspace, id, opts)
2676
+ data
2677
+ end
2678
+
2679
+ # @param org [String]
2680
+ # @param workspace [String]
2681
+ # @param id [String]
2682
+ # @param [Hash] opts the optional parameters
2683
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2684
+ def workspace_get_mail_draft_with_http_info(org, workspace, id, opts = {})
2685
+ if @api_client.config.debugging
2686
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail_draft ...'
2687
+ end
2688
+ # verify the required parameter 'org' is set
2689
+ if @api_client.config.client_side_validation && org.nil?
2690
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail_draft"
2691
+ end
2692
+ # verify the required parameter 'workspace' is set
2693
+ if @api_client.config.client_side_validation && workspace.nil?
2694
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail_draft"
2695
+ end
2696
+ # verify the required parameter 'id' is set
2697
+ if @api_client.config.client_side_validation && id.nil?
2698
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_get_mail_draft"
2699
+ end
2700
+ # resource path
2701
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
2702
+
2703
+ # query parameters
2704
+ query_params = opts[:query_params] || {}
2705
+
2706
+ # header parameters
2707
+ header_params = opts[:header_params] || {}
2708
+ # HTTP header 'Accept' (if needed)
2709
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2710
+
2711
+ # form parameters
2712
+ form_params = opts[:form_params] || {}
2713
+
2714
+ # http body (model)
2715
+ post_body = opts[:debug_body]
2716
+
2717
+ # return_type
2718
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2719
+
2720
+ # auth_names
2721
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2722
+
2723
+ new_options = opts.merge(
2724
+ :operation => :"MailApi.workspace_get_mail_draft",
2725
+ :header_params => header_params,
2726
+ :query_params => query_params,
2727
+ :form_params => form_params,
2728
+ :body => post_body,
2729
+ :auth_names => auth_names,
2730
+ :return_type => return_type
2731
+ )
2732
+
2733
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2734
+ if @api_client.config.debugging
2735
+ @api_client.config.logger.debug "API called: MailApi#workspace_get_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2736
+ end
2737
+ return data, status_code, headers
2738
+ end
2739
+
2740
+ # @param org [String]
2741
+ # @param workspace [String]
2742
+ # @param id [String]
2743
+ # @param [Hash] opts the optional parameters
2744
+ # @return [Hash<String, Object>]
2745
+ def workspace_get_mail_thread(org, workspace, id, opts = {})
2746
+ data, _status_code, _headers = workspace_get_mail_thread_with_http_info(org, workspace, id, opts)
2747
+ data
2748
+ end
2749
+
2750
+ # @param org [String]
2751
+ # @param workspace [String]
2752
+ # @param id [String]
2753
+ # @param [Hash] opts the optional parameters
2754
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2755
+ def workspace_get_mail_thread_with_http_info(org, workspace, id, opts = {})
2756
+ if @api_client.config.debugging
2757
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail_thread ...'
2758
+ end
2759
+ # verify the required parameter 'org' is set
2760
+ if @api_client.config.client_side_validation && org.nil?
2761
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail_thread"
2762
+ end
2763
+ # verify the required parameter 'workspace' is set
2764
+ if @api_client.config.client_side_validation && workspace.nil?
2765
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail_thread"
2766
+ end
2767
+ # verify the required parameter 'id' is set
2768
+ if @api_client.config.client_side_validation && id.nil?
2769
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_get_mail_thread"
2770
+ end
2771
+ # resource path
2772
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/thread/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
2773
+
2774
+ # query parameters
2775
+ query_params = opts[:query_params] || {}
2776
+
2777
+ # header parameters
2778
+ header_params = opts[:header_params] || {}
2779
+ # HTTP header 'Accept' (if needed)
2780
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2781
+
2782
+ # form parameters
2783
+ form_params = opts[:form_params] || {}
2784
+
2785
+ # http body (model)
2786
+ post_body = opts[:debug_body]
2787
+
2788
+ # return_type
2789
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2790
+
2791
+ # auth_names
2792
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2793
+
2794
+ new_options = opts.merge(
2795
+ :operation => :"MailApi.workspace_get_mail_thread",
2796
+ :header_params => header_params,
2797
+ :query_params => query_params,
2798
+ :form_params => form_params,
2799
+ :body => post_body,
2800
+ :auth_names => auth_names,
2801
+ :return_type => return_type
2802
+ )
2803
+
2804
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2805
+ if @api_client.config.debugging
2806
+ @api_client.config.logger.debug "API called: MailApi#workspace_get_mail_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2807
+ end
2808
+ return data, status_code, headers
2809
+ end
2810
+
2811
+ # @param org [String]
2812
+ # @param workspace [String]
2813
+ # @param [Hash] opts the optional parameters
2814
+ # @return [Hash<String, Object>]
2815
+ def workspace_list_mail(org, workspace, opts = {})
2816
+ data, _status_code, _headers = workspace_list_mail_with_http_info(org, workspace, opts)
2817
+ data
2818
+ end
2819
+
2820
+ # @param org [String]
2821
+ # @param workspace [String]
2822
+ # @param [Hash] opts the optional parameters
2823
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2824
+ def workspace_list_mail_with_http_info(org, workspace, opts = {})
2825
+ if @api_client.config.debugging
2826
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_list_mail ...'
2827
+ end
2828
+ # verify the required parameter 'org' is set
2829
+ if @api_client.config.client_side_validation && org.nil?
2830
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_list_mail"
2831
+ end
2832
+ # verify the required parameter 'workspace' is set
2833
+ if @api_client.config.client_side_validation && workspace.nil?
2834
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_list_mail"
2835
+ end
2836
+ # resource path
2837
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/list'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
2838
+
2839
+ # query parameters
2840
+ query_params = opts[:query_params] || {}
2841
+
2842
+ # header parameters
2843
+ header_params = opts[:header_params] || {}
2844
+ # HTTP header 'Accept' (if needed)
2845
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2846
+
2847
+ # form parameters
2848
+ form_params = opts[:form_params] || {}
2849
+
2850
+ # http body (model)
2851
+ post_body = opts[:debug_body]
2852
+
2853
+ # return_type
2854
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2855
+
2856
+ # auth_names
2857
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2858
+
2859
+ new_options = opts.merge(
2860
+ :operation => :"MailApi.workspace_list_mail",
2861
+ :header_params => header_params,
2862
+ :query_params => query_params,
2863
+ :form_params => form_params,
2864
+ :body => post_body,
2865
+ :auth_names => auth_names,
2866
+ :return_type => return_type
2867
+ )
2868
+
2869
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2870
+ if @api_client.config.debugging
2871
+ @api_client.config.logger.debug "API called: MailApi#workspace_list_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2872
+ end
2873
+ return data, status_code, headers
2874
+ end
2875
+
2876
+ # @param org [String]
2877
+ # @param workspace [String]
2878
+ # @param [Hash] opts the optional parameters
2879
+ # @return [Hash<String, Object>]
2880
+ def workspace_list_mail_drafts(org, workspace, opts = {})
2881
+ data, _status_code, _headers = workspace_list_mail_drafts_with_http_info(org, workspace, opts)
2882
+ data
2883
+ end
2884
+
2885
+ # @param org [String]
2886
+ # @param workspace [String]
2887
+ # @param [Hash] opts the optional parameters
2888
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2889
+ def workspace_list_mail_drafts_with_http_info(org, workspace, opts = {})
2890
+ if @api_client.config.debugging
2891
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_list_mail_drafts ...'
2892
+ end
2893
+ # verify the required parameter 'org' is set
2894
+ if @api_client.config.client_side_validation && org.nil?
2895
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_list_mail_drafts"
2896
+ end
2897
+ # verify the required parameter 'workspace' is set
2898
+ if @api_client.config.client_side_validation && workspace.nil?
2899
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_list_mail_drafts"
2900
+ end
2901
+ # resource path
2902
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
2903
+
2904
+ # query parameters
2905
+ query_params = opts[:query_params] || {}
2906
+
2907
+ # header parameters
2908
+ header_params = opts[:header_params] || {}
2909
+ # HTTP header 'Accept' (if needed)
2910
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2911
+
2912
+ # form parameters
2913
+ form_params = opts[:form_params] || {}
2914
+
2915
+ # http body (model)
2916
+ post_body = opts[:debug_body]
2917
+
2918
+ # return_type
2919
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2920
+
2921
+ # auth_names
2922
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2923
+
2924
+ new_options = opts.merge(
2925
+ :operation => :"MailApi.workspace_list_mail_drafts",
2926
+ :header_params => header_params,
2927
+ :query_params => query_params,
2928
+ :form_params => form_params,
2929
+ :body => post_body,
2930
+ :auth_names => auth_names,
2931
+ :return_type => return_type
2932
+ )
2933
+
2934
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2935
+ if @api_client.config.debugging
2936
+ @api_client.config.logger.debug "API called: MailApi#workspace_list_mail_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2937
+ end
2938
+ return data, status_code, headers
2939
+ end
2940
+
2941
+ # @param org [String]
2942
+ # @param workspace [String]
2943
+ # @param [Hash] opts the optional parameters
2944
+ # @return [Hash<String, Object>]
2945
+ def workspace_list_mail_labels(org, workspace, opts = {})
2946
+ data, _status_code, _headers = workspace_list_mail_labels_with_http_info(org, workspace, opts)
2947
+ data
2948
+ end
2949
+
2950
+ # @param org [String]
2951
+ # @param workspace [String]
2952
+ # @param [Hash] opts the optional parameters
2953
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2954
+ def workspace_list_mail_labels_with_http_info(org, workspace, opts = {})
2955
+ if @api_client.config.debugging
2956
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_list_mail_labels ...'
2957
+ end
2958
+ # verify the required parameter 'org' is set
2959
+ if @api_client.config.client_side_validation && org.nil?
2960
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_list_mail_labels"
2961
+ end
2962
+ # verify the required parameter 'workspace' is set
2963
+ if @api_client.config.client_side_validation && workspace.nil?
2964
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_list_mail_labels"
2965
+ end
2966
+ # resource path
2967
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/labels'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
2968
+
2969
+ # query parameters
2970
+ query_params = opts[:query_params] || {}
2971
+
2972
+ # header parameters
2973
+ header_params = opts[:header_params] || {}
2974
+ # HTTP header 'Accept' (if needed)
2975
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2976
+
2977
+ # form parameters
2978
+ form_params = opts[:form_params] || {}
2979
+
2980
+ # http body (model)
2981
+ post_body = opts[:debug_body]
2982
+
2983
+ # return_type
2984
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2985
+
2986
+ # auth_names
2987
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
2988
+
2989
+ new_options = opts.merge(
2990
+ :operation => :"MailApi.workspace_list_mail_labels",
2991
+ :header_params => header_params,
2992
+ :query_params => query_params,
2993
+ :form_params => form_params,
2994
+ :body => post_body,
2995
+ :auth_names => auth_names,
2996
+ :return_type => return_type
2997
+ )
2998
+
2999
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3000
+ if @api_client.config.debugging
3001
+ @api_client.config.logger.debug "API called: MailApi#workspace_list_mail_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3002
+ end
3003
+ return data, status_code, headers
3004
+ end
3005
+
3006
+ # @param org [String]
3007
+ # @param workspace [String]
3008
+ # @param id [String]
3009
+ # @param request_body [Hash<String, Object>]
3010
+ # @param [Hash] opts the optional parameters
3011
+ # @return [Hash<String, Object>]
3012
+ def workspace_patch_mail(org, workspace, id, request_body, opts = {})
3013
+ data, _status_code, _headers = workspace_patch_mail_with_http_info(org, workspace, id, request_body, opts)
3014
+ data
3015
+ end
3016
+
3017
+ # @param org [String]
3018
+ # @param workspace [String]
3019
+ # @param id [String]
3020
+ # @param request_body [Hash<String, Object>]
3021
+ # @param [Hash] opts the optional parameters
3022
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3023
+ def workspace_patch_mail_with_http_info(org, workspace, id, request_body, opts = {})
3024
+ if @api_client.config.debugging
3025
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_patch_mail ...'
3026
+ end
3027
+ # verify the required parameter 'org' is set
3028
+ if @api_client.config.client_side_validation && org.nil?
3029
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_patch_mail"
3030
+ end
3031
+ # verify the required parameter 'workspace' is set
3032
+ if @api_client.config.client_side_validation && workspace.nil?
3033
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_patch_mail"
3034
+ end
3035
+ # verify the required parameter 'id' is set
3036
+ if @api_client.config.client_side_validation && id.nil?
3037
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_patch_mail"
3038
+ end
3039
+ # verify the required parameter 'request_body' is set
3040
+ if @api_client.config.client_side_validation && request_body.nil?
3041
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_patch_mail"
3042
+ end
3043
+ # resource path
3044
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
3045
+
3046
+ # query parameters
3047
+ query_params = opts[:query_params] || {}
3048
+
3049
+ # header parameters
3050
+ header_params = opts[:header_params] || {}
3051
+ # HTTP header 'Accept' (if needed)
3052
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3053
+ # HTTP header 'Content-Type'
3054
+ content_type = @api_client.select_header_content_type(['application/json'])
3055
+ if !content_type.nil?
3056
+ header_params['Content-Type'] = content_type
3057
+ end
3058
+
3059
+ # form parameters
3060
+ form_params = opts[:form_params] || {}
3061
+
3062
+ # http body (model)
3063
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
3064
+
3065
+ # return_type
3066
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3067
+
3068
+ # auth_names
3069
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3070
+
3071
+ new_options = opts.merge(
3072
+ :operation => :"MailApi.workspace_patch_mail",
3073
+ :header_params => header_params,
3074
+ :query_params => query_params,
3075
+ :form_params => form_params,
3076
+ :body => post_body,
3077
+ :auth_names => auth_names,
3078
+ :return_type => return_type
3079
+ )
3080
+
3081
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
3082
+ if @api_client.config.debugging
3083
+ @api_client.config.logger.debug "API called: MailApi#workspace_patch_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3084
+ end
3085
+ return data, status_code, headers
3086
+ end
3087
+
3088
+ # @param org [String]
3089
+ # @param workspace [String]
3090
+ # @param message_id [String]
3091
+ # @param label_id [String]
3092
+ # @param [Hash] opts the optional parameters
3093
+ # @return [nil]
3094
+ def workspace_remove_mail_message_label(org, workspace, message_id, label_id, opts = {})
3095
+ workspace_remove_mail_message_label_with_http_info(org, workspace, message_id, label_id, opts)
3096
+ nil
3097
+ end
3098
+
3099
+ # @param org [String]
3100
+ # @param workspace [String]
3101
+ # @param message_id [String]
3102
+ # @param label_id [String]
3103
+ # @param [Hash] opts the optional parameters
3104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3105
+ def workspace_remove_mail_message_label_with_http_info(org, workspace, message_id, label_id, opts = {})
3106
+ if @api_client.config.debugging
3107
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_remove_mail_message_label ...'
3108
+ end
3109
+ # verify the required parameter 'org' is set
3110
+ if @api_client.config.client_side_validation && org.nil?
3111
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_remove_mail_message_label"
3112
+ end
3113
+ # verify the required parameter 'workspace' is set
3114
+ if @api_client.config.client_side_validation && workspace.nil?
3115
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_remove_mail_message_label"
3116
+ end
3117
+ # verify the required parameter 'message_id' is set
3118
+ if @api_client.config.client_side_validation && message_id.nil?
3119
+ fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.workspace_remove_mail_message_label"
3120
+ end
3121
+ # verify the required parameter 'label_id' is set
3122
+ if @api_client.config.client_side_validation && label_id.nil?
3123
+ fail ArgumentError, "Missing the required parameter 'label_id' when calling MailApi.workspace_remove_mail_message_label"
3124
+ end
3125
+ # resource path
3126
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/{messageId}/labels/{labelId}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{messageId}', CGI.escape(message_id.to_s)).sub('{labelId}', CGI.escape(label_id.to_s))
3127
+
3128
+ # query parameters
3129
+ query_params = opts[:query_params] || {}
3130
+
3131
+ # header parameters
3132
+ header_params = opts[:header_params] || {}
3133
+ # HTTP header 'Accept' (if needed)
3134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3135
+
3136
+ # form parameters
3137
+ form_params = opts[:form_params] || {}
3138
+
3139
+ # http body (model)
3140
+ post_body = opts[:debug_body]
3141
+
3142
+ # return_type
3143
+ return_type = opts[:debug_return_type]
3144
+
3145
+ # auth_names
3146
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3147
+
3148
+ new_options = opts.merge(
3149
+ :operation => :"MailApi.workspace_remove_mail_message_label",
3150
+ :header_params => header_params,
3151
+ :query_params => query_params,
3152
+ :form_params => form_params,
3153
+ :body => post_body,
3154
+ :auth_names => auth_names,
3155
+ :return_type => return_type
3156
+ )
3157
+
3158
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
3159
+ if @api_client.config.debugging
3160
+ @api_client.config.logger.debug "API called: MailApi#workspace_remove_mail_message_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3161
+ end
3162
+ return data, status_code, headers
3163
+ end
3164
+
3165
+ # @param org [String]
3166
+ # @param workspace [String]
3167
+ # @param request_body [Hash<String, Object>]
3168
+ # @param [Hash] opts the optional parameters
3169
+ # @return [Hash<String, Object>]
3170
+ def workspace_reply_mail(org, workspace, request_body, opts = {})
3171
+ data, _status_code, _headers = workspace_reply_mail_with_http_info(org, workspace, request_body, opts)
3172
+ data
3173
+ end
3174
+
3175
+ # @param org [String]
3176
+ # @param workspace [String]
3177
+ # @param request_body [Hash<String, Object>]
3178
+ # @param [Hash] opts the optional parameters
3179
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3180
+ def workspace_reply_mail_with_http_info(org, workspace, request_body, opts = {})
3181
+ if @api_client.config.debugging
3182
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_reply_mail ...'
3183
+ end
3184
+ # verify the required parameter 'org' is set
3185
+ if @api_client.config.client_side_validation && org.nil?
3186
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_reply_mail"
3187
+ end
3188
+ # verify the required parameter 'workspace' is set
3189
+ if @api_client.config.client_side_validation && workspace.nil?
3190
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_reply_mail"
3191
+ end
3192
+ # verify the required parameter 'request_body' is set
3193
+ if @api_client.config.client_side_validation && request_body.nil?
3194
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_reply_mail"
3195
+ end
3196
+ # resource path
3197
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/reply'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
3198
+
3199
+ # query parameters
3200
+ query_params = opts[:query_params] || {}
3201
+
3202
+ # header parameters
3203
+ header_params = opts[:header_params] || {}
3204
+ # HTTP header 'Accept' (if needed)
3205
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3206
+ # HTTP header 'Content-Type'
3207
+ content_type = @api_client.select_header_content_type(['application/json'])
3208
+ if !content_type.nil?
3209
+ header_params['Content-Type'] = content_type
3210
+ end
3211
+
3212
+ # form parameters
3213
+ form_params = opts[:form_params] || {}
3214
+
3215
+ # http body (model)
3216
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
3217
+
3218
+ # return_type
3219
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3220
+
3221
+ # auth_names
3222
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3223
+
3224
+ new_options = opts.merge(
3225
+ :operation => :"MailApi.workspace_reply_mail",
3226
+ :header_params => header_params,
3227
+ :query_params => query_params,
3228
+ :form_params => form_params,
3229
+ :body => post_body,
3230
+ :auth_names => auth_names,
3231
+ :return_type => return_type
3232
+ )
3233
+
3234
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3235
+ if @api_client.config.debugging
3236
+ @api_client.config.logger.debug "API called: MailApi#workspace_reply_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3237
+ end
3238
+ return data, status_code, headers
3239
+ end
3240
+
3241
+ # @param org [String]
3242
+ # @param workspace [String]
3243
+ # @param [Hash] opts the optional parameters
3244
+ # @option opts [String] :q
3245
+ # @return [Hash<String, Object>]
3246
+ def workspace_search_mail(org, workspace, opts = {})
3247
+ data, _status_code, _headers = workspace_search_mail_with_http_info(org, workspace, opts)
3248
+ data
3249
+ end
3250
+
3251
+ # @param org [String]
3252
+ # @param workspace [String]
3253
+ # @param [Hash] opts the optional parameters
3254
+ # @option opts [String] :q
3255
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3256
+ def workspace_search_mail_with_http_info(org, workspace, opts = {})
3257
+ if @api_client.config.debugging
3258
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_search_mail ...'
3259
+ end
3260
+ # verify the required parameter 'org' is set
3261
+ if @api_client.config.client_side_validation && org.nil?
3262
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_search_mail"
3263
+ end
3264
+ # verify the required parameter 'workspace' is set
3265
+ if @api_client.config.client_side_validation && workspace.nil?
3266
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_search_mail"
3267
+ end
3268
+ # resource path
3269
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/search'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
3270
+
3271
+ # query parameters
3272
+ query_params = opts[:query_params] || {}
3273
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
3274
+
3275
+ # header parameters
3276
+ header_params = opts[:header_params] || {}
3277
+ # HTTP header 'Accept' (if needed)
3278
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3279
+
3280
+ # form parameters
3281
+ form_params = opts[:form_params] || {}
3282
+
3283
+ # http body (model)
3284
+ post_body = opts[:debug_body]
3285
+
3286
+ # return_type
3287
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3288
+
3289
+ # auth_names
3290
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3291
+
3292
+ new_options = opts.merge(
3293
+ :operation => :"MailApi.workspace_search_mail",
3294
+ :header_params => header_params,
3295
+ :query_params => query_params,
3296
+ :form_params => form_params,
3297
+ :body => post_body,
3298
+ :auth_names => auth_names,
3299
+ :return_type => return_type
3300
+ )
3301
+
3302
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3303
+ if @api_client.config.debugging
3304
+ @api_client.config.logger.debug "API called: MailApi#workspace_search_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3305
+ end
3306
+ return data, status_code, headers
3307
+ end
3308
+
3309
+ # @param org [String]
3310
+ # @param workspace [String]
3311
+ # @param request_body [Hash<String, Object>]
3312
+ # @param [Hash] opts the optional parameters
3313
+ # @return [Hash<String, Object>]
3314
+ def workspace_send_mail(org, workspace, request_body, opts = {})
3315
+ data, _status_code, _headers = workspace_send_mail_with_http_info(org, workspace, request_body, opts)
3316
+ data
3317
+ end
3318
+
3319
+ # @param org [String]
3320
+ # @param workspace [String]
3321
+ # @param request_body [Hash<String, Object>]
3322
+ # @param [Hash] opts the optional parameters
3323
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3324
+ def workspace_send_mail_with_http_info(org, workspace, request_body, opts = {})
3325
+ if @api_client.config.debugging
3326
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_send_mail ...'
3327
+ end
3328
+ # verify the required parameter 'org' is set
3329
+ if @api_client.config.client_side_validation && org.nil?
3330
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_send_mail"
3331
+ end
3332
+ # verify the required parameter 'workspace' is set
3333
+ if @api_client.config.client_side_validation && workspace.nil?
3334
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_send_mail"
3335
+ end
3336
+ # verify the required parameter 'request_body' is set
3337
+ if @api_client.config.client_side_validation && request_body.nil?
3338
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_send_mail"
3339
+ end
3340
+ # resource path
3341
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/send'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
3342
+
3343
+ # query parameters
3344
+ query_params = opts[:query_params] || {}
3345
+
3346
+ # header parameters
3347
+ header_params = opts[:header_params] || {}
3348
+ # HTTP header 'Accept' (if needed)
3349
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3350
+ # HTTP header 'Content-Type'
3351
+ content_type = @api_client.select_header_content_type(['application/json'])
3352
+ if !content_type.nil?
3353
+ header_params['Content-Type'] = content_type
3354
+ end
3355
+
3356
+ # form parameters
3357
+ form_params = opts[:form_params] || {}
3358
+
3359
+ # http body (model)
3360
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
3361
+
3362
+ # return_type
3363
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3364
+
3365
+ # auth_names
3366
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3367
+
3368
+ new_options = opts.merge(
3369
+ :operation => :"MailApi.workspace_send_mail",
3370
+ :header_params => header_params,
3371
+ :query_params => query_params,
3372
+ :form_params => form_params,
3373
+ :body => post_body,
3374
+ :auth_names => auth_names,
3375
+ :return_type => return_type
3376
+ )
3377
+
3378
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3379
+ if @api_client.config.debugging
3380
+ @api_client.config.logger.debug "API called: MailApi#workspace_send_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3381
+ end
3382
+ return data, status_code, headers
3383
+ end
3384
+
3385
+ # @param org [String]
3386
+ # @param workspace [String]
3387
+ # @param id [String]
3388
+ # @param [Hash] opts the optional parameters
3389
+ # @return [Hash<String, Object>]
3390
+ def workspace_send_mail_draft(org, workspace, id, opts = {})
3391
+ data, _status_code, _headers = workspace_send_mail_draft_with_http_info(org, workspace, id, opts)
3392
+ data
3393
+ end
3394
+
3395
+ # @param org [String]
3396
+ # @param workspace [String]
3397
+ # @param id [String]
3398
+ # @param [Hash] opts the optional parameters
3399
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3400
+ def workspace_send_mail_draft_with_http_info(org, workspace, id, opts = {})
3401
+ if @api_client.config.debugging
3402
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_send_mail_draft ...'
3403
+ end
3404
+ # verify the required parameter 'org' is set
3405
+ if @api_client.config.client_side_validation && org.nil?
3406
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_send_mail_draft"
3407
+ end
3408
+ # verify the required parameter 'workspace' is set
3409
+ if @api_client.config.client_side_validation && workspace.nil?
3410
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_send_mail_draft"
3411
+ end
3412
+ # verify the required parameter 'id' is set
3413
+ if @api_client.config.client_side_validation && id.nil?
3414
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_send_mail_draft"
3415
+ end
3416
+ # resource path
3417
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts/{id}/send'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
3418
+
3419
+ # query parameters
3420
+ query_params = opts[:query_params] || {}
3421
+
3422
+ # header parameters
3423
+ header_params = opts[:header_params] || {}
3424
+ # HTTP header 'Accept' (if needed)
3425
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3426
+
3427
+ # form parameters
3428
+ form_params = opts[:form_params] || {}
3429
+
3430
+ # http body (model)
3431
+ post_body = opts[:debug_body]
3432
+
3433
+ # return_type
3434
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3435
+
3436
+ # auth_names
3437
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3438
+
3439
+ new_options = opts.merge(
3440
+ :operation => :"MailApi.workspace_send_mail_draft",
3441
+ :header_params => header_params,
3442
+ :query_params => query_params,
3443
+ :form_params => form_params,
3444
+ :body => post_body,
3445
+ :auth_names => auth_names,
3446
+ :return_type => return_type
3447
+ )
3448
+
3449
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3450
+ if @api_client.config.debugging
3451
+ @api_client.config.logger.debug "API called: MailApi#workspace_send_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3452
+ end
3453
+ return data, status_code, headers
3454
+ end
3455
+
3456
+ # Renderer-compat alias for /mail/send.
3457
+ # @param org [String]
3458
+ # @param workspace [String]
3459
+ # @param request_body [Hash<String, Object>]
3460
+ # @param [Hash] opts the optional parameters
3461
+ # @return [Hash<String, Object>]
3462
+ def workspace_send_mail_email_alias(org, workspace, request_body, opts = {})
3463
+ data, _status_code, _headers = workspace_send_mail_email_alias_with_http_info(org, workspace, request_body, opts)
3464
+ data
3465
+ end
3466
+
3467
+ # Renderer-compat alias for /mail/send.
3468
+ # @param org [String]
3469
+ # @param workspace [String]
3470
+ # @param request_body [Hash<String, Object>]
3471
+ # @param [Hash] opts the optional parameters
3472
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3473
+ def workspace_send_mail_email_alias_with_http_info(org, workspace, request_body, opts = {})
3474
+ if @api_client.config.debugging
3475
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_send_mail_email_alias ...'
3476
+ end
3477
+ # verify the required parameter 'org' is set
3478
+ if @api_client.config.client_side_validation && org.nil?
3479
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_send_mail_email_alias"
3480
+ end
3481
+ # verify the required parameter 'workspace' is set
3482
+ if @api_client.config.client_side_validation && workspace.nil?
3483
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_send_mail_email_alias"
3484
+ end
3485
+ # verify the required parameter 'request_body' is set
3486
+ if @api_client.config.client_side_validation && request_body.nil?
3487
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_send_mail_email_alias"
3488
+ end
3489
+ # resource path
3490
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s))
3491
+
3492
+ # query parameters
3493
+ query_params = opts[:query_params] || {}
3494
+
3495
+ # header parameters
3496
+ header_params = opts[:header_params] || {}
3497
+ # HTTP header 'Accept' (if needed)
3498
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3499
+ # HTTP header 'Content-Type'
3500
+ content_type = @api_client.select_header_content_type(['application/json'])
3501
+ if !content_type.nil?
3502
+ header_params['Content-Type'] = content_type
3503
+ end
3504
+
3505
+ # form parameters
3506
+ form_params = opts[:form_params] || {}
3507
+
3508
+ # http body (model)
3509
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
3510
+
3511
+ # return_type
3512
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3513
+
3514
+ # auth_names
3515
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3516
+
3517
+ new_options = opts.merge(
3518
+ :operation => :"MailApi.workspace_send_mail_email_alias",
3519
+ :header_params => header_params,
3520
+ :query_params => query_params,
3521
+ :form_params => form_params,
3522
+ :body => post_body,
3523
+ :auth_names => auth_names,
3524
+ :return_type => return_type
3525
+ )
3526
+
3527
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3528
+ if @api_client.config.debugging
3529
+ @api_client.config.logger.debug "API called: MailApi#workspace_send_mail_email_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3530
+ end
3531
+ return data, status_code, headers
3532
+ end
3533
+
3534
+ # @param org [String]
3535
+ # @param workspace [String]
3536
+ # @param id [String]
3537
+ # @param request_body [Hash<String, Object>]
3538
+ # @param [Hash] opts the optional parameters
3539
+ # @return [Hash<String, Object>]
3540
+ def workspace_update_mail(org, workspace, id, request_body, opts = {})
3541
+ data, _status_code, _headers = workspace_update_mail_with_http_info(org, workspace, id, request_body, opts)
3542
+ data
3543
+ end
3544
+
3545
+ # @param org [String]
3546
+ # @param workspace [String]
3547
+ # @param id [String]
3548
+ # @param request_body [Hash<String, Object>]
3549
+ # @param [Hash] opts the optional parameters
3550
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3551
+ def workspace_update_mail_with_http_info(org, workspace, id, request_body, opts = {})
3552
+ if @api_client.config.debugging
3553
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_update_mail ...'
3554
+ end
3555
+ # verify the required parameter 'org' is set
3556
+ if @api_client.config.client_side_validation && org.nil?
3557
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_update_mail"
3558
+ end
3559
+ # verify the required parameter 'workspace' is set
3560
+ if @api_client.config.client_side_validation && workspace.nil?
3561
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_update_mail"
3562
+ end
3563
+ # verify the required parameter 'id' is set
3564
+ if @api_client.config.client_side_validation && id.nil?
3565
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_update_mail"
3566
+ end
3567
+ # verify the required parameter 'request_body' is set
3568
+ if @api_client.config.client_side_validation && request_body.nil?
3569
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_update_mail"
3570
+ end
3571
+ # resource path
3572
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
3573
+
3574
+ # query parameters
3575
+ query_params = opts[:query_params] || {}
3576
+
3577
+ # header parameters
3578
+ header_params = opts[:header_params] || {}
3579
+ # HTTP header 'Accept' (if needed)
3580
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3581
+ # HTTP header 'Content-Type'
3582
+ content_type = @api_client.select_header_content_type(['application/json'])
3583
+ if !content_type.nil?
3584
+ header_params['Content-Type'] = content_type
3585
+ end
3586
+
3587
+ # form parameters
3588
+ form_params = opts[:form_params] || {}
3589
+
3590
+ # http body (model)
3591
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
3592
+
3593
+ # return_type
3594
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3595
+
3596
+ # auth_names
3597
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3598
+
3599
+ new_options = opts.merge(
3600
+ :operation => :"MailApi.workspace_update_mail",
3601
+ :header_params => header_params,
3602
+ :query_params => query_params,
3603
+ :form_params => form_params,
3604
+ :body => post_body,
3605
+ :auth_names => auth_names,
3606
+ :return_type => return_type
3607
+ )
3608
+
3609
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3610
+ if @api_client.config.debugging
3611
+ @api_client.config.logger.debug "API called: MailApi#workspace_update_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3612
+ end
3613
+ return data, status_code, headers
3614
+ end
3615
+
3616
+ # @param org [String]
3617
+ # @param workspace [String]
3618
+ # @param id [String]
3619
+ # @param request_body [Hash<String, Object>]
3620
+ # @param [Hash] opts the optional parameters
3621
+ # @return [Hash<String, Object>]
3622
+ def workspace_update_mail_draft(org, workspace, id, request_body, opts = {})
3623
+ data, _status_code, _headers = workspace_update_mail_draft_with_http_info(org, workspace, id, request_body, opts)
3624
+ data
3625
+ end
3626
+
3627
+ # @param org [String]
3628
+ # @param workspace [String]
3629
+ # @param id [String]
3630
+ # @param request_body [Hash<String, Object>]
3631
+ # @param [Hash] opts the optional parameters
3632
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3633
+ def workspace_update_mail_draft_with_http_info(org, workspace, id, request_body, opts = {})
3634
+ if @api_client.config.debugging
3635
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_update_mail_draft ...'
3636
+ end
3637
+ # verify the required parameter 'org' is set
3638
+ if @api_client.config.client_side_validation && org.nil?
3639
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_update_mail_draft"
3640
+ end
3641
+ # verify the required parameter 'workspace' is set
3642
+ if @api_client.config.client_side_validation && workspace.nil?
3643
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_update_mail_draft"
3644
+ end
3645
+ # verify the required parameter 'id' is set
3646
+ if @api_client.config.client_side_validation && id.nil?
3647
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_update_mail_draft"
3648
+ end
3649
+ # verify the required parameter 'request_body' is set
3650
+ if @api_client.config.client_side_validation && request_body.nil?
3651
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_update_mail_draft"
3652
+ end
3653
+ # resource path
3654
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
3655
+
3656
+ # query parameters
3657
+ query_params = opts[:query_params] || {}
3658
+
3659
+ # header parameters
3660
+ header_params = opts[:header_params] || {}
3661
+ # HTTP header 'Accept' (if needed)
3662
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3663
+ # HTTP header 'Content-Type'
3664
+ content_type = @api_client.select_header_content_type(['application/json'])
3665
+ if !content_type.nil?
3666
+ header_params['Content-Type'] = content_type
3667
+ end
3668
+
3669
+ # form parameters
3670
+ form_params = opts[:form_params] || {}
3671
+
3672
+ # http body (model)
3673
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
3674
+
3675
+ # return_type
3676
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3677
+
3678
+ # auth_names
3679
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3680
+
3681
+ new_options = opts.merge(
3682
+ :operation => :"MailApi.workspace_update_mail_draft",
3683
+ :header_params => header_params,
3684
+ :query_params => query_params,
3685
+ :form_params => form_params,
3686
+ :body => post_body,
3687
+ :auth_names => auth_names,
3688
+ :return_type => return_type
3689
+ )
3690
+
3691
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3692
+ if @api_client.config.debugging
3693
+ @api_client.config.logger.debug "API called: MailApi#workspace_update_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3694
+ end
3695
+ return data, status_code, headers
3696
+ end
3697
+
3698
+ # @param org [String]
3699
+ # @param workspace [String]
3700
+ # @param id [String]
3701
+ # @param request_body [Hash<String, Object>]
3702
+ # @param [Hash] opts the optional parameters
3703
+ # @return [Hash<String, Object>]
3704
+ def workspace_update_mail_label(org, workspace, id, request_body, opts = {})
3705
+ data, _status_code, _headers = workspace_update_mail_label_with_http_info(org, workspace, id, request_body, opts)
3706
+ data
3707
+ end
3708
+
3709
+ # @param org [String]
3710
+ # @param workspace [String]
3711
+ # @param id [String]
3712
+ # @param request_body [Hash<String, Object>]
3713
+ # @param [Hash] opts the optional parameters
3714
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3715
+ def workspace_update_mail_label_with_http_info(org, workspace, id, request_body, opts = {})
3716
+ if @api_client.config.debugging
3717
+ @api_client.config.logger.debug 'Calling API: MailApi.workspace_update_mail_label ...'
3718
+ end
3719
+ # verify the required parameter 'org' is set
3720
+ if @api_client.config.client_side_validation && org.nil?
3721
+ fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_update_mail_label"
3722
+ end
3723
+ # verify the required parameter 'workspace' is set
3724
+ if @api_client.config.client_side_validation && workspace.nil?
3725
+ fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_update_mail_label"
3726
+ end
3727
+ # verify the required parameter 'id' is set
3728
+ if @api_client.config.client_side_validation && id.nil?
3729
+ fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_update_mail_label"
3730
+ end
3731
+ # verify the required parameter 'request_body' is set
3732
+ if @api_client.config.client_side_validation && request_body.nil?
3733
+ fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_update_mail_label"
3734
+ end
3735
+ # resource path
3736
+ local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/labels/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s))
3737
+
3738
+ # query parameters
3739
+ query_params = opts[:query_params] || {}
3740
+
3741
+ # header parameters
3742
+ header_params = opts[:header_params] || {}
3743
+ # HTTP header 'Accept' (if needed)
3744
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3745
+ # HTTP header 'Content-Type'
3746
+ content_type = @api_client.select_header_content_type(['application/json'])
3747
+ if !content_type.nil?
3748
+ header_params['Content-Type'] = content_type
3749
+ end
3750
+
3751
+ # form parameters
3752
+ form_params = opts[:form_params] || {}
3753
+
3754
+ # http body (model)
3755
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
3756
+
3757
+ # return_type
3758
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3759
+
3760
+ # auth_names
3761
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
3762
+
3763
+ new_options = opts.merge(
3764
+ :operation => :"MailApi.workspace_update_mail_label",
3765
+ :header_params => header_params,
3766
+ :query_params => query_params,
3767
+ :form_params => form_params,
3768
+ :body => post_body,
3769
+ :auth_names => auth_names,
3770
+ :return_type => return_type
3771
+ )
3772
+
3773
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3774
+ if @api_client.config.debugging
3775
+ @api_client.config.logger.debug "API called: MailApi#workspace_update_mail_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3776
+ end
3777
+ return data, status_code, headers
3778
+ end
3779
+ end
3780
+ end