lockally 0.2.0 → 0.3.1
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 +148 -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/Annotations.md +22 -0
- data/docs/ApiKeysApi.md +59 -59
- data/docs/Attachment.md +26 -0
- data/docs/Classification.md +24 -0
- 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/InjectionRisk.md +20 -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/PolicyFlags.md +28 -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/annotations.rb +168 -0
- data/lib/lockally/models/attachment.rb +185 -0
- data/lib/lockally/models/classification.rb +211 -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 +411 -0
- data/lib/lockally/models/draft_list.rb +166 -0
- data/lib/lockally/models/draft_result.rb +258 -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/injection_risk.rb +159 -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/policy_flags.rb +197 -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 +165 -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 +183 -0
- data/lib/lockally/models/thread_list.rb +192 -0
- data/lib/lockally/models/thread_message.rb +394 -0
- data/lib/lockally/models/thread_message_body.rb +410 -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 +64 -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/annotations_spec.rb +48 -0
- data/spec/models/attachment_spec.rb +60 -0
- data/spec/models/classification_spec.rb +58 -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/injection_risk_spec.rb +42 -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/policy_flags_spec.rb +66 -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 +258 -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
|
@@ -23,9 +23,9 @@ module Lockally
|
|
|
23
23
|
# Sends the draft exactly as reviewed, through the agent stream (loop detector included). Fires draft.approved.
|
|
24
24
|
# @param draft_id [String]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [
|
|
27
|
-
def
|
|
28
|
-
data, _status_code, _headers =
|
|
26
|
+
# @return [DraftResult]
|
|
27
|
+
def approve_draft(draft_id, opts = {})
|
|
28
|
+
data, _status_code, _headers = approve_draft_with_http_info(draft_id, opts)
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
@@ -33,14 +33,14 @@ module Lockally
|
|
|
33
33
|
# Sends the draft exactly as reviewed, through the agent stream (loop detector included). Fires draft.approved.
|
|
34
34
|
# @param draft_id [String]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(
|
|
37
|
-
def
|
|
36
|
+
# @return [Array<(DraftResult, Integer, Hash)>] DraftResult data, response status code and response headers
|
|
37
|
+
def approve_draft_with_http_info(draft_id, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: DraftsApi.
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: DraftsApi.approve_draft ...'
|
|
40
40
|
end
|
|
41
41
|
# verify the required parameter 'draft_id' is set
|
|
42
42
|
if @api_client.config.client_side_validation && draft_id.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'draft_id' when calling DraftsApi.
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling DraftsApi.approve_draft"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
46
|
local_var_path = '/v1/drafts/{draftID}/approve'.sub('{draftID}', CGI.escape(draft_id.to_s))
|
|
@@ -60,13 +60,13 @@ module Lockally
|
|
|
60
60
|
post_body = opts[:debug_body]
|
|
61
61
|
|
|
62
62
|
# return_type
|
|
63
|
-
return_type = opts[:debug_return_type] || '
|
|
63
|
+
return_type = opts[:debug_return_type] || 'DraftResult'
|
|
64
64
|
|
|
65
65
|
# auth_names
|
|
66
66
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
67
67
|
|
|
68
68
|
new_options = opts.merge(
|
|
69
|
-
:operation => :"DraftsApi.
|
|
69
|
+
:operation => :"DraftsApi.approve_draft",
|
|
70
70
|
:header_params => header_params,
|
|
71
71
|
:query_params => query_params,
|
|
72
72
|
:form_params => form_params,
|
|
@@ -77,7 +77,7 @@ module Lockally
|
|
|
77
77
|
|
|
78
78
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
79
79
|
if @api_client.config.debugging
|
|
80
|
-
@api_client.config.logger.debug "API called: DraftsApi#
|
|
80
|
+
@api_client.config.logger.debug "API called: DraftsApi#approve_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
81
|
end
|
|
82
82
|
return data, status_code, headers
|
|
83
83
|
end
|
|
@@ -86,9 +86,9 @@ module Lockally
|
|
|
86
86
|
# Only the API key that created the draft may cancel it.
|
|
87
87
|
# @param draft_id [String]
|
|
88
88
|
# @param [Hash] opts the optional parameters
|
|
89
|
-
# @return [
|
|
90
|
-
def
|
|
91
|
-
data, _status_code, _headers =
|
|
89
|
+
# @return [Draft]
|
|
90
|
+
def cancel_draft(draft_id, opts = {})
|
|
91
|
+
data, _status_code, _headers = cancel_draft_with_http_info(draft_id, opts)
|
|
92
92
|
data
|
|
93
93
|
end
|
|
94
94
|
|
|
@@ -96,14 +96,14 @@ module Lockally
|
|
|
96
96
|
# Only the API key that created the draft may cancel it.
|
|
97
97
|
# @param draft_id [String]
|
|
98
98
|
# @param [Hash] opts the optional parameters
|
|
99
|
-
# @return [Array<(
|
|
100
|
-
def
|
|
99
|
+
# @return [Array<(Draft, Integer, Hash)>] Draft data, response status code and response headers
|
|
100
|
+
def cancel_draft_with_http_info(draft_id, opts = {})
|
|
101
101
|
if @api_client.config.debugging
|
|
102
|
-
@api_client.config.logger.debug 'Calling API: DraftsApi.
|
|
102
|
+
@api_client.config.logger.debug 'Calling API: DraftsApi.cancel_draft ...'
|
|
103
103
|
end
|
|
104
104
|
# verify the required parameter 'draft_id' is set
|
|
105
105
|
if @api_client.config.client_side_validation && draft_id.nil?
|
|
106
|
-
fail ArgumentError, "Missing the required parameter 'draft_id' when calling DraftsApi.
|
|
106
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling DraftsApi.cancel_draft"
|
|
107
107
|
end
|
|
108
108
|
# resource path
|
|
109
109
|
local_var_path = '/v1/drafts/{draftID}/cancel'.sub('{draftID}', CGI.escape(draft_id.to_s))
|
|
@@ -123,13 +123,13 @@ module Lockally
|
|
|
123
123
|
post_body = opts[:debug_body]
|
|
124
124
|
|
|
125
125
|
# return_type
|
|
126
|
-
return_type = opts[:debug_return_type] || '
|
|
126
|
+
return_type = opts[:debug_return_type] || 'Draft'
|
|
127
127
|
|
|
128
128
|
# auth_names
|
|
129
129
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
130
130
|
|
|
131
131
|
new_options = opts.merge(
|
|
132
|
-
:operation => :"DraftsApi.
|
|
132
|
+
:operation => :"DraftsApi.cancel_draft",
|
|
133
133
|
:header_params => header_params,
|
|
134
134
|
:query_params => query_params,
|
|
135
135
|
:form_params => form_params,
|
|
@@ -140,34 +140,46 @@ module Lockally
|
|
|
140
140
|
|
|
141
141
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
142
142
|
if @api_client.config.debugging
|
|
143
|
-
@api_client.config.logger.debug "API called: DraftsApi#
|
|
143
|
+
@api_client.config.logger.debug "API called: DraftsApi#cancel_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
144
144
|
end
|
|
145
145
|
return data, status_code, headers
|
|
146
146
|
end
|
|
147
147
|
|
|
148
|
-
#
|
|
149
|
-
#
|
|
148
|
+
# Propose a new conversation as a draft
|
|
149
|
+
# New-conversation drafts ALWAYS require human approval (policy flag new_thread). Idempotency-Key required.
|
|
150
|
+
# @param mailbox [String]
|
|
151
|
+
# @param idempotency_key [String]
|
|
150
152
|
# @param [Hash] opts the optional parameters
|
|
151
|
-
# @return [
|
|
152
|
-
def
|
|
153
|
-
data, _status_code, _headers =
|
|
153
|
+
# @return [DraftResult]
|
|
154
|
+
def create_conversation_draft(mailbox, idempotency_key, opts = {})
|
|
155
|
+
data, _status_code, _headers = create_conversation_draft_with_http_info(mailbox, idempotency_key, opts)
|
|
154
156
|
data
|
|
155
157
|
end
|
|
156
158
|
|
|
157
|
-
#
|
|
158
|
-
#
|
|
159
|
+
# Propose a new conversation as a draft
|
|
160
|
+
# New-conversation drafts ALWAYS require human approval (policy flag new_thread). Idempotency-Key required.
|
|
161
|
+
# @param mailbox [String]
|
|
162
|
+
# @param idempotency_key [String]
|
|
159
163
|
# @param [Hash] opts the optional parameters
|
|
160
|
-
# @return [Array<(
|
|
161
|
-
def
|
|
164
|
+
# @return [Array<(DraftResult, Integer, Hash)>] DraftResult data, response status code and response headers
|
|
165
|
+
def create_conversation_draft_with_http_info(mailbox, idempotency_key, opts = {})
|
|
162
166
|
if @api_client.config.debugging
|
|
163
|
-
@api_client.config.logger.debug 'Calling API: DraftsApi.
|
|
167
|
+
@api_client.config.logger.debug 'Calling API: DraftsApi.create_conversation_draft ...'
|
|
164
168
|
end
|
|
165
|
-
# verify the required parameter '
|
|
166
|
-
if @api_client.config.client_side_validation &&
|
|
167
|
-
fail ArgumentError, "Missing the required parameter '
|
|
169
|
+
# verify the required parameter 'mailbox' is set
|
|
170
|
+
if @api_client.config.client_side_validation && mailbox.nil?
|
|
171
|
+
fail ArgumentError, "Missing the required parameter 'mailbox' when calling DraftsApi.create_conversation_draft"
|
|
168
172
|
end
|
|
173
|
+
# verify the required parameter 'idempotency_key' is set
|
|
174
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
175
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling DraftsApi.create_conversation_draft"
|
|
176
|
+
end
|
|
177
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
178
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling DraftsApi.create_conversation_draft, the character length must be smaller than or equal to 255.'
|
|
179
|
+
end
|
|
180
|
+
|
|
169
181
|
# resource path
|
|
170
|
-
local_var_path = '/v1/
|
|
182
|
+
local_var_path = '/v1/inboxes/{mailbox}/drafts'.sub('{mailbox}', CGI.escape(mailbox.to_s))
|
|
171
183
|
|
|
172
184
|
# query parameters
|
|
173
185
|
query_params = opts[:query_params] || {}
|
|
@@ -176,6 +188,7 @@ module Lockally
|
|
|
176
188
|
header_params = opts[:header_params] || {}
|
|
177
189
|
# HTTP header 'Accept' (if needed)
|
|
178
190
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
191
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
179
192
|
|
|
180
193
|
# form parameters
|
|
181
194
|
form_params = opts[:form_params] || {}
|
|
@@ -184,13 +197,13 @@ module Lockally
|
|
|
184
197
|
post_body = opts[:debug_body]
|
|
185
198
|
|
|
186
199
|
# return_type
|
|
187
|
-
return_type = opts[:debug_return_type] || '
|
|
200
|
+
return_type = opts[:debug_return_type] || 'DraftResult'
|
|
188
201
|
|
|
189
202
|
# auth_names
|
|
190
203
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
191
204
|
|
|
192
205
|
new_options = opts.merge(
|
|
193
|
-
:operation => :"DraftsApi.
|
|
206
|
+
:operation => :"DraftsApi.create_conversation_draft",
|
|
194
207
|
:header_params => header_params,
|
|
195
208
|
:query_params => query_params,
|
|
196
209
|
:form_params => form_params,
|
|
@@ -199,38 +212,48 @@ module Lockally
|
|
|
199
212
|
:return_type => return_type
|
|
200
213
|
)
|
|
201
214
|
|
|
202
|
-
data, status_code, headers = @api_client.call_api(:
|
|
215
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
203
216
|
if @api_client.config.debugging
|
|
204
|
-
@api_client.config.logger.debug "API called: DraftsApi#
|
|
217
|
+
@api_client.config.logger.debug "API called: DraftsApi#create_conversation_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
205
218
|
end
|
|
206
219
|
return data, status_code, headers
|
|
207
220
|
end
|
|
208
221
|
|
|
209
|
-
#
|
|
210
|
-
#
|
|
211
|
-
# @param
|
|
222
|
+
# Propose a reply as a draft
|
|
223
|
+
# The safe default over /reply: the deterministic policy engine auto-sends clean in-thread replies and holds anything risky (PII, new recipients, injection-flagged threads, always-approve mailboxes) for human approval. Fires draft.pending_approval when held. Idempotency-Key required.
|
|
224
|
+
# @param thread_id [String]
|
|
225
|
+
# @param idempotency_key [String]
|
|
212
226
|
# @param [Hash] opts the optional parameters
|
|
213
|
-
# @return [
|
|
214
|
-
def
|
|
215
|
-
data, _status_code, _headers =
|
|
227
|
+
# @return [DraftResult]
|
|
228
|
+
def create_reply_draft(thread_id, idempotency_key, opts = {})
|
|
229
|
+
data, _status_code, _headers = create_reply_draft_with_http_info(thread_id, idempotency_key, opts)
|
|
216
230
|
data
|
|
217
231
|
end
|
|
218
232
|
|
|
219
|
-
#
|
|
220
|
-
#
|
|
221
|
-
# @param
|
|
233
|
+
# Propose a reply as a draft
|
|
234
|
+
# The safe default over /reply: the deterministic policy engine auto-sends clean in-thread replies and holds anything risky (PII, new recipients, injection-flagged threads, always-approve mailboxes) for human approval. Fires draft.pending_approval when held. Idempotency-Key required.
|
|
235
|
+
# @param thread_id [String]
|
|
236
|
+
# @param idempotency_key [String]
|
|
222
237
|
# @param [Hash] opts the optional parameters
|
|
223
|
-
# @return [Array<(
|
|
224
|
-
def
|
|
238
|
+
# @return [Array<(DraftResult, Integer, Hash)>] DraftResult data, response status code and response headers
|
|
239
|
+
def create_reply_draft_with_http_info(thread_id, idempotency_key, opts = {})
|
|
225
240
|
if @api_client.config.debugging
|
|
226
|
-
@api_client.config.logger.debug 'Calling API: DraftsApi.
|
|
241
|
+
@api_client.config.logger.debug 'Calling API: DraftsApi.create_reply_draft ...'
|
|
227
242
|
end
|
|
228
|
-
# verify the required parameter '
|
|
229
|
-
if @api_client.config.client_side_validation &&
|
|
230
|
-
fail ArgumentError, "Missing the required parameter '
|
|
243
|
+
# verify the required parameter 'thread_id' is set
|
|
244
|
+
if @api_client.config.client_side_validation && thread_id.nil?
|
|
245
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling DraftsApi.create_reply_draft"
|
|
246
|
+
end
|
|
247
|
+
# verify the required parameter 'idempotency_key' is set
|
|
248
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
249
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling DraftsApi.create_reply_draft"
|
|
250
|
+
end
|
|
251
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
252
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling DraftsApi.create_reply_draft, the character length must be smaller than or equal to 255.'
|
|
231
253
|
end
|
|
254
|
+
|
|
232
255
|
# resource path
|
|
233
|
-
local_var_path = '/v1/
|
|
256
|
+
local_var_path = '/v1/threads/{threadID}/drafts'.sub('{threadID}', CGI.escape(thread_id.to_s))
|
|
234
257
|
|
|
235
258
|
# query parameters
|
|
236
259
|
query_params = opts[:query_params] || {}
|
|
@@ -239,6 +262,7 @@ module Lockally
|
|
|
239
262
|
header_params = opts[:header_params] || {}
|
|
240
263
|
# HTTP header 'Accept' (if needed)
|
|
241
264
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
265
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
242
266
|
|
|
243
267
|
# form parameters
|
|
244
268
|
form_params = opts[:form_params] || {}
|
|
@@ -247,13 +271,13 @@ module Lockally
|
|
|
247
271
|
post_body = opts[:debug_body]
|
|
248
272
|
|
|
249
273
|
# return_type
|
|
250
|
-
return_type = opts[:debug_return_type] || '
|
|
274
|
+
return_type = opts[:debug_return_type] || 'DraftResult'
|
|
251
275
|
|
|
252
276
|
# auth_names
|
|
253
277
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
254
278
|
|
|
255
279
|
new_options = opts.merge(
|
|
256
|
-
:operation => :"DraftsApi.
|
|
280
|
+
:operation => :"DraftsApi.create_reply_draft",
|
|
257
281
|
:header_params => header_params,
|
|
258
282
|
:query_params => query_params,
|
|
259
283
|
:form_params => form_params,
|
|
@@ -264,43 +288,37 @@ module Lockally
|
|
|
264
288
|
|
|
265
289
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
266
290
|
if @api_client.config.debugging
|
|
267
|
-
@api_client.config.logger.debug "API called: DraftsApi#
|
|
291
|
+
@api_client.config.logger.debug "API called: DraftsApi#create_reply_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
268
292
|
end
|
|
269
293
|
return data, status_code, headers
|
|
270
294
|
end
|
|
271
295
|
|
|
272
|
-
#
|
|
273
|
-
#
|
|
296
|
+
# Get a draft
|
|
297
|
+
# @param draft_id [String]
|
|
274
298
|
# @param [Hash] opts the optional parameters
|
|
275
|
-
# @
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
def v1_drafts_get(opts = {})
|
|
279
|
-
data, _status_code, _headers = v1_drafts_get_with_http_info(opts)
|
|
299
|
+
# @return [Draft]
|
|
300
|
+
def get_draft(draft_id, opts = {})
|
|
301
|
+
data, _status_code, _headers = get_draft_with_http_info(draft_id, opts)
|
|
280
302
|
data
|
|
281
303
|
end
|
|
282
304
|
|
|
283
|
-
#
|
|
284
|
-
#
|
|
305
|
+
# Get a draft
|
|
306
|
+
# @param draft_id [String]
|
|
285
307
|
# @param [Hash] opts the optional parameters
|
|
286
|
-
# @
|
|
287
|
-
|
|
288
|
-
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
289
|
-
def v1_drafts_get_with_http_info(opts = {})
|
|
308
|
+
# @return [Array<(Draft, Integer, Hash)>] Draft data, response status code and response headers
|
|
309
|
+
def get_draft_with_http_info(draft_id, opts = {})
|
|
290
310
|
if @api_client.config.debugging
|
|
291
|
-
@api_client.config.logger.debug 'Calling API: DraftsApi.
|
|
311
|
+
@api_client.config.logger.debug 'Calling API: DraftsApi.get_draft ...'
|
|
292
312
|
end
|
|
293
|
-
|
|
294
|
-
|
|
313
|
+
# verify the required parameter 'draft_id' is set
|
|
314
|
+
if @api_client.config.client_side_validation && draft_id.nil?
|
|
315
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling DraftsApi.get_draft"
|
|
295
316
|
end
|
|
296
|
-
|
|
297
317
|
# resource path
|
|
298
|
-
local_var_path = '/v1/drafts'
|
|
318
|
+
local_var_path = '/v1/drafts/{draftID}'.sub('{draftID}', CGI.escape(draft_id.to_s))
|
|
299
319
|
|
|
300
320
|
# query parameters
|
|
301
321
|
query_params = opts[:query_params] || {}
|
|
302
|
-
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
303
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
304
322
|
|
|
305
323
|
# header parameters
|
|
306
324
|
header_params = opts[:header_params] || {}
|
|
@@ -314,13 +332,13 @@ module Lockally
|
|
|
314
332
|
post_body = opts[:debug_body]
|
|
315
333
|
|
|
316
334
|
# return_type
|
|
317
|
-
return_type = opts[:debug_return_type] || '
|
|
335
|
+
return_type = opts[:debug_return_type] || 'Draft'
|
|
318
336
|
|
|
319
337
|
# auth_names
|
|
320
338
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
321
339
|
|
|
322
340
|
new_options = opts.merge(
|
|
323
|
-
:operation => :"DraftsApi.
|
|
341
|
+
:operation => :"DraftsApi.get_draft",
|
|
324
342
|
:header_params => header_params,
|
|
325
343
|
:query_params => query_params,
|
|
326
344
|
:form_params => form_params,
|
|
@@ -331,55 +349,48 @@ module Lockally
|
|
|
331
349
|
|
|
332
350
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
333
351
|
if @api_client.config.debugging
|
|
334
|
-
@api_client.config.logger.debug "API called: DraftsApi#
|
|
352
|
+
@api_client.config.logger.debug "API called: DraftsApi#get_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
335
353
|
end
|
|
336
354
|
return data, status_code, headers
|
|
337
355
|
end
|
|
338
356
|
|
|
339
|
-
#
|
|
340
|
-
#
|
|
341
|
-
# @param mailbox [String]
|
|
342
|
-
# @param idempotency_key [String]
|
|
357
|
+
# List drafts
|
|
358
|
+
# Filter with ?status=pending_approval|sent|rejected|cancelled. Keys see drafts of granted mailboxes; admin sessions see all.
|
|
343
359
|
# @param [Hash] opts the optional parameters
|
|
344
|
-
# @
|
|
345
|
-
|
|
346
|
-
|
|
360
|
+
# @option opts [String] :status
|
|
361
|
+
# @option opts [Integer] :limit (default to 50)
|
|
362
|
+
# @return [DraftList]
|
|
363
|
+
def list_drafts(opts = {})
|
|
364
|
+
data, _status_code, _headers = list_drafts_with_http_info(opts)
|
|
347
365
|
data
|
|
348
366
|
end
|
|
349
367
|
|
|
350
|
-
#
|
|
351
|
-
#
|
|
352
|
-
# @param mailbox [String]
|
|
353
|
-
# @param idempotency_key [String]
|
|
368
|
+
# List drafts
|
|
369
|
+
# Filter with ?status=pending_approval|sent|rejected|cancelled. Keys see drafts of granted mailboxes; admin sessions see all.
|
|
354
370
|
# @param [Hash] opts the optional parameters
|
|
355
|
-
# @
|
|
356
|
-
|
|
371
|
+
# @option opts [String] :status
|
|
372
|
+
# @option opts [Integer] :limit (default to 50)
|
|
373
|
+
# @return [Array<(DraftList, Integer, Hash)>] DraftList data, response status code and response headers
|
|
374
|
+
def list_drafts_with_http_info(opts = {})
|
|
357
375
|
if @api_client.config.debugging
|
|
358
|
-
@api_client.config.logger.debug 'Calling API: DraftsApi.
|
|
359
|
-
end
|
|
360
|
-
# verify the required parameter 'mailbox' is set
|
|
361
|
-
if @api_client.config.client_side_validation && mailbox.nil?
|
|
362
|
-
fail ArgumentError, "Missing the required parameter 'mailbox' when calling DraftsApi.v1_inboxes_mailbox_drafts_post"
|
|
363
|
-
end
|
|
364
|
-
# verify the required parameter 'idempotency_key' is set
|
|
365
|
-
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
366
|
-
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling DraftsApi.v1_inboxes_mailbox_drafts_post"
|
|
376
|
+
@api_client.config.logger.debug 'Calling API: DraftsApi.list_drafts ...'
|
|
367
377
|
end
|
|
368
|
-
if @api_client.config.client_side_validation &&
|
|
369
|
-
fail ArgumentError, 'invalid value for "
|
|
378
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
379
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DraftsApi.list_drafts, must be smaller than or equal to 200.'
|
|
370
380
|
end
|
|
371
381
|
|
|
372
382
|
# resource path
|
|
373
|
-
local_var_path = '/v1/
|
|
383
|
+
local_var_path = '/v1/drafts'
|
|
374
384
|
|
|
375
385
|
# query parameters
|
|
376
386
|
query_params = opts[:query_params] || {}
|
|
387
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
388
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
377
389
|
|
|
378
390
|
# header parameters
|
|
379
391
|
header_params = opts[:header_params] || {}
|
|
380
392
|
# HTTP header 'Accept' (if needed)
|
|
381
393
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
382
|
-
header_params[:'Idempotency-Key'] = idempotency_key
|
|
383
394
|
|
|
384
395
|
# form parameters
|
|
385
396
|
form_params = opts[:form_params] || {}
|
|
@@ -388,13 +399,13 @@ module Lockally
|
|
|
388
399
|
post_body = opts[:debug_body]
|
|
389
400
|
|
|
390
401
|
# return_type
|
|
391
|
-
return_type = opts[:debug_return_type] || '
|
|
402
|
+
return_type = opts[:debug_return_type] || 'DraftList'
|
|
392
403
|
|
|
393
404
|
# auth_names
|
|
394
405
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
395
406
|
|
|
396
407
|
new_options = opts.merge(
|
|
397
|
-
:operation => :"DraftsApi.
|
|
408
|
+
:operation => :"DraftsApi.list_drafts",
|
|
398
409
|
:header_params => header_params,
|
|
399
410
|
:query_params => query_params,
|
|
400
411
|
:form_params => form_params,
|
|
@@ -403,48 +414,38 @@ module Lockally
|
|
|
403
414
|
:return_type => return_type
|
|
404
415
|
)
|
|
405
416
|
|
|
406
|
-
data, status_code, headers = @api_client.call_api(:
|
|
417
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
407
418
|
if @api_client.config.debugging
|
|
408
|
-
@api_client.config.logger.debug "API called: DraftsApi#
|
|
419
|
+
@api_client.config.logger.debug "API called: DraftsApi#list_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
409
420
|
end
|
|
410
421
|
return data, status_code, headers
|
|
411
422
|
end
|
|
412
423
|
|
|
413
|
-
#
|
|
414
|
-
#
|
|
415
|
-
# @param
|
|
416
|
-
# @param idempotency_key [String]
|
|
424
|
+
# Reject a pending draft (human)
|
|
425
|
+
# Body: {\"reason\": \"...\"} (optional). Fires draft.rejected.
|
|
426
|
+
# @param draft_id [String]
|
|
417
427
|
# @param [Hash] opts the optional parameters
|
|
418
|
-
# @return [
|
|
419
|
-
def
|
|
420
|
-
data, _status_code, _headers =
|
|
428
|
+
# @return [Draft]
|
|
429
|
+
def reject_draft(draft_id, opts = {})
|
|
430
|
+
data, _status_code, _headers = reject_draft_with_http_info(draft_id, opts)
|
|
421
431
|
data
|
|
422
432
|
end
|
|
423
433
|
|
|
424
|
-
#
|
|
425
|
-
#
|
|
426
|
-
# @param
|
|
427
|
-
# @param idempotency_key [String]
|
|
434
|
+
# Reject a pending draft (human)
|
|
435
|
+
# Body: {\"reason\": \"...\"} (optional). Fires draft.rejected.
|
|
436
|
+
# @param draft_id [String]
|
|
428
437
|
# @param [Hash] opts the optional parameters
|
|
429
|
-
# @return [Array<(
|
|
430
|
-
def
|
|
438
|
+
# @return [Array<(Draft, Integer, Hash)>] Draft data, response status code and response headers
|
|
439
|
+
def reject_draft_with_http_info(draft_id, opts = {})
|
|
431
440
|
if @api_client.config.debugging
|
|
432
|
-
@api_client.config.logger.debug 'Calling API: DraftsApi.
|
|
433
|
-
end
|
|
434
|
-
# verify the required parameter 'thread_id' is set
|
|
435
|
-
if @api_client.config.client_side_validation && thread_id.nil?
|
|
436
|
-
fail ArgumentError, "Missing the required parameter 'thread_id' when calling DraftsApi.v1_threads_thread_id_drafts_post"
|
|
437
|
-
end
|
|
438
|
-
# verify the required parameter 'idempotency_key' is set
|
|
439
|
-
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
440
|
-
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling DraftsApi.v1_threads_thread_id_drafts_post"
|
|
441
|
+
@api_client.config.logger.debug 'Calling API: DraftsApi.reject_draft ...'
|
|
441
442
|
end
|
|
442
|
-
|
|
443
|
-
|
|
443
|
+
# verify the required parameter 'draft_id' is set
|
|
444
|
+
if @api_client.config.client_side_validation && draft_id.nil?
|
|
445
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling DraftsApi.reject_draft"
|
|
444
446
|
end
|
|
445
|
-
|
|
446
447
|
# resource path
|
|
447
|
-
local_var_path = '/v1/
|
|
448
|
+
local_var_path = '/v1/drafts/{draftID}/reject'.sub('{draftID}', CGI.escape(draft_id.to_s))
|
|
448
449
|
|
|
449
450
|
# query parameters
|
|
450
451
|
query_params = opts[:query_params] || {}
|
|
@@ -453,7 +454,6 @@ module Lockally
|
|
|
453
454
|
header_params = opts[:header_params] || {}
|
|
454
455
|
# HTTP header 'Accept' (if needed)
|
|
455
456
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
456
|
-
header_params[:'Idempotency-Key'] = idempotency_key
|
|
457
457
|
|
|
458
458
|
# form parameters
|
|
459
459
|
form_params = opts[:form_params] || {}
|
|
@@ -462,13 +462,13 @@ module Lockally
|
|
|
462
462
|
post_body = opts[:debug_body]
|
|
463
463
|
|
|
464
464
|
# return_type
|
|
465
|
-
return_type = opts[:debug_return_type] || '
|
|
465
|
+
return_type = opts[:debug_return_type] || 'Draft'
|
|
466
466
|
|
|
467
467
|
# auth_names
|
|
468
468
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
469
469
|
|
|
470
470
|
new_options = opts.merge(
|
|
471
|
-
:operation => :"DraftsApi.
|
|
471
|
+
:operation => :"DraftsApi.reject_draft",
|
|
472
472
|
:header_params => header_params,
|
|
473
473
|
:query_params => query_params,
|
|
474
474
|
:form_params => form_params,
|
|
@@ -479,7 +479,7 @@ module Lockally
|
|
|
479
479
|
|
|
480
480
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
481
481
|
if @api_client.config.debugging
|
|
482
|
-
@api_client.config.logger.debug "API called: DraftsApi#
|
|
482
|
+
@api_client.config.logger.debug "API called: DraftsApi#reject_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
483
483
|
end
|
|
484
484
|
return data, status_code, headers
|
|
485
485
|
end
|
|
@@ -22,19 +22,19 @@ module Lockally
|
|
|
22
22
|
# Liveness check
|
|
23
23
|
# Returns 200 if the process is up and the database pings cleanly. No authentication required.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [
|
|
26
|
-
def
|
|
27
|
-
data, _status_code, _headers =
|
|
25
|
+
# @return [HealthCheck200Response]
|
|
26
|
+
def health_check(opts = {})
|
|
27
|
+
data, _status_code, _headers = health_check_with_http_info(opts)
|
|
28
28
|
data
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Liveness check
|
|
32
32
|
# Returns 200 if the process is up and the database pings cleanly. No authentication required.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(
|
|
35
|
-
def
|
|
34
|
+
# @return [Array<(HealthCheck200Response, Integer, Hash)>] HealthCheck200Response data, response status code and response headers
|
|
35
|
+
def health_check_with_http_info(opts = {})
|
|
36
36
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: HealthApi.
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: HealthApi.health_check ...'
|
|
38
38
|
end
|
|
39
39
|
# resource path
|
|
40
40
|
local_var_path = '/healthz'
|
|
@@ -54,13 +54,13 @@ module Lockally
|
|
|
54
54
|
post_body = opts[:debug_body]
|
|
55
55
|
|
|
56
56
|
# return_type
|
|
57
|
-
return_type = opts[:debug_return_type] || '
|
|
57
|
+
return_type = opts[:debug_return_type] || 'HealthCheck200Response'
|
|
58
58
|
|
|
59
59
|
# auth_names
|
|
60
60
|
auth_names = opts[:debug_auth_names] || []
|
|
61
61
|
|
|
62
62
|
new_options = opts.merge(
|
|
63
|
-
:operation => :"HealthApi.
|
|
63
|
+
:operation => :"HealthApi.health_check",
|
|
64
64
|
:header_params => header_params,
|
|
65
65
|
:query_params => query_params,
|
|
66
66
|
:form_params => form_params,
|
|
@@ -71,7 +71,7 @@ module Lockally
|
|
|
71
71
|
|
|
72
72
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
73
|
if @api_client.config.debugging
|
|
74
|
-
@api_client.config.logger.debug "API called: HealthApi#
|
|
74
|
+
@api_client.config.logger.debug "API called: HealthApi#health_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
75
|
end
|
|
76
76
|
return data, status_code, headers
|
|
77
77
|
end
|