lockally 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +143 -119
- data/docs/AdminApi.md +33 -33
- data/docs/{V1AdminLoginPost200Response.md → AdminLogin200Response.md} +2 -2
- data/docs/{V1AdminLoginPostRequest.md → AdminLoginRequest.md} +2 -2
- data/docs/AdminsApi.md +76 -76
- data/docs/AgentSendResult.md +22 -0
- data/docs/AgentsApi.md +247 -247
- data/docs/AiApi.md +69 -69
- data/docs/AiConfig.md +26 -0
- data/docs/AiConfigUpdate.md +20 -0
- data/docs/AliasesApi.md +59 -59
- data/docs/ApiKeysApi.md +59 -59
- data/docs/ContactLookup.md +26 -0
- data/docs/ContactLookupContact.md +28 -0
- data/docs/ContactLookupHistory.md +22 -0
- data/docs/CreateAiUnitsCheckout200Response.md +22 -0
- data/docs/{V1AliasesPostRequest.md → CreateAliasRequest.md} +2 -2
- data/docs/{V1ApiKeysPost201Response.md → CreateApiKey201Response.md} +2 -2
- data/docs/{V1ApiKeysPostRequest.md → CreateApiKeyRequest.md} +2 -2
- data/docs/{V1DomainsPostRequest.md → CreateDomainRequest.md} +2 -2
- data/docs/{V1MailboxesPostRequest.md → CreateMailboxRequest.md} +2 -2
- data/docs/{V1SuppressionsPostRequest.md → CreateSuppressionRequest.md} +2 -2
- data/docs/{V1WebhooksPostRequest.md → CreateWebhookRequest.md} +2 -2
- data/docs/DomainsApi.md +141 -141
- data/docs/Draft.md +44 -0
- data/docs/DraftList.md +18 -0
- data/docs/DraftResult.md +26 -0
- data/docs/DraftsApi.md +115 -115
- data/docs/{V1MailboxesEmailExportPost201Response.md → ExportMailbox201Response.md} +2 -2
- data/docs/{V1AdminMeGet200Response.md → GetCurrentAdmin200Response.md} +2 -2
- data/docs/{V1UsageGet200Response.md → GetUsage200Response.md} +2 -2
- data/docs/HealthApi.md +11 -11
- data/docs/{HealthzGet200Response.md → HealthCheck200Response.md} +2 -2
- data/docs/Inbox.md +24 -0
- data/docs/InboxList.md +18 -0
- data/docs/{V1AdminsPostRequest.md → InviteAdminRequest.md} +2 -2
- data/docs/{V1AdminsGet200Response.md → ListAdmins200Response.md} +2 -2
- data/docs/{V1AliasesGet200Response.md → ListAliases200Response.md} +2 -2
- data/docs/{V1ApiKeysGet200Response.md → ListApiKeys200Response.md} +2 -2
- data/docs/{V1DomainsGet200Response.md → ListDomains200Response.md} +2 -2
- data/docs/{V1MailboxesGet200Response.md → ListMailboxes200Response.md} +2 -2
- data/docs/{V1MessagesGet200Response.md → ListMessages200Response.md} +2 -2
- data/docs/{V1SuppressionsGet200Response.md → ListSuppressions200Response.md} +2 -2
- data/docs/{V1TemplatesGet200Response.md → ListTemplates200Response.md} +2 -2
- data/docs/{V1VacationGet200Response.md → ListVacationResponders200Response.md} +2 -2
- data/docs/{V1WebhooksGet200Response.md → ListWebhooks200Response.md} +2 -2
- data/docs/MailboxGrant.md +20 -0
- data/docs/MailboxGrantList.md +18 -0
- data/docs/MailboxesApi.md +203 -203
- data/docs/MarkReadResult.md +18 -0
- data/docs/SendApi.md +121 -121
- data/docs/{V1SendPost200Response.md → SendEmail200Response.md} +2 -2
- data/docs/{V1SendPost202Response.md → SendEmail202Response.md} +2 -2
- data/docs/{V1SendBatchPost200Response.md → SendEmailBatch200Response.md} +2 -2
- data/docs/{V1SendBatchPostRequest.md → SendEmailBatchRequest.md} +2 -2
- data/docs/{V1SendPostRequest.md → SendEmailRequest.md} +3 -3
- data/docs/{V1SendPostRequestAttachmentsInner.md → SendEmailRequestAttachmentsInner.md} +2 -2
- data/docs/SendMessage.md +1 -1
- data/docs/{V1MailboxesEmailVacationPutRequest.md → SetVacationResponderRequest.md} +2 -2
- data/docs/SignupApi.md +4 -4
- data/docs/SimulatedInbound.md +22 -0
- data/docs/{V1InboxesMailboxMessagesPostRequest.md → StartConversationRequest.md} +2 -2
- data/docs/SuppressionsApi.md +75 -75
- data/docs/TemplatesApi.md +67 -67
- data/docs/TenantApi.md +20 -20
- data/docs/TestApi.md +11 -11
- data/docs/Thread.md +22 -0
- data/docs/ThreadClassification.md +22 -0
- data/docs/ThreadList.md +20 -0
- data/docs/ThreadMessage.md +40 -0
- data/docs/ThreadMessageBody.md +42 -0
- data/docs/ThreadMessageBodyAllOfBody.md +22 -0
- data/docs/ThreadSummary.md +28 -0
- data/docs/{V1AdminsIdPatchRequest.md → UpdateAdminRequest.md} +2 -2
- data/docs/{V1MailboxesEmailPatchRequest.md → UpdateMailboxRequest.md} +2 -2
- data/docs/{V1WebhooksIdPatchRequest.md → UpdateWebhookRequest.md} +2 -2
- data/docs/WebhooksApi.md +63 -63
- data/docs/Whoami.md +24 -0
- data/lib/lockally/api/admin_api.rb +30 -30
- data/lib/lockally/api/admins_api.rb +89 -89
- data/lib/lockally/api/agents_api.rb +309 -309
- data/lib/lockally/api/ai_api.rb +69 -69
- data/lib/lockally/api/aliases_api.rb +64 -64
- data/lib/lockally/api/api_keys_api.rb +66 -66
- data/lib/lockally/api/domains_api.rb +147 -147
- data/lib/lockally/api/drafts_api.rb +140 -140
- data/lib/lockally/api/health_api.rb +9 -9
- data/lib/lockally/api/mailboxes_api.rb +233 -233
- data/lib/lockally/api/send_api.rb +146 -146
- data/lib/lockally/api/signup_api.rb +3 -3
- data/lib/lockally/api/suppressions_api.rb +87 -87
- data/lib/lockally/api/templates_api.rb +69 -69
- data/lib/lockally/api/tenant_api.rb +15 -15
- data/lib/lockally/api/test_api.rb +9 -9
- data/lib/lockally/api/webhooks_api.rb +73 -73
- data/lib/lockally/models/{v1_admin_login_post200_response.rb → admin_login200_response.rb} +3 -3
- data/lib/lockally/models/{v1_admin_login_post_request.rb → admin_login_request.rb} +3 -3
- data/lib/lockally/models/agent_send_result.rb +184 -0
- data/lib/lockally/models/ai_config.rb +242 -0
- data/lib/lockally/models/ai_config_update.rb +214 -0
- data/lib/lockally/models/contact_lookup.rb +235 -0
- data/lib/lockally/models/contact_lookup_contact.rb +192 -0
- data/lib/lockally/models/contact_lookup_history.rb +166 -0
- data/lib/lockally/models/create_ai_units_checkout200_response.rb +199 -0
- data/lib/lockally/models/{v1_aliases_post_request.rb → create_alias_request.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_post201_response.rb → create_api_key201_response.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_post_request.rb → create_api_key_request.rb} +3 -3
- data/lib/lockally/models/{v1_domains_post_request.rb → create_domain_request.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_post_request.rb → create_mailbox_request.rb} +3 -3
- data/lib/lockally/models/{v1_suppressions_post_request.rb → create_suppression_request.rb} +3 -3
- data/lib/lockally/models/{v1_webhooks_post_request.rb → create_webhook_request.rb} +3 -3
- data/lib/lockally/models/draft.rb +413 -0
- data/lib/lockally/models/draft_list.rb +166 -0
- data/lib/lockally/models/draft_result.rb +260 -0
- data/lib/lockally/models/{v1_mailboxes_email_export_post201_response.rb → export_mailbox201_response.rb} +3 -3
- data/lib/lockally/models/{v1_admin_me_get200_response.rb → get_current_admin200_response.rb} +3 -3
- data/lib/lockally/models/{v1_usage_get200_response.rb → get_usage200_response.rb} +3 -3
- data/lib/lockally/models/{healthz_get200_response.rb → health_check200_response.rb} +3 -3
- data/lib/lockally/models/inbox.rb +225 -0
- data/lib/lockally/models/inbox_list.rb +166 -0
- data/lib/lockally/models/{v1_admins_post_request.rb → invite_admin_request.rb} +3 -3
- data/lib/lockally/models/list_admins200_response.rb +166 -0
- data/lib/lockally/models/{v1_aliases_get200_response.rb → list_aliases200_response.rb} +3 -3
- data/lib/lockally/models/{v1_admins_get200_response.rb → list_api_keys200_response.rb} +4 -4
- data/lib/lockally/models/{v1_domains_get200_response.rb → list_domains200_response.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_get200_response.rb → list_mailboxes200_response.rb} +3 -3
- data/lib/lockally/models/{v1_messages_get200_response.rb → list_messages200_response.rb} +3 -3
- data/lib/lockally/models/{v1_suppressions_get200_response.rb → list_suppressions200_response.rb} +3 -3
- data/lib/lockally/models/{v1_send_batch_post200_response.rb → list_templates200_response.rb} +4 -4
- data/lib/lockally/models/{v1_vacation_get200_response.rb → list_vacation_responders200_response.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_get200_response.rb → list_webhooks200_response.rb} +4 -4
- data/lib/lockally/models/mailbox_grant.rb +156 -0
- data/lib/lockally/models/mailbox_grant_list.rb +166 -0
- data/lib/lockally/models/mark_read_result.rb +147 -0
- data/lib/lockally/models/{v1_send_post200_response.rb → send_email200_response.rb} +3 -3
- data/lib/lockally/models/{v1_send_post202_response.rb → send_email202_response.rb} +3 -3
- data/lib/lockally/models/{v1_templates_get200_response.rb → send_email_batch200_response.rb} +4 -4
- data/lib/lockally/models/{v1_send_batch_post_request.rb → send_email_batch_request.rb} +3 -3
- data/lib/lockally/models/{v1_send_post_request.rb → send_email_request.rb} +4 -4
- data/lib/lockally/models/{v1_send_post_request_attachments_inner.rb → send_email_request_attachments_inner.rb} +3 -3
- data/lib/lockally/models/send_message.rb +1 -1
- data/lib/lockally/models/{v1_mailboxes_email_vacation_put_request.rb → set_vacation_responder_request.rb} +3 -3
- data/lib/lockally/models/simulated_inbound.rb +167 -0
- data/lib/lockally/models/{v1_inboxes_mailbox_messages_post_request.rb → start_conversation_request.rb} +3 -3
- data/lib/lockally/models/thread.rb +219 -0
- data/lib/lockally/models/thread_classification.rb +186 -0
- data/lib/lockally/models/thread_list.rb +192 -0
- data/lib/lockally/models/thread_message.rb +397 -0
- data/lib/lockally/models/thread_message_body.rb +413 -0
- data/lib/lockally/models/thread_message_body_all_of_body.rb +165 -0
- data/lib/lockally/models/thread_summary.rb +280 -0
- data/lib/lockally/models/{v1_admins_id_patch_request.rb → update_admin_request.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_email_patch_request.rb → update_mailbox_request.rb} +3 -3
- data/lib/lockally/models/{v1_webhooks_id_patch_request.rb → update_webhook_request.rb} +3 -3
- data/lib/lockally/models/whoami.rb +177 -0
- data/lib/lockally/version.rb +1 -1
- data/lib/lockally.rb +59 -35
- data/spec/api/admin_api_spec.rb +9 -9
- data/spec/api/admins_api_spec.rb +22 -22
- data/spec/api/agents_api_spec.rb +78 -78
- data/spec/api/ai_api_spec.rb +22 -22
- data/spec/api/aliases_api_spec.rb +16 -16
- data/spec/api/api_keys_api_spec.rb +17 -17
- data/spec/api/domains_api_spec.rb +42 -42
- data/spec/api/drafts_api_spec.rb +38 -38
- data/spec/api/health_api_spec.rb +3 -3
- data/spec/api/mailboxes_api_spec.rb +61 -61
- data/spec/api/send_api_spec.rb +35 -35
- data/spec/api/signup_api_spec.rb +1 -1
- data/spec/api/suppressions_api_spec.rb +18 -18
- data/spec/api/templates_api_spec.rb +17 -17
- data/spec/api/tenant_api_spec.rb +5 -5
- data/spec/api/test_api_spec.rb +3 -3
- data/spec/api/webhooks_api_spec.rb +19 -19
- data/spec/models/{v1_admin_login_post200_response_spec.rb → admin_login200_response_spec.rb} +6 -6
- data/spec/models/{v1_admin_login_post_request_spec.rb → admin_login_request_spec.rb} +6 -6
- data/spec/models/agent_send_result_spec.rb +48 -0
- data/spec/models/ai_config_spec.rb +64 -0
- data/spec/models/ai_config_update_spec.rb +46 -0
- data/spec/models/contact_lookup_contact_spec.rb +66 -0
- data/spec/models/contact_lookup_history_spec.rb +48 -0
- data/spec/models/contact_lookup_spec.rb +60 -0
- data/spec/models/create_ai_units_checkout200_response_spec.rb +48 -0
- data/spec/models/{v1_aliases_post_request_spec.rb → create_alias_request_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_post201_response_spec.rb → create_api_key201_response_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_post_request_spec.rb → create_api_key_request_spec.rb} +6 -6
- data/spec/models/{v1_domains_post_request_spec.rb → create_domain_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_post_request_spec.rb → create_mailbox_request_spec.rb} +6 -6
- data/spec/models/{v1_suppressions_post_request_spec.rb → create_suppression_request_spec.rb} +6 -6
- data/spec/models/{v1_webhooks_post_request_spec.rb → create_webhook_request_spec.rb} +6 -6
- data/spec/models/draft_list_spec.rb +36 -0
- data/spec/models/draft_result_spec.rb +64 -0
- data/spec/models/draft_spec.rb +118 -0
- data/spec/models/{v1_mailboxes_email_export_post201_response_spec.rb → export_mailbox201_response_spec.rb} +6 -6
- data/spec/models/{v1_admin_me_get200_response_spec.rb → get_current_admin200_response_spec.rb} +6 -6
- data/spec/models/{v1_usage_get200_response_spec.rb → get_usage200_response_spec.rb} +6 -6
- data/spec/models/{healthz_get200_response_spec.rb → health_check200_response_spec.rb} +6 -6
- data/spec/models/inbox_list_spec.rb +36 -0
- data/spec/models/inbox_spec.rb +54 -0
- data/spec/models/{v1_admins_post_request_spec.rb → invite_admin_request_spec.rb} +6 -6
- data/spec/models/{v1_aliases_get200_response_spec.rb → list_admins200_response_spec.rb} +6 -6
- data/spec/models/{v1_admins_get200_response_spec.rb → list_aliases200_response_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_get200_response_spec.rb → list_api_keys200_response_spec.rb} +6 -6
- data/spec/models/list_domains200_response_spec.rb +36 -0
- data/spec/models/{v1_mailboxes_get200_response_spec.rb → list_mailboxes200_response_spec.rb} +6 -6
- data/spec/models/{v1_messages_get200_response_spec.rb → list_messages200_response_spec.rb} +6 -6
- data/spec/models/{v1_suppressions_get200_response_spec.rb → list_suppressions200_response_spec.rb} +6 -6
- data/spec/models/{v1_vacation_get200_response_spec.rb → list_templates200_response_spec.rb} +6 -6
- data/spec/models/list_vacation_responders200_response_spec.rb +36 -0
- data/spec/models/{v1_domains_get200_response_spec.rb → list_webhooks200_response_spec.rb} +6 -6
- data/spec/models/mailbox_grant_list_spec.rb +36 -0
- data/spec/models/mailbox_grant_spec.rb +42 -0
- data/spec/models/mark_read_result_spec.rb +36 -0
- data/spec/models/{v1_send_post200_response_spec.rb → send_email200_response_spec.rb} +6 -6
- data/spec/models/{v1_send_post202_response_spec.rb → send_email202_response_spec.rb} +6 -6
- data/spec/models/{v1_templates_get200_response_spec.rb → send_email_batch200_response_spec.rb} +6 -6
- data/spec/models/{v1_send_batch_post_request_spec.rb → send_email_batch_request_spec.rb} +6 -6
- data/spec/models/{v1_send_post_request_attachments_inner_spec.rb → send_email_request_attachments_inner_spec.rb} +6 -6
- data/spec/models/{v1_send_post_request_spec.rb → send_email_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_email_vacation_put_request_spec.rb → set_vacation_responder_request_spec.rb} +6 -6
- data/spec/models/simulated_inbound_spec.rb +48 -0
- data/spec/models/{v1_inboxes_mailbox_messages_post_request_spec.rb → start_conversation_request_spec.rb} +6 -6
- data/spec/models/thread_classification_spec.rb +48 -0
- data/spec/models/thread_list_spec.rb +42 -0
- data/spec/models/thread_message_body_all_of_body_spec.rb +48 -0
- data/spec/models/thread_message_body_spec.rb +112 -0
- data/spec/models/thread_message_spec.rb +106 -0
- data/spec/models/thread_spec.rb +48 -0
- data/spec/models/thread_summary_spec.rb +70 -0
- data/spec/models/{v1_admins_id_patch_request_spec.rb → update_admin_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_email_patch_request_spec.rb → update_mailbox_request_spec.rb} +6 -6
- data/spec/models/{v1_webhooks_id_patch_request_spec.rb → update_webhook_request_spec.rb} +6 -6
- data/spec/models/whoami_spec.rb +54 -0
- metadata +238 -142
- data/lib/lockally/models/v1_webhooks_get200_response.rb +0 -166
- data/spec/models/v1_send_batch_post200_response_spec.rb +0 -36
- data/spec/models/v1_webhooks_get200_response_spec.rb +0 -36
|
@@ -19,37 +19,51 @@ module Lockally
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
# @param
|
|
22
|
+
# Download an attachment
|
|
23
|
+
# @param thread_id [String]
|
|
24
|
+
# @param message_id [String]
|
|
25
|
+
# @param idx [Integer]
|
|
24
26
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [
|
|
26
|
-
def
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
# @return [nil]
|
|
28
|
+
def download_thread_attachment(thread_id, message_id, idx, opts = {})
|
|
29
|
+
download_thread_attachment_with_http_info(thread_id, message_id, idx, opts)
|
|
30
|
+
nil
|
|
29
31
|
end
|
|
30
32
|
|
|
31
|
-
#
|
|
32
|
-
# @param
|
|
33
|
+
# Download an attachment
|
|
34
|
+
# @param thread_id [String]
|
|
35
|
+
# @param message_id [String]
|
|
36
|
+
# @param idx [Integer]
|
|
33
37
|
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(
|
|
35
|
-
def
|
|
38
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
39
|
+
def download_thread_attachment_with_http_info(thread_id, message_id, idx, opts = {})
|
|
36
40
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.download_thread_attachment ...'
|
|
38
42
|
end
|
|
39
|
-
# verify the required parameter '
|
|
40
|
-
if @api_client.config.client_side_validation &&
|
|
41
|
-
fail ArgumentError, "Missing the required parameter '
|
|
43
|
+
# verify the required parameter 'thread_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && thread_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.download_thread_attachment"
|
|
42
46
|
end
|
|
47
|
+
# verify the required parameter 'message_id' is set
|
|
48
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.download_thread_attachment"
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'idx' is set
|
|
52
|
+
if @api_client.config.client_side_validation && idx.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'idx' when calling AgentsApi.download_thread_attachment"
|
|
54
|
+
end
|
|
55
|
+
if @api_client.config.client_side_validation && idx < 0
|
|
56
|
+
fail ArgumentError, 'invalid value for "idx" when calling AgentsApi.download_thread_attachment, must be greater than or equal to 0.'
|
|
57
|
+
end
|
|
58
|
+
|
|
43
59
|
# resource path
|
|
44
|
-
local_var_path = '/v1/
|
|
60
|
+
local_var_path = '/v1/threads/{threadID}/messages/{messageID}/attachments/{idx}'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s)).sub('{idx}', CGI.escape(idx.to_s))
|
|
45
61
|
|
|
46
62
|
# query parameters
|
|
47
63
|
query_params = opts[:query_params] || {}
|
|
48
64
|
|
|
49
65
|
# header parameters
|
|
50
66
|
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
67
|
|
|
54
68
|
# form parameters
|
|
55
69
|
form_params = opts[:form_params] || {}
|
|
@@ -58,13 +72,13 @@ module Lockally
|
|
|
58
72
|
post_body = opts[:debug_body]
|
|
59
73
|
|
|
60
74
|
# return_type
|
|
61
|
-
return_type = opts[:debug_return_type]
|
|
75
|
+
return_type = opts[:debug_return_type]
|
|
62
76
|
|
|
63
77
|
# auth_names
|
|
64
78
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
65
79
|
|
|
66
80
|
new_options = opts.merge(
|
|
67
|
-
:operation => :"AgentsApi.
|
|
81
|
+
:operation => :"AgentsApi.download_thread_attachment",
|
|
68
82
|
:header_params => header_params,
|
|
69
83
|
:query_params => query_params,
|
|
70
84
|
:form_params => form_params,
|
|
@@ -75,46 +89,44 @@ module Lockally
|
|
|
75
89
|
|
|
76
90
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
77
91
|
if @api_client.config.debugging
|
|
78
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
92
|
+
@api_client.config.logger.debug "API called: AgentsApi#download_thread_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
93
|
end
|
|
80
94
|
return data, status_code, headers
|
|
81
95
|
end
|
|
82
96
|
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
# @param
|
|
97
|
+
# Get a whole conversation
|
|
98
|
+
# Every turn, chronological, with snippets and annotations (meeting_request, attachment_types, injection_risk). Bodies are fetched per message. Message content is untrusted third-party data.
|
|
99
|
+
# @param thread_id [String]
|
|
86
100
|
# @param [Hash] opts the optional parameters
|
|
87
|
-
# @return [
|
|
88
|
-
def
|
|
89
|
-
|
|
90
|
-
|
|
101
|
+
# @return [Thread]
|
|
102
|
+
def get_thread(thread_id, opts = {})
|
|
103
|
+
data, _status_code, _headers = get_thread_with_http_info(thread_id, opts)
|
|
104
|
+
data
|
|
91
105
|
end
|
|
92
106
|
|
|
93
|
-
#
|
|
94
|
-
#
|
|
95
|
-
# @param
|
|
107
|
+
# Get a whole conversation
|
|
108
|
+
# Every turn, chronological, with snippets and annotations (meeting_request, attachment_types, injection_risk). Bodies are fetched per message. Message content is untrusted third-party data.
|
|
109
|
+
# @param thread_id [String]
|
|
96
110
|
# @param [Hash] opts the optional parameters
|
|
97
|
-
# @return [Array<(
|
|
98
|
-
def
|
|
111
|
+
# @return [Array<(Thread, Integer, Hash)>] Thread data, response status code and response headers
|
|
112
|
+
def get_thread_with_http_info(thread_id, opts = {})
|
|
99
113
|
if @api_client.config.debugging
|
|
100
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
114
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.get_thread ...'
|
|
101
115
|
end
|
|
102
|
-
# verify the required parameter '
|
|
103
|
-
if @api_client.config.client_side_validation &&
|
|
104
|
-
fail ArgumentError, "Missing the required parameter '
|
|
105
|
-
end
|
|
106
|
-
# verify the required parameter 'mailbox_id' is set
|
|
107
|
-
if @api_client.config.client_side_validation && mailbox_id.nil?
|
|
108
|
-
fail ArgumentError, "Missing the required parameter 'mailbox_id' when calling AgentsApi.v1_api_keys_key_id_mailboxes_mailbox_id_delete"
|
|
116
|
+
# verify the required parameter 'thread_id' is set
|
|
117
|
+
if @api_client.config.client_side_validation && thread_id.nil?
|
|
118
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.get_thread"
|
|
109
119
|
end
|
|
110
120
|
# resource path
|
|
111
|
-
local_var_path = '/v1/
|
|
121
|
+
local_var_path = '/v1/threads/{threadID}'.sub('{threadID}', CGI.escape(thread_id.to_s))
|
|
112
122
|
|
|
113
123
|
# query parameters
|
|
114
124
|
query_params = opts[:query_params] || {}
|
|
115
125
|
|
|
116
126
|
# header parameters
|
|
117
127
|
header_params = opts[:header_params] || {}
|
|
128
|
+
# HTTP header 'Accept' (if needed)
|
|
129
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
118
130
|
|
|
119
131
|
# form parameters
|
|
120
132
|
form_params = opts[:form_params] || {}
|
|
@@ -123,13 +135,13 @@ module Lockally
|
|
|
123
135
|
post_body = opts[:debug_body]
|
|
124
136
|
|
|
125
137
|
# return_type
|
|
126
|
-
return_type = opts[:debug_return_type]
|
|
138
|
+
return_type = opts[:debug_return_type] || 'Thread'
|
|
127
139
|
|
|
128
140
|
# auth_names
|
|
129
141
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
130
142
|
|
|
131
143
|
new_options = opts.merge(
|
|
132
|
-
:operation => :"AgentsApi.
|
|
144
|
+
:operation => :"AgentsApi.get_thread",
|
|
133
145
|
:header_params => header_params,
|
|
134
146
|
:query_params => query_params,
|
|
135
147
|
:form_params => form_params,
|
|
@@ -138,38 +150,44 @@ module Lockally
|
|
|
138
150
|
:return_type => return_type
|
|
139
151
|
)
|
|
140
152
|
|
|
141
|
-
data, status_code, headers = @api_client.call_api(:
|
|
153
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
142
154
|
if @api_client.config.debugging
|
|
143
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
155
|
+
@api_client.config.logger.debug "API called: AgentsApi#get_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
144
156
|
end
|
|
145
157
|
return data, status_code, headers
|
|
146
158
|
end
|
|
147
159
|
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
# @param
|
|
160
|
+
# Get one message with body
|
|
161
|
+
# Full text/html body fetched on demand from mail storage. Never marks the message read.
|
|
162
|
+
# @param thread_id [String]
|
|
163
|
+
# @param message_id [String]
|
|
151
164
|
# @param [Hash] opts the optional parameters
|
|
152
|
-
# @return [
|
|
153
|
-
def
|
|
154
|
-
data, _status_code, _headers =
|
|
165
|
+
# @return [ThreadMessageBody]
|
|
166
|
+
def get_thread_message(thread_id, message_id, opts = {})
|
|
167
|
+
data, _status_code, _headers = get_thread_message_with_http_info(thread_id, message_id, opts)
|
|
155
168
|
data
|
|
156
169
|
end
|
|
157
170
|
|
|
158
|
-
#
|
|
159
|
-
#
|
|
160
|
-
# @param
|
|
171
|
+
# Get one message with body
|
|
172
|
+
# Full text/html body fetched on demand from mail storage. Never marks the message read.
|
|
173
|
+
# @param thread_id [String]
|
|
174
|
+
# @param message_id [String]
|
|
161
175
|
# @param [Hash] opts the optional parameters
|
|
162
|
-
# @return [Array<(
|
|
163
|
-
def
|
|
176
|
+
# @return [Array<(ThreadMessageBody, Integer, Hash)>] ThreadMessageBody data, response status code and response headers
|
|
177
|
+
def get_thread_message_with_http_info(thread_id, message_id, opts = {})
|
|
164
178
|
if @api_client.config.debugging
|
|
165
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
179
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.get_thread_message ...'
|
|
166
180
|
end
|
|
167
|
-
# verify the required parameter '
|
|
168
|
-
if @api_client.config.client_side_validation &&
|
|
169
|
-
fail ArgumentError, "Missing the required parameter '
|
|
181
|
+
# verify the required parameter 'thread_id' is set
|
|
182
|
+
if @api_client.config.client_side_validation && thread_id.nil?
|
|
183
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.get_thread_message"
|
|
184
|
+
end
|
|
185
|
+
# verify the required parameter 'message_id' is set
|
|
186
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
187
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.get_thread_message"
|
|
170
188
|
end
|
|
171
189
|
# resource path
|
|
172
|
-
local_var_path = '/v1/
|
|
190
|
+
local_var_path = '/v1/threads/{threadID}/messages/{messageID}'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s))
|
|
173
191
|
|
|
174
192
|
# query parameters
|
|
175
193
|
query_params = opts[:query_params] || {}
|
|
@@ -186,13 +204,13 @@ module Lockally
|
|
|
186
204
|
post_body = opts[:debug_body]
|
|
187
205
|
|
|
188
206
|
# return_type
|
|
189
|
-
return_type = opts[:debug_return_type] || '
|
|
207
|
+
return_type = opts[:debug_return_type] || 'ThreadMessageBody'
|
|
190
208
|
|
|
191
209
|
# auth_names
|
|
192
210
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
193
211
|
|
|
194
212
|
new_options = opts.merge(
|
|
195
|
-
:operation => :"AgentsApi.
|
|
213
|
+
:operation => :"AgentsApi.get_thread_message",
|
|
196
214
|
:header_params => header_params,
|
|
197
215
|
:query_params => query_params,
|
|
198
216
|
:form_params => form_params,
|
|
@@ -201,32 +219,38 @@ module Lockally
|
|
|
201
219
|
:return_type => return_type
|
|
202
220
|
)
|
|
203
221
|
|
|
204
|
-
data, status_code, headers = @api_client.call_api(:
|
|
222
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
205
223
|
if @api_client.config.debugging
|
|
206
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
224
|
+
@api_client.config.logger.debug "API called: AgentsApi#get_thread_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
207
225
|
end
|
|
208
226
|
return data, status_code, headers
|
|
209
227
|
end
|
|
210
228
|
|
|
211
|
-
#
|
|
212
|
-
#
|
|
229
|
+
# Grant a mailbox to a key
|
|
230
|
+
# Body: {\"mailbox\": \"email or id\"}. Refused (422) for mailboxes with agent access disabled or an active E2E encryption key — the server cannot read E2E mailboxes.
|
|
231
|
+
# @param key_id [String]
|
|
213
232
|
# @param [Hash] opts the optional parameters
|
|
214
|
-
# @return [
|
|
215
|
-
def
|
|
216
|
-
data, _status_code, _headers =
|
|
233
|
+
# @return [MailboxGrant]
|
|
234
|
+
def grant_api_key_mailbox(key_id, opts = {})
|
|
235
|
+
data, _status_code, _headers = grant_api_key_mailbox_with_http_info(key_id, opts)
|
|
217
236
|
data
|
|
218
237
|
end
|
|
219
238
|
|
|
220
|
-
#
|
|
221
|
-
#
|
|
239
|
+
# Grant a mailbox to a key
|
|
240
|
+
# Body: {\"mailbox\": \"email or id\"}. Refused (422) for mailboxes with agent access disabled or an active E2E encryption key — the server cannot read E2E mailboxes.
|
|
241
|
+
# @param key_id [String]
|
|
222
242
|
# @param [Hash] opts the optional parameters
|
|
223
|
-
# @return [Array<(
|
|
224
|
-
def
|
|
243
|
+
# @return [Array<(MailboxGrant, Integer, Hash)>] MailboxGrant data, response status code and response headers
|
|
244
|
+
def grant_api_key_mailbox_with_http_info(key_id, opts = {})
|
|
225
245
|
if @api_client.config.debugging
|
|
226
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
246
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.grant_api_key_mailbox ...'
|
|
247
|
+
end
|
|
248
|
+
# verify the required parameter 'key_id' is set
|
|
249
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
250
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.grant_api_key_mailbox"
|
|
227
251
|
end
|
|
228
252
|
# resource path
|
|
229
|
-
local_var_path = '/v1/
|
|
253
|
+
local_var_path = '/v1/api-keys/{keyID}/mailboxes'.sub('{keyID}', CGI.escape(key_id.to_s))
|
|
230
254
|
|
|
231
255
|
# query parameters
|
|
232
256
|
query_params = opts[:query_params] || {}
|
|
@@ -243,13 +267,13 @@ module Lockally
|
|
|
243
267
|
post_body = opts[:debug_body]
|
|
244
268
|
|
|
245
269
|
# return_type
|
|
246
|
-
return_type = opts[:debug_return_type] || '
|
|
270
|
+
return_type = opts[:debug_return_type] || 'MailboxGrant'
|
|
247
271
|
|
|
248
272
|
# auth_names
|
|
249
273
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
250
274
|
|
|
251
275
|
new_options = opts.merge(
|
|
252
|
-
:operation => :"AgentsApi.
|
|
276
|
+
:operation => :"AgentsApi.grant_api_key_mailbox",
|
|
253
277
|
:header_params => header_params,
|
|
254
278
|
:query_params => query_params,
|
|
255
279
|
:form_params => form_params,
|
|
@@ -258,42 +282,39 @@ module Lockally
|
|
|
258
282
|
:return_type => return_type
|
|
259
283
|
)
|
|
260
284
|
|
|
261
|
-
data, status_code, headers = @api_client.call_api(:
|
|
285
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
262
286
|
if @api_client.config.debugging
|
|
263
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
287
|
+
@api_client.config.logger.debug "API called: AgentsApi#grant_api_key_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
264
288
|
end
|
|
265
289
|
return data, status_code, headers
|
|
266
290
|
end
|
|
267
291
|
|
|
268
|
-
#
|
|
269
|
-
#
|
|
270
|
-
# @param email [String]
|
|
292
|
+
# List a key's mailbox grants
|
|
293
|
+
# @param key_id [String]
|
|
271
294
|
# @param [Hash] opts the optional parameters
|
|
272
|
-
# @return [
|
|
273
|
-
def
|
|
274
|
-
data, _status_code, _headers =
|
|
295
|
+
# @return [MailboxGrantList]
|
|
296
|
+
def list_api_key_mailboxes(key_id, opts = {})
|
|
297
|
+
data, _status_code, _headers = list_api_key_mailboxes_with_http_info(key_id, opts)
|
|
275
298
|
data
|
|
276
299
|
end
|
|
277
300
|
|
|
278
|
-
#
|
|
279
|
-
#
|
|
280
|
-
# @param email [String]
|
|
301
|
+
# List a key's mailbox grants
|
|
302
|
+
# @param key_id [String]
|
|
281
303
|
# @param [Hash] opts the optional parameters
|
|
282
|
-
# @return [Array<(
|
|
283
|
-
def
|
|
304
|
+
# @return [Array<(MailboxGrantList, Integer, Hash)>] MailboxGrantList data, response status code and response headers
|
|
305
|
+
def list_api_key_mailboxes_with_http_info(key_id, opts = {})
|
|
284
306
|
if @api_client.config.debugging
|
|
285
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
307
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.list_api_key_mailboxes ...'
|
|
286
308
|
end
|
|
287
|
-
# verify the required parameter '
|
|
288
|
-
if @api_client.config.client_side_validation &&
|
|
289
|
-
fail ArgumentError, "Missing the required parameter '
|
|
309
|
+
# verify the required parameter 'key_id' is set
|
|
310
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
311
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.list_api_key_mailboxes"
|
|
290
312
|
end
|
|
291
313
|
# resource path
|
|
292
|
-
local_var_path = '/v1/
|
|
314
|
+
local_var_path = '/v1/api-keys/{keyID}/mailboxes'.sub('{keyID}', CGI.escape(key_id.to_s))
|
|
293
315
|
|
|
294
316
|
# query parameters
|
|
295
317
|
query_params = opts[:query_params] || {}
|
|
296
|
-
query_params[:'email'] = email
|
|
297
318
|
|
|
298
319
|
# header parameters
|
|
299
320
|
header_params = opts[:header_params] || {}
|
|
@@ -307,13 +328,13 @@ module Lockally
|
|
|
307
328
|
post_body = opts[:debug_body]
|
|
308
329
|
|
|
309
330
|
# return_type
|
|
310
|
-
return_type = opts[:debug_return_type] || '
|
|
331
|
+
return_type = opts[:debug_return_type] || 'MailboxGrantList'
|
|
311
332
|
|
|
312
333
|
# auth_names
|
|
313
334
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
314
335
|
|
|
315
336
|
new_options = opts.merge(
|
|
316
|
-
:operation => :"AgentsApi.
|
|
337
|
+
:operation => :"AgentsApi.list_api_key_mailboxes",
|
|
317
338
|
:header_params => header_params,
|
|
318
339
|
:query_params => query_params,
|
|
319
340
|
:form_params => form_params,
|
|
@@ -324,7 +345,7 @@ module Lockally
|
|
|
324
345
|
|
|
325
346
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
326
347
|
if @api_client.config.debugging
|
|
327
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
348
|
+
@api_client.config.logger.debug "API called: AgentsApi#list_api_key_mailboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
328
349
|
end
|
|
329
350
|
return data, status_code, headers
|
|
330
351
|
end
|
|
@@ -332,19 +353,19 @@ module Lockally
|
|
|
332
353
|
# List granted inboxes
|
|
333
354
|
# The mailboxes this key is granted, with thread counts and last activity. Admin sessions see every agent-enabled, non-E2E mailbox.
|
|
334
355
|
# @param [Hash] opts the optional parameters
|
|
335
|
-
# @return [
|
|
336
|
-
def
|
|
337
|
-
data, _status_code, _headers =
|
|
356
|
+
# @return [InboxList]
|
|
357
|
+
def list_inboxes(opts = {})
|
|
358
|
+
data, _status_code, _headers = list_inboxes_with_http_info(opts)
|
|
338
359
|
data
|
|
339
360
|
end
|
|
340
361
|
|
|
341
362
|
# List granted inboxes
|
|
342
363
|
# The mailboxes this key is granted, with thread counts and last activity. Admin sessions see every agent-enabled, non-E2E mailbox.
|
|
343
364
|
# @param [Hash] opts the optional parameters
|
|
344
|
-
# @return [Array<(
|
|
345
|
-
def
|
|
365
|
+
# @return [Array<(InboxList, Integer, Hash)>] InboxList data, response status code and response headers
|
|
366
|
+
def list_inboxes_with_http_info(opts = {})
|
|
346
367
|
if @api_client.config.debugging
|
|
347
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
368
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.list_inboxes ...'
|
|
348
369
|
end
|
|
349
370
|
# resource path
|
|
350
371
|
local_var_path = '/v1/inboxes'
|
|
@@ -364,13 +385,13 @@ module Lockally
|
|
|
364
385
|
post_body = opts[:debug_body]
|
|
365
386
|
|
|
366
387
|
# return_type
|
|
367
|
-
return_type = opts[:debug_return_type] || '
|
|
388
|
+
return_type = opts[:debug_return_type] || 'InboxList'
|
|
368
389
|
|
|
369
390
|
# auth_names
|
|
370
391
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
371
392
|
|
|
372
393
|
new_options = opts.merge(
|
|
373
|
-
:operation => :"AgentsApi.
|
|
394
|
+
:operation => :"AgentsApi.list_inboxes",
|
|
374
395
|
:header_params => header_params,
|
|
375
396
|
:query_params => query_params,
|
|
376
397
|
:form_params => form_params,
|
|
@@ -381,81 +402,72 @@ module Lockally
|
|
|
381
402
|
|
|
382
403
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
383
404
|
if @api_client.config.debugging
|
|
384
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
405
|
+
@api_client.config.logger.debug "API called: AgentsApi#list_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
385
406
|
end
|
|
386
407
|
return data, status_code, headers
|
|
387
408
|
end
|
|
388
409
|
|
|
389
|
-
#
|
|
390
|
-
#
|
|
391
|
-
# @param mailbox [String]
|
|
392
|
-
# @param idempotency_key [String]
|
|
393
|
-
# @param v1_inboxes_mailbox_messages_post_request [V1InboxesMailboxMessagesPostRequest]
|
|
410
|
+
# List conversation threads
|
|
411
|
+
# Newest-active first. Cursors: `?before=<RFC3339>` pages backwards; `?since=<RFC3339>` delta-syncs forward (oldest first) so an agent can catch up in order.
|
|
412
|
+
# @param mailbox [String] mailbox email or id
|
|
394
413
|
# @param [Hash] opts the optional parameters
|
|
395
|
-
# @
|
|
396
|
-
|
|
397
|
-
|
|
414
|
+
# @option opts [Time] :since
|
|
415
|
+
# @option opts [Time] :before
|
|
416
|
+
# @option opts [Integer] :limit (default to 50)
|
|
417
|
+
# @return [ThreadList]
|
|
418
|
+
def list_threads(mailbox, opts = {})
|
|
419
|
+
data, _status_code, _headers = list_threads_with_http_info(mailbox, opts)
|
|
398
420
|
data
|
|
399
421
|
end
|
|
400
422
|
|
|
401
|
-
#
|
|
402
|
-
#
|
|
403
|
-
# @param mailbox [String]
|
|
404
|
-
# @param idempotency_key [String]
|
|
405
|
-
# @param v1_inboxes_mailbox_messages_post_request [V1InboxesMailboxMessagesPostRequest]
|
|
423
|
+
# List conversation threads
|
|
424
|
+
# Newest-active first. Cursors: `?before=<RFC3339>` pages backwards; `?since=<RFC3339>` delta-syncs forward (oldest first) so an agent can catch up in order.
|
|
425
|
+
# @param mailbox [String] mailbox email or id
|
|
406
426
|
# @param [Hash] opts the optional parameters
|
|
407
|
-
# @
|
|
408
|
-
|
|
427
|
+
# @option opts [Time] :since
|
|
428
|
+
# @option opts [Time] :before
|
|
429
|
+
# @option opts [Integer] :limit (default to 50)
|
|
430
|
+
# @return [Array<(ThreadList, Integer, Hash)>] ThreadList data, response status code and response headers
|
|
431
|
+
def list_threads_with_http_info(mailbox, opts = {})
|
|
409
432
|
if @api_client.config.debugging
|
|
410
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
433
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.list_threads ...'
|
|
411
434
|
end
|
|
412
435
|
# verify the required parameter 'mailbox' is set
|
|
413
436
|
if @api_client.config.client_side_validation && mailbox.nil?
|
|
414
|
-
fail ArgumentError, "Missing the required parameter 'mailbox' when calling AgentsApi.
|
|
415
|
-
end
|
|
416
|
-
# verify the required parameter 'idempotency_key' is set
|
|
417
|
-
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
418
|
-
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling AgentsApi.v1_inboxes_mailbox_messages_post"
|
|
437
|
+
fail ArgumentError, "Missing the required parameter 'mailbox' when calling AgentsApi.list_threads"
|
|
419
438
|
end
|
|
420
|
-
if @api_client.config.client_side_validation &&
|
|
421
|
-
fail ArgumentError, 'invalid value for "
|
|
439
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
440
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AgentsApi.list_threads, must be smaller than or equal to 200.'
|
|
422
441
|
end
|
|
423
442
|
|
|
424
|
-
# verify the required parameter 'v1_inboxes_mailbox_messages_post_request' is set
|
|
425
|
-
if @api_client.config.client_side_validation && v1_inboxes_mailbox_messages_post_request.nil?
|
|
426
|
-
fail ArgumentError, "Missing the required parameter 'v1_inboxes_mailbox_messages_post_request' when calling AgentsApi.v1_inboxes_mailbox_messages_post"
|
|
427
|
-
end
|
|
428
443
|
# resource path
|
|
429
|
-
local_var_path = '/v1/inboxes/{mailbox}/
|
|
444
|
+
local_var_path = '/v1/inboxes/{mailbox}/threads'.sub('{mailbox}', CGI.escape(mailbox.to_s))
|
|
430
445
|
|
|
431
446
|
# query parameters
|
|
432
447
|
query_params = opts[:query_params] || {}
|
|
448
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
|
449
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
450
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
433
451
|
|
|
434
452
|
# header parameters
|
|
435
453
|
header_params = opts[:header_params] || {}
|
|
436
454
|
# HTTP header 'Accept' (if needed)
|
|
437
455
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
438
|
-
# HTTP header 'Content-Type'
|
|
439
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
440
|
-
if !content_type.nil?
|
|
441
|
-
header_params['Content-Type'] = content_type
|
|
442
|
-
end
|
|
443
|
-
header_params[:'Idempotency-Key'] = idempotency_key
|
|
444
456
|
|
|
445
457
|
# form parameters
|
|
446
458
|
form_params = opts[:form_params] || {}
|
|
447
459
|
|
|
448
460
|
# http body (model)
|
|
449
|
-
post_body = opts[:debug_body]
|
|
461
|
+
post_body = opts[:debug_body]
|
|
450
462
|
|
|
451
463
|
# return_type
|
|
452
|
-
return_type = opts[:debug_return_type] || '
|
|
464
|
+
return_type = opts[:debug_return_type] || 'ThreadList'
|
|
453
465
|
|
|
454
466
|
# auth_names
|
|
455
467
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
456
468
|
|
|
457
469
|
new_options = opts.merge(
|
|
458
|
-
:operation => :"AgentsApi.
|
|
470
|
+
:operation => :"AgentsApi.list_threads",
|
|
459
471
|
:header_params => header_params,
|
|
460
472
|
:query_params => query_params,
|
|
461
473
|
:form_params => form_params,
|
|
@@ -464,54 +476,42 @@ module Lockally
|
|
|
464
476
|
:return_type => return_type
|
|
465
477
|
)
|
|
466
478
|
|
|
467
|
-
data, status_code, headers = @api_client.call_api(:
|
|
479
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
468
480
|
if @api_client.config.debugging
|
|
469
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
481
|
+
@api_client.config.logger.debug "API called: AgentsApi#list_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
470
482
|
end
|
|
471
483
|
return data, status_code, headers
|
|
472
484
|
end
|
|
473
485
|
|
|
474
|
-
#
|
|
475
|
-
#
|
|
476
|
-
# @param
|
|
486
|
+
# Who is this sender?
|
|
487
|
+
# Directory record (name, company, role, notes), whether the address is one of the tenant's own mailboxes, and grant-aware correspondence history (thread count, first/last seen across granted mailboxes only).
|
|
488
|
+
# @param email [String]
|
|
477
489
|
# @param [Hash] opts the optional parameters
|
|
478
|
-
# @
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
# @return [Object]
|
|
482
|
-
def v1_inboxes_mailbox_threads_get(mailbox, opts = {})
|
|
483
|
-
data, _status_code, _headers = v1_inboxes_mailbox_threads_get_with_http_info(mailbox, opts)
|
|
490
|
+
# @return [ContactLookup]
|
|
491
|
+
def lookup_contact(email, opts = {})
|
|
492
|
+
data, _status_code, _headers = lookup_contact_with_http_info(email, opts)
|
|
484
493
|
data
|
|
485
494
|
end
|
|
486
495
|
|
|
487
|
-
#
|
|
488
|
-
#
|
|
489
|
-
# @param
|
|
496
|
+
# Who is this sender?
|
|
497
|
+
# Directory record (name, company, role, notes), whether the address is one of the tenant's own mailboxes, and grant-aware correspondence history (thread count, first/last seen across granted mailboxes only).
|
|
498
|
+
# @param email [String]
|
|
490
499
|
# @param [Hash] opts the optional parameters
|
|
491
|
-
# @
|
|
492
|
-
|
|
493
|
-
# @option opts [Integer] :limit (default to 50)
|
|
494
|
-
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
495
|
-
def v1_inboxes_mailbox_threads_get_with_http_info(mailbox, opts = {})
|
|
500
|
+
# @return [Array<(ContactLookup, Integer, Hash)>] ContactLookup data, response status code and response headers
|
|
501
|
+
def lookup_contact_with_http_info(email, opts = {})
|
|
496
502
|
if @api_client.config.debugging
|
|
497
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
503
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.lookup_contact ...'
|
|
498
504
|
end
|
|
499
|
-
# verify the required parameter '
|
|
500
|
-
if @api_client.config.client_side_validation &&
|
|
501
|
-
fail ArgumentError, "Missing the required parameter '
|
|
502
|
-
end
|
|
503
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
504
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AgentsApi.v1_inboxes_mailbox_threads_get, must be smaller than or equal to 200.'
|
|
505
|
+
# verify the required parameter 'email' is set
|
|
506
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
507
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling AgentsApi.lookup_contact"
|
|
505
508
|
end
|
|
506
|
-
|
|
507
509
|
# resource path
|
|
508
|
-
local_var_path = '/v1/
|
|
510
|
+
local_var_path = '/v1/contacts/lookup'
|
|
509
511
|
|
|
510
512
|
# query parameters
|
|
511
513
|
query_params = opts[:query_params] || {}
|
|
512
|
-
query_params[:'
|
|
513
|
-
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
514
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
514
|
+
query_params[:'email'] = email
|
|
515
515
|
|
|
516
516
|
# header parameters
|
|
517
517
|
header_params = opts[:header_params] || {}
|
|
@@ -525,13 +525,13 @@ module Lockally
|
|
|
525
525
|
post_body = opts[:debug_body]
|
|
526
526
|
|
|
527
527
|
# return_type
|
|
528
|
-
return_type = opts[:debug_return_type] || '
|
|
528
|
+
return_type = opts[:debug_return_type] || 'ContactLookup'
|
|
529
529
|
|
|
530
530
|
# auth_names
|
|
531
531
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
532
532
|
|
|
533
533
|
new_options = opts.merge(
|
|
534
|
-
:operation => :"AgentsApi.
|
|
534
|
+
:operation => :"AgentsApi.lookup_contact",
|
|
535
535
|
:header_params => header_params,
|
|
536
536
|
:query_params => query_params,
|
|
537
537
|
:form_params => form_params,
|
|
@@ -542,36 +542,42 @@ module Lockally
|
|
|
542
542
|
|
|
543
543
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
544
544
|
if @api_client.config.debugging
|
|
545
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
545
|
+
@api_client.config.logger.debug "API called: AgentsApi#lookup_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
546
546
|
end
|
|
547
547
|
return data, status_code, headers
|
|
548
548
|
end
|
|
549
549
|
|
|
550
|
-
#
|
|
551
|
-
#
|
|
550
|
+
# Mark read/unread
|
|
551
|
+
# The ONLY way agent access changes unread state. Body: {\"read\": true|false} (default true).
|
|
552
552
|
# @param thread_id [String]
|
|
553
|
+
# @param message_id [String]
|
|
553
554
|
# @param [Hash] opts the optional parameters
|
|
554
|
-
# @return [
|
|
555
|
-
def
|
|
556
|
-
data, _status_code, _headers =
|
|
555
|
+
# @return [MarkReadResult]
|
|
556
|
+
def mark_thread_message_read(thread_id, message_id, opts = {})
|
|
557
|
+
data, _status_code, _headers = mark_thread_message_read_with_http_info(thread_id, message_id, opts)
|
|
557
558
|
data
|
|
558
559
|
end
|
|
559
560
|
|
|
560
|
-
#
|
|
561
|
-
#
|
|
561
|
+
# Mark read/unread
|
|
562
|
+
# The ONLY way agent access changes unread state. Body: {\"read\": true|false} (default true).
|
|
562
563
|
# @param thread_id [String]
|
|
564
|
+
# @param message_id [String]
|
|
563
565
|
# @param [Hash] opts the optional parameters
|
|
564
|
-
# @return [Array<(
|
|
565
|
-
def
|
|
566
|
+
# @return [Array<(MarkReadResult, Integer, Hash)>] MarkReadResult data, response status code and response headers
|
|
567
|
+
def mark_thread_message_read_with_http_info(thread_id, message_id, opts = {})
|
|
566
568
|
if @api_client.config.debugging
|
|
567
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
569
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.mark_thread_message_read ...'
|
|
568
570
|
end
|
|
569
571
|
# verify the required parameter 'thread_id' is set
|
|
570
572
|
if @api_client.config.client_side_validation && thread_id.nil?
|
|
571
|
-
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.
|
|
573
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.mark_thread_message_read"
|
|
574
|
+
end
|
|
575
|
+
# verify the required parameter 'message_id' is set
|
|
576
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
577
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.mark_thread_message_read"
|
|
572
578
|
end
|
|
573
579
|
# resource path
|
|
574
|
-
local_var_path = '/v1/threads/{threadID}'.sub('{threadID}', CGI.escape(thread_id.to_s))
|
|
580
|
+
local_var_path = '/v1/threads/{threadID}/messages/{messageID}/read'.sub('{threadID}', CGI.escape(thread_id.to_s)).sub('{messageID}', CGI.escape(message_id.to_s))
|
|
575
581
|
|
|
576
582
|
# query parameters
|
|
577
583
|
query_params = opts[:query_params] || {}
|
|
@@ -588,13 +594,13 @@ module Lockally
|
|
|
588
594
|
post_body = opts[:debug_body]
|
|
589
595
|
|
|
590
596
|
# return_type
|
|
591
|
-
return_type = opts[:debug_return_type] || '
|
|
597
|
+
return_type = opts[:debug_return_type] || 'MarkReadResult'
|
|
592
598
|
|
|
593
599
|
# auth_names
|
|
594
600
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
595
601
|
|
|
596
602
|
new_options = opts.merge(
|
|
597
|
-
:operation => :"AgentsApi.
|
|
603
|
+
:operation => :"AgentsApi.mark_thread_message_read",
|
|
598
604
|
:header_params => header_params,
|
|
599
605
|
:query_params => query_params,
|
|
600
606
|
:form_params => form_params,
|
|
@@ -603,58 +609,57 @@ module Lockally
|
|
|
603
609
|
:return_type => return_type
|
|
604
610
|
)
|
|
605
611
|
|
|
606
|
-
data, status_code, headers = @api_client.call_api(:
|
|
612
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
607
613
|
if @api_client.config.debugging
|
|
608
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
614
|
+
@api_client.config.logger.debug "API called: AgentsApi#mark_thread_message_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
609
615
|
end
|
|
610
616
|
return data, status_code, headers
|
|
611
617
|
end
|
|
612
618
|
|
|
613
|
-
#
|
|
619
|
+
# Reply in-thread (agent stream)
|
|
620
|
+
# The server builds In-Reply-To/References and defaults recipients + subject from the conversation — a minimal call is {\"text\": \"...\"}. Guarded by the reply-loop detector (≥5 outbound/10min → 429 + agent.loop_detected). Idempotency-Key required.
|
|
614
621
|
# @param thread_id [String]
|
|
615
|
-
# @param
|
|
616
|
-
# @param idx [Integer]
|
|
622
|
+
# @param idempotency_key [String]
|
|
617
623
|
# @param [Hash] opts the optional parameters
|
|
618
|
-
# @return [
|
|
619
|
-
def
|
|
620
|
-
|
|
621
|
-
|
|
624
|
+
# @return [AgentSendResult]
|
|
625
|
+
def reply_to_thread(thread_id, idempotency_key, opts = {})
|
|
626
|
+
data, _status_code, _headers = reply_to_thread_with_http_info(thread_id, idempotency_key, opts)
|
|
627
|
+
data
|
|
622
628
|
end
|
|
623
629
|
|
|
624
|
-
#
|
|
630
|
+
# Reply in-thread (agent stream)
|
|
631
|
+
# The server builds In-Reply-To/References and defaults recipients + subject from the conversation — a minimal call is {\"text\": \"...\"}. Guarded by the reply-loop detector (≥5 outbound/10min → 429 + agent.loop_detected). Idempotency-Key required.
|
|
625
632
|
# @param thread_id [String]
|
|
626
|
-
# @param
|
|
627
|
-
# @param idx [Integer]
|
|
633
|
+
# @param idempotency_key [String]
|
|
628
634
|
# @param [Hash] opts the optional parameters
|
|
629
|
-
# @return [Array<(
|
|
630
|
-
def
|
|
635
|
+
# @return [Array<(AgentSendResult, Integer, Hash)>] AgentSendResult data, response status code and response headers
|
|
636
|
+
def reply_to_thread_with_http_info(thread_id, idempotency_key, opts = {})
|
|
631
637
|
if @api_client.config.debugging
|
|
632
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
638
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.reply_to_thread ...'
|
|
633
639
|
end
|
|
634
640
|
# verify the required parameter 'thread_id' is set
|
|
635
641
|
if @api_client.config.client_side_validation && thread_id.nil?
|
|
636
|
-
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.
|
|
637
|
-
end
|
|
638
|
-
# verify the required parameter 'message_id' is set
|
|
639
|
-
if @api_client.config.client_side_validation && message_id.nil?
|
|
640
|
-
fail ArgumentError, "Missing the required parameter 'message_id' when calling AgentsApi.v1_threads_thread_id_messages_message_id_attachments_idx_get"
|
|
642
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.reply_to_thread"
|
|
641
643
|
end
|
|
642
|
-
# verify the required parameter '
|
|
643
|
-
if @api_client.config.client_side_validation &&
|
|
644
|
-
fail ArgumentError, "Missing the required parameter '
|
|
644
|
+
# verify the required parameter 'idempotency_key' is set
|
|
645
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
646
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling AgentsApi.reply_to_thread"
|
|
645
647
|
end
|
|
646
|
-
if @api_client.config.client_side_validation &&
|
|
647
|
-
fail ArgumentError, 'invalid value for "
|
|
648
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
649
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling AgentsApi.reply_to_thread, the character length must be smaller than or equal to 255.'
|
|
648
650
|
end
|
|
649
651
|
|
|
650
652
|
# resource path
|
|
651
|
-
local_var_path = '/v1/threads/{threadID}/
|
|
653
|
+
local_var_path = '/v1/threads/{threadID}/reply'.sub('{threadID}', CGI.escape(thread_id.to_s))
|
|
652
654
|
|
|
653
655
|
# query parameters
|
|
654
656
|
query_params = opts[:query_params] || {}
|
|
655
657
|
|
|
656
658
|
# header parameters
|
|
657
659
|
header_params = opts[:header_params] || {}
|
|
660
|
+
# HTTP header 'Accept' (if needed)
|
|
661
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
662
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
658
663
|
|
|
659
664
|
# form parameters
|
|
660
665
|
form_params = opts[:form_params] || {}
|
|
@@ -663,13 +668,13 @@ module Lockally
|
|
|
663
668
|
post_body = opts[:debug_body]
|
|
664
669
|
|
|
665
670
|
# return_type
|
|
666
|
-
return_type = opts[:debug_return_type]
|
|
671
|
+
return_type = opts[:debug_return_type] || 'AgentSendResult'
|
|
667
672
|
|
|
668
673
|
# auth_names
|
|
669
674
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
670
675
|
|
|
671
676
|
new_options = opts.merge(
|
|
672
|
-
:operation => :"AgentsApi.
|
|
677
|
+
:operation => :"AgentsApi.reply_to_thread",
|
|
673
678
|
:header_params => header_params,
|
|
674
679
|
:query_params => query_params,
|
|
675
680
|
:form_params => form_params,
|
|
@@ -678,52 +683,48 @@ module Lockally
|
|
|
678
683
|
:return_type => return_type
|
|
679
684
|
)
|
|
680
685
|
|
|
681
|
-
data, status_code, headers = @api_client.call_api(:
|
|
686
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
682
687
|
if @api_client.config.debugging
|
|
683
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
688
|
+
@api_client.config.logger.debug "API called: AgentsApi#reply_to_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
684
689
|
end
|
|
685
690
|
return data, status_code, headers
|
|
686
691
|
end
|
|
687
692
|
|
|
688
|
-
#
|
|
689
|
-
#
|
|
690
|
-
# @param
|
|
691
|
-
# @param message_id [String]
|
|
693
|
+
# Revoke a mailbox grant
|
|
694
|
+
# @param key_id [String]
|
|
695
|
+
# @param mailbox_id [String]
|
|
692
696
|
# @param [Hash] opts the optional parameters
|
|
693
|
-
# @return [
|
|
694
|
-
def
|
|
695
|
-
|
|
696
|
-
|
|
697
|
+
# @return [nil]
|
|
698
|
+
def revoke_api_key_mailbox(key_id, mailbox_id, opts = {})
|
|
699
|
+
revoke_api_key_mailbox_with_http_info(key_id, mailbox_id, opts)
|
|
700
|
+
nil
|
|
697
701
|
end
|
|
698
702
|
|
|
699
|
-
#
|
|
700
|
-
#
|
|
701
|
-
# @param
|
|
702
|
-
# @param message_id [String]
|
|
703
|
+
# Revoke a mailbox grant
|
|
704
|
+
# @param key_id [String]
|
|
705
|
+
# @param mailbox_id [String]
|
|
703
706
|
# @param [Hash] opts the optional parameters
|
|
704
|
-
# @return [Array<(
|
|
705
|
-
def
|
|
707
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
708
|
+
def revoke_api_key_mailbox_with_http_info(key_id, mailbox_id, opts = {})
|
|
706
709
|
if @api_client.config.debugging
|
|
707
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
710
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.revoke_api_key_mailbox ...'
|
|
708
711
|
end
|
|
709
|
-
# verify the required parameter '
|
|
710
|
-
if @api_client.config.client_side_validation &&
|
|
711
|
-
fail ArgumentError, "Missing the required parameter '
|
|
712
|
+
# verify the required parameter 'key_id' is set
|
|
713
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
|
714
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling AgentsApi.revoke_api_key_mailbox"
|
|
712
715
|
end
|
|
713
|
-
# verify the required parameter '
|
|
714
|
-
if @api_client.config.client_side_validation &&
|
|
715
|
-
fail ArgumentError, "Missing the required parameter '
|
|
716
|
+
# verify the required parameter 'mailbox_id' is set
|
|
717
|
+
if @api_client.config.client_side_validation && mailbox_id.nil?
|
|
718
|
+
fail ArgumentError, "Missing the required parameter 'mailbox_id' when calling AgentsApi.revoke_api_key_mailbox"
|
|
716
719
|
end
|
|
717
720
|
# resource path
|
|
718
|
-
local_var_path = '/v1/
|
|
721
|
+
local_var_path = '/v1/api-keys/{keyID}/mailboxes/{mailboxID}'.sub('{keyID}', CGI.escape(key_id.to_s)).sub('{mailboxID}', CGI.escape(mailbox_id.to_s))
|
|
719
722
|
|
|
720
723
|
# query parameters
|
|
721
724
|
query_params = opts[:query_params] || {}
|
|
722
725
|
|
|
723
726
|
# header parameters
|
|
724
727
|
header_params = opts[:header_params] || {}
|
|
725
|
-
# HTTP header 'Accept' (if needed)
|
|
726
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
727
728
|
|
|
728
729
|
# form parameters
|
|
729
730
|
form_params = opts[:form_params] || {}
|
|
@@ -732,13 +733,13 @@ module Lockally
|
|
|
732
733
|
post_body = opts[:debug_body]
|
|
733
734
|
|
|
734
735
|
# return_type
|
|
735
|
-
return_type = opts[:debug_return_type]
|
|
736
|
+
return_type = opts[:debug_return_type]
|
|
736
737
|
|
|
737
738
|
# auth_names
|
|
738
739
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
739
740
|
|
|
740
741
|
new_options = opts.merge(
|
|
741
|
-
:operation => :"AgentsApi.
|
|
742
|
+
:operation => :"AgentsApi.revoke_api_key_mailbox",
|
|
742
743
|
:header_params => header_params,
|
|
743
744
|
:query_params => query_params,
|
|
744
745
|
:form_params => form_params,
|
|
@@ -747,44 +748,54 @@ module Lockally
|
|
|
747
748
|
:return_type => return_type
|
|
748
749
|
)
|
|
749
750
|
|
|
750
|
-
data, status_code, headers = @api_client.call_api(:
|
|
751
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
751
752
|
if @api_client.config.debugging
|
|
752
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
753
|
+
@api_client.config.logger.debug "API called: AgentsApi#revoke_api_key_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
753
754
|
end
|
|
754
755
|
return data, status_code, headers
|
|
755
756
|
end
|
|
756
757
|
|
|
757
|
-
#
|
|
758
|
-
#
|
|
759
|
-
# @param
|
|
760
|
-
# @param
|
|
758
|
+
# Start a new conversation (agent stream)
|
|
759
|
+
# Sends a new email from a granted mailbox. Classified stream=agent (isolated reputation, per-key rate caps). The first inbound reply adopts the created thread via the References chain. Idempotency-Key required. Mailboxes with agent_draft_policy=always_approve divert this into a pending draft.
|
|
760
|
+
# @param mailbox [String]
|
|
761
|
+
# @param idempotency_key [String]
|
|
762
|
+
# @param start_conversation_request [StartConversationRequest]
|
|
761
763
|
# @param [Hash] opts the optional parameters
|
|
762
|
-
# @return [
|
|
763
|
-
def
|
|
764
|
-
data, _status_code, _headers =
|
|
764
|
+
# @return [AgentSendResult]
|
|
765
|
+
def start_conversation(mailbox, idempotency_key, start_conversation_request, opts = {})
|
|
766
|
+
data, _status_code, _headers = start_conversation_with_http_info(mailbox, idempotency_key, start_conversation_request, opts)
|
|
765
767
|
data
|
|
766
768
|
end
|
|
767
769
|
|
|
768
|
-
#
|
|
769
|
-
#
|
|
770
|
-
# @param
|
|
771
|
-
# @param
|
|
770
|
+
# Start a new conversation (agent stream)
|
|
771
|
+
# Sends a new email from a granted mailbox. Classified stream=agent (isolated reputation, per-key rate caps). The first inbound reply adopts the created thread via the References chain. Idempotency-Key required. Mailboxes with agent_draft_policy=always_approve divert this into a pending draft.
|
|
772
|
+
# @param mailbox [String]
|
|
773
|
+
# @param idempotency_key [String]
|
|
774
|
+
# @param start_conversation_request [StartConversationRequest]
|
|
772
775
|
# @param [Hash] opts the optional parameters
|
|
773
|
-
# @return [Array<(
|
|
774
|
-
def
|
|
776
|
+
# @return [Array<(AgentSendResult, Integer, Hash)>] AgentSendResult data, response status code and response headers
|
|
777
|
+
def start_conversation_with_http_info(mailbox, idempotency_key, start_conversation_request, opts = {})
|
|
775
778
|
if @api_client.config.debugging
|
|
776
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
779
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.start_conversation ...'
|
|
777
780
|
end
|
|
778
|
-
# verify the required parameter '
|
|
779
|
-
if @api_client.config.client_side_validation &&
|
|
780
|
-
fail ArgumentError, "Missing the required parameter '
|
|
781
|
+
# verify the required parameter 'mailbox' is set
|
|
782
|
+
if @api_client.config.client_side_validation && mailbox.nil?
|
|
783
|
+
fail ArgumentError, "Missing the required parameter 'mailbox' when calling AgentsApi.start_conversation"
|
|
781
784
|
end
|
|
782
|
-
# verify the required parameter '
|
|
783
|
-
if @api_client.config.client_side_validation &&
|
|
784
|
-
fail ArgumentError, "Missing the required parameter '
|
|
785
|
+
# verify the required parameter 'idempotency_key' is set
|
|
786
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
787
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling AgentsApi.start_conversation"
|
|
788
|
+
end
|
|
789
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
790
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling AgentsApi.start_conversation, the character length must be smaller than or equal to 255.'
|
|
791
|
+
end
|
|
792
|
+
|
|
793
|
+
# verify the required parameter 'start_conversation_request' is set
|
|
794
|
+
if @api_client.config.client_side_validation && start_conversation_request.nil?
|
|
795
|
+
fail ArgumentError, "Missing the required parameter 'start_conversation_request' when calling AgentsApi.start_conversation"
|
|
785
796
|
end
|
|
786
797
|
# resource path
|
|
787
|
-
local_var_path = '/v1/
|
|
798
|
+
local_var_path = '/v1/inboxes/{mailbox}/messages'.sub('{mailbox}', CGI.escape(mailbox.to_s))
|
|
788
799
|
|
|
789
800
|
# query parameters
|
|
790
801
|
query_params = opts[:query_params] || {}
|
|
@@ -793,21 +804,27 @@ module Lockally
|
|
|
793
804
|
header_params = opts[:header_params] || {}
|
|
794
805
|
# HTTP header 'Accept' (if needed)
|
|
795
806
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
807
|
+
# HTTP header 'Content-Type'
|
|
808
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
809
|
+
if !content_type.nil?
|
|
810
|
+
header_params['Content-Type'] = content_type
|
|
811
|
+
end
|
|
812
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
796
813
|
|
|
797
814
|
# form parameters
|
|
798
815
|
form_params = opts[:form_params] || {}
|
|
799
816
|
|
|
800
817
|
# http body (model)
|
|
801
|
-
post_body = opts[:debug_body]
|
|
818
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(start_conversation_request)
|
|
802
819
|
|
|
803
820
|
# return_type
|
|
804
|
-
return_type = opts[:debug_return_type] || '
|
|
821
|
+
return_type = opts[:debug_return_type] || 'AgentSendResult'
|
|
805
822
|
|
|
806
823
|
# auth_names
|
|
807
824
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
808
825
|
|
|
809
826
|
new_options = opts.merge(
|
|
810
|
-
:operation => :"AgentsApi.
|
|
827
|
+
:operation => :"AgentsApi.start_conversation",
|
|
811
828
|
:header_params => header_params,
|
|
812
829
|
:query_params => query_params,
|
|
813
830
|
:form_params => form_params,
|
|
@@ -818,46 +835,30 @@ module Lockally
|
|
|
818
835
|
|
|
819
836
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
820
837
|
if @api_client.config.debugging
|
|
821
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
838
|
+
@api_client.config.logger.debug "API called: AgentsApi#start_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
822
839
|
end
|
|
823
840
|
return data, status_code, headers
|
|
824
841
|
end
|
|
825
842
|
|
|
826
|
-
#
|
|
827
|
-
#
|
|
828
|
-
# @param thread_id [String]
|
|
829
|
-
# @param idempotency_key [String]
|
|
843
|
+
# Introspect the calling credentials
|
|
844
|
+
# Returns the tenant, auth kind (api_key/session), key label, and granted scopes. The MCP server uses this to scope-filter tool discovery.
|
|
830
845
|
# @param [Hash] opts the optional parameters
|
|
831
|
-
# @return [
|
|
832
|
-
def
|
|
833
|
-
data, _status_code, _headers =
|
|
846
|
+
# @return [Whoami]
|
|
847
|
+
def whoami(opts = {})
|
|
848
|
+
data, _status_code, _headers = whoami_with_http_info(opts)
|
|
834
849
|
data
|
|
835
850
|
end
|
|
836
851
|
|
|
837
|
-
#
|
|
838
|
-
#
|
|
839
|
-
# @param thread_id [String]
|
|
840
|
-
# @param idempotency_key [String]
|
|
852
|
+
# Introspect the calling credentials
|
|
853
|
+
# Returns the tenant, auth kind (api_key/session), key label, and granted scopes. The MCP server uses this to scope-filter tool discovery.
|
|
841
854
|
# @param [Hash] opts the optional parameters
|
|
842
|
-
# @return [Array<(
|
|
843
|
-
def
|
|
855
|
+
# @return [Array<(Whoami, Integer, Hash)>] Whoami data, response status code and response headers
|
|
856
|
+
def whoami_with_http_info(opts = {})
|
|
844
857
|
if @api_client.config.debugging
|
|
845
|
-
@api_client.config.logger.debug 'Calling API: AgentsApi.
|
|
858
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.whoami ...'
|
|
846
859
|
end
|
|
847
|
-
# verify the required parameter 'thread_id' is set
|
|
848
|
-
if @api_client.config.client_side_validation && thread_id.nil?
|
|
849
|
-
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.v1_threads_thread_id_reply_post"
|
|
850
|
-
end
|
|
851
|
-
# verify the required parameter 'idempotency_key' is set
|
|
852
|
-
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
853
|
-
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling AgentsApi.v1_threads_thread_id_reply_post"
|
|
854
|
-
end
|
|
855
|
-
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
856
|
-
fail ArgumentError, 'invalid value for "idempotency_key" when calling AgentsApi.v1_threads_thread_id_reply_post, the character length must be smaller than or equal to 255.'
|
|
857
|
-
end
|
|
858
|
-
|
|
859
860
|
# resource path
|
|
860
|
-
local_var_path = '/v1/
|
|
861
|
+
local_var_path = '/v1/auth/whoami'
|
|
861
862
|
|
|
862
863
|
# query parameters
|
|
863
864
|
query_params = opts[:query_params] || {}
|
|
@@ -866,7 +867,6 @@ module Lockally
|
|
|
866
867
|
header_params = opts[:header_params] || {}
|
|
867
868
|
# HTTP header 'Accept' (if needed)
|
|
868
869
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
869
|
-
header_params[:'Idempotency-Key'] = idempotency_key
|
|
870
870
|
|
|
871
871
|
# form parameters
|
|
872
872
|
form_params = opts[:form_params] || {}
|
|
@@ -875,13 +875,13 @@ module Lockally
|
|
|
875
875
|
post_body = opts[:debug_body]
|
|
876
876
|
|
|
877
877
|
# return_type
|
|
878
|
-
return_type = opts[:debug_return_type] || '
|
|
878
|
+
return_type = opts[:debug_return_type] || 'Whoami'
|
|
879
879
|
|
|
880
880
|
# auth_names
|
|
881
881
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
882
882
|
|
|
883
883
|
new_options = opts.merge(
|
|
884
|
-
:operation => :"AgentsApi.
|
|
884
|
+
:operation => :"AgentsApi.whoami",
|
|
885
885
|
:header_params => header_params,
|
|
886
886
|
:query_params => query_params,
|
|
887
887
|
:form_params => form_params,
|
|
@@ -890,9 +890,9 @@ module Lockally
|
|
|
890
890
|
:return_type => return_type
|
|
891
891
|
)
|
|
892
892
|
|
|
893
|
-
data, status_code, headers = @api_client.call_api(:
|
|
893
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
894
894
|
if @api_client.config.debugging
|
|
895
|
-
@api_client.config.logger.debug "API called: AgentsApi#
|
|
895
|
+
@api_client.config.logger.debug "API called: AgentsApi#whoami\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
896
896
|
end
|
|
897
897
|
return data, status_code, headers
|
|
898
898
|
end
|