tungo-sdk 0.2.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 +7 -0
- data/CHANGELOG.md +34 -0
- data/LICENSE +21 -0
- data/README.md +316 -0
- data/SECURITY.md +19 -0
- data/lib/tungo/api_response.rb +52 -0
- data/lib/tungo/client.rb +426 -0
- data/lib/tungo/contract.rb +37 -0
- data/lib/tungo/errors.rb +266 -0
- data/lib/tungo/helpers.rb +146 -0
- data/lib/tungo/internal/model.rb +432 -0
- data/lib/tungo/internal/sse.rb +122 -0
- data/lib/tungo/internal/util.rb +223 -0
- data/lib/tungo/models/api_key.rb +132 -0
- data/lib/tungo/models/api_key_create.rb +75 -0
- data/lib/tungo/models/api_key_create_write_kind_item.rb +26 -0
- data/lib/tungo/models/api_key_created.rb +154 -0
- data/lib/tungo/models/api_key_created_permission_item.rb +22 -0
- data/lib/tungo/models/api_key_created_status.rb +21 -0
- data/lib/tungo/models/api_key_details.rb +139 -0
- data/lib/tungo/models/api_key_details_blocked_reason.rb +27 -0
- data/lib/tungo/models/api_key_details_permission_item.rb +22 -0
- data/lib/tungo/models/api_key_details_status.rb +21 -0
- data/lib/tungo/models/api_key_month.rb +28 -0
- data/lib/tungo/models/api_key_patch.rb +78 -0
- data/lib/tungo/models/api_key_patch_write_kind_item.rb +26 -0
- data/lib/tungo/models/api_key_permission_item.rb +22 -0
- data/lib/tungo/models/api_key_person.rb +25 -0
- data/lib/tungo/models/api_key_roll.rb +16 -0
- data/lib/tungo/models/api_key_rolled.rb +147 -0
- data/lib/tungo/models/api_key_rolled_permission_item.rb +22 -0
- data/lib/tungo/models/api_key_rolled_status.rb +21 -0
- data/lib/tungo/models/api_key_self.rb +154 -0
- data/lib/tungo/models/api_key_self_blocked_reason.rb +27 -0
- data/lib/tungo/models/api_key_self_permission_item.rb +22 -0
- data/lib/tungo/models/api_key_self_rate_limit.rb +26 -0
- data/lib/tungo/models/api_key_self_status.rb +21 -0
- data/lib/tungo/models/api_key_self_workspace.rb +25 -0
- data/lib/tungo/models/api_key_self_workspace_kind.rb +18 -0
- data/lib/tungo/models/api_key_status.rb +21 -0
- data/lib/tungo/models/api_key_transfer.rb +16 -0
- data/lib/tungo/models/api_key_updated.rb +139 -0
- data/lib/tungo/models/api_key_updated_permission_item.rb +22 -0
- data/lib/tungo/models/api_key_updated_status.rb +21 -0
- data/lib/tungo/models/api_key_usage.rb +49 -0
- data/lib/tungo/models/api_key_usage_by_company_item.rb +25 -0
- data/lib/tungo/models/api_key_usage_by_day_item.rb +25 -0
- data/lib/tungo/models/api_key_usage_by_model_item.rb +25 -0
- data/lib/tungo/models/api_key_usage_totals.rb +40 -0
- data/lib/tungo/models/api_key_warning.rb +22 -0
- data/lib/tungo/models/api_key_warning_code.rb +21 -0
- data/lib/tungo/models/approve_batch_company_proposals_response.rb +20 -0
- data/lib/tungo/models/approve_error.rb +25 -0
- data/lib/tungo/models/approve_error_error.rb +96 -0
- data/lib/tungo/models/approve_request.rb +26 -0
- data/lib/tungo/models/audit_entry.rb +64 -0
- data/lib/tungo/models/audit_entry_action.rb +148 -0
- data/lib/tungo/models/audit_entry_actor.rb +26 -0
- data/lib/tungo/models/audit_entry_actor_type.rb +18 -0
- data/lib/tungo/models/audit_entry_target.rb +20 -0
- data/lib/tungo/models/automation_auto_approve.rb +40 -0
- data/lib/tungo/models/automation_auto_approve_kind_item.rb +25 -0
- data/lib/tungo/models/automation_deleted.rb +20 -0
- data/lib/tungo/models/automation_event_filter.rb +16 -0
- data/lib/tungo/models/automation_filter_condition.rb +30 -0
- data/lib/tungo/models/automation_filter_condition_op.rb +26 -0
- data/lib/tungo/models/automation_filter_condition_value.rb +23 -0
- data/lib/tungo/models/automation_filter_condition_value_option4_item.rb +20 -0
- data/lib/tungo/models/automation_hook.rb +65 -0
- data/lib/tungo/models/automation_hook_accepted.rb +34 -0
- data/lib/tungo/models/automation_hook_create.rb +38 -0
- data/lib/tungo/models/automation_hook_event.rb +64 -0
- data/lib/tungo/models/automation_hook_event_encoding.rb +17 -0
- data/lib/tungo/models/automation_hook_event_source.rb +17 -0
- data/lib/tungo/models/automation_hook_patch.rb +44 -0
- data/lib/tungo/models/automation_hook_test_input.rb +30 -0
- data/lib/tungo/models/automation_hook_test_result.rb +63 -0
- data/lib/tungo/models/automation_hook_test_result_external_id_source.rb +20 -0
- data/lib/tungo/models/automation_hook_test_scenario.rb +46 -0
- data/lib/tungo/models/automation_hook_test_scenario_failed_condition.rb +26 -0
- data/lib/tungo/models/automation_hook_with_token.rb +85 -0
- data/lib/tungo/models/automation_manual_run.rb +189 -0
- data/lib/tungo/models/automation_manual_run_output_error.rb +18 -0
- data/lib/tungo/models/automation_manual_run_output_value.rb +20 -0
- data/lib/tungo/models/automation_manual_run_state.rb +23 -0
- data/lib/tungo/models/automation_manual_run_trigger.rb +22 -0
- data/lib/tungo/models/automation_output_field.rb +31 -0
- data/lib/tungo/models/automation_output_field_option1.rb +20 -0
- data/lib/tungo/models/automation_output_field_option2.rb +20 -0
- data/lib/tungo/models/automation_output_field_option3.rb +20 -0
- data/lib/tungo/models/automation_output_field_option4.rb +20 -0
- data/lib/tungo/models/automation_output_field_option5.rb +25 -0
- data/lib/tungo/models/automation_output_spec.rb +16 -0
- data/lib/tungo/models/automation_run.rb +183 -0
- data/lib/tungo/models/automation_run_detail.rb +189 -0
- data/lib/tungo/models/automation_run_detail_output_error.rb +18 -0
- data/lib/tungo/models/automation_run_detail_output_value.rb +20 -0
- data/lib/tungo/models/automation_run_detail_state.rb +23 -0
- data/lib/tungo/models/automation_run_detail_trigger.rb +22 -0
- data/lib/tungo/models/automation_run_output_error.rb +18 -0
- data/lib/tungo/models/automation_run_output_value.rb +20 -0
- data/lib/tungo/models/automation_run_proposal.rb +52 -0
- data/lib/tungo/models/automation_run_proposal_auto.rb +21 -0
- data/lib/tungo/models/automation_run_proposal_code.rb +23 -0
- data/lib/tungo/models/automation_run_proposal_status.rb +59 -0
- data/lib/tungo/models/automation_run_proposal_status_auto.rb +21 -0
- data/lib/tungo/models/automation_run_proposal_status_code.rb +23 -0
- data/lib/tungo/models/automation_run_state.rb +23 -0
- data/lib/tungo/models/automation_run_step.rb +79 -0
- data/lib/tungo/models/automation_run_step_action.rb +20 -0
- data/lib/tungo/models/automation_run_step_output_error.rb +17 -0
- data/lib/tungo/models/automation_run_step_output_value.rb +20 -0
- data/lib/tungo/models/automation_run_step_skipped_by.rb +19 -0
- data/lib/tungo/models/automation_run_step_state.rb +22 -0
- data/lib/tungo/models/automation_run_trigger.rb +22 -0
- data/lib/tungo/models/automation_scenario.rb +82 -0
- data/lib/tungo/models/automation_scenario_action.rb +20 -0
- data/lib/tungo/models/automation_scenario_enabled.rb +16 -0
- data/lib/tungo/models/automation_scenario_input.rb +62 -0
- data/lib/tungo/models/automation_scenario_input_action.rb +20 -0
- data/lib/tungo/models/automation_scenario_input_auto_approve.rb +40 -0
- data/lib/tungo/models/automation_scenario_input_auto_approve_kind_item.rb +25 -0
- data/lib/tungo/models/automation_scenario_input_trigger.rb +30 -0
- data/lib/tungo/models/automation_scenario_input_trigger_option1.rb +24 -0
- data/lib/tungo/models/automation_scenario_input_trigger_option2.rb +19 -0
- data/lib/tungo/models/automation_scenario_input_trigger_option3.rb +26 -0
- data/lib/tungo/models/automation_scenario_input_trigger_option3_event.rb +26 -0
- data/lib/tungo/models/automation_scenario_input_trigger_option4.rb +15 -0
- data/lib/tungo/models/automation_scenario_run_input.rb +17 -0
- data/lib/tungo/models/automation_scenario_saved.rb +89 -0
- data/lib/tungo/models/automation_scenario_saved_action.rb +20 -0
- data/lib/tungo/models/automation_scenario_step.rb +32 -0
- data/lib/tungo/models/automation_scenario_step_action.rb +20 -0
- data/lib/tungo/models/automation_scenario_step_when.rb +19 -0
- data/lib/tungo/models/automation_schedule.rb +30 -0
- data/lib/tungo/models/automation_schedule_daily.rb +21 -0
- data/lib/tungo/models/automation_schedule_interval.rb +36 -0
- data/lib/tungo/models/automation_schedule_monthly.rb +40 -0
- data/lib/tungo/models/automation_schedule_weekly.rb +27 -0
- data/lib/tungo/models/automation_state.rb +36 -0
- data/lib/tungo/models/automation_state_input.rb +22 -0
- data/lib/tungo/models/automation_step.rb +34 -0
- data/lib/tungo/models/automation_step_action.rb +21 -0
- data/lib/tungo/models/automation_step_when.rb +21 -0
- data/lib/tungo/models/automation_trigger.rb +29 -0
- data/lib/tungo/models/automation_trigger_event.rb +27 -0
- data/lib/tungo/models/automation_trigger_event_event.rb +26 -0
- data/lib/tungo/models/automation_trigger_hook.rb +24 -0
- data/lib/tungo/models/automation_trigger_manual.rb +15 -0
- data/lib/tungo/models/automation_trigger_schedule.rb +24 -0
- data/lib/tungo/models/autonomy_level.rb +24 -0
- data/lib/tungo/models/bank_statement_job_request.rb +32 -0
- data/lib/tungo/models/batch_approve_job.rb +71 -0
- data/lib/tungo/models/batch_approve_job_kind.rb +21 -0
- data/lib/tungo/models/batch_approve_request.rb +47 -0
- data/lib/tungo/models/batch_approve_response.rb +72 -0
- data/lib/tungo/models/batch_approve_response_stopped.rb +21 -0
- data/lib/tungo/models/batch_approve_result.rb +54 -0
- data/lib/tungo/models/batch_approve_result_outcome.rb +30 -0
- data/lib/tungo/models/batch_job.rb +56 -0
- data/lib/tungo/models/batch_job_kind.rb +21 -0
- data/lib/tungo/models/batch_job_list.rb +22 -0
- data/lib/tungo/models/batch_job_report.rb +78 -0
- data/lib/tungo/models/batch_job_report_gateway.rb +20 -0
- data/lib/tungo/models/batch_job_row.rb +56 -0
- data/lib/tungo/models/batch_job_row_status.rb +21 -0
- data/lib/tungo/models/batch_manual_row.rb +30 -0
- data/lib/tungo/models/batch_row_question.rb +25 -0
- data/lib/tungo/models/batch_row_question_option_item.rb +20 -0
- data/lib/tungo/models/batch_stop_result.rb +20 -0
- data/lib/tungo/models/batch_summary.rb +65 -0
- data/lib/tungo/models/batch_summary_approve.rb +25 -0
- data/lib/tungo/models/batch_summary_approve_body.rb +20 -0
- data/lib/tungo/models/batch_summary_kind.rb +19 -0
- data/lib/tungo/models/batch_summary_proposal.rb +56 -0
- data/lib/tungo/models/batch_summary_proposal_outcome.rb +23 -0
- data/lib/tungo/models/batch_summary_totals.rb +63 -0
- data/lib/tungo/models/card_session.rb +29 -0
- data/lib/tungo/models/chat_answer_request.rb +25 -0
- data/lib/tungo/models/chat_assistant_message.rb +51 -0
- data/lib/tungo/models/chat_assistant_message_state.rb +18 -0
- data/lib/tungo/models/chat_attachment.rb +25 -0
- data/lib/tungo/models/chat_attachment_meta.rb +25 -0
- data/lib/tungo/models/chat_choice_answer.rb +21 -0
- data/lib/tungo/models/chat_choice_option.rb +25 -0
- data/lib/tungo/models/chat_choice_question.rb +30 -0
- data/lib/tungo/models/chat_citation.rb +30 -0
- data/lib/tungo/models/chat_dialog.rb +72 -0
- data/lib/tungo/models/chat_dialog_closed.rb +20 -0
- data/lib/tungo/models/chat_dialog_deleted.rb +21 -0
- data/lib/tungo/models/chat_dialog_list.rb +22 -0
- data/lib/tungo/models/chat_dialog_patch.rb +15 -0
- data/lib/tungo/models/chat_dialog_renamed.rb +21 -0
- data/lib/tungo/models/chat_dialog_summary.rb +37 -0
- data/lib/tungo/models/chat_event.rb +49 -0
- data/lib/tungo/models/chat_event_batch.rb +46 -0
- data/lib/tungo/models/chat_event_batch_outcome.rb +21 -0
- data/lib/tungo/models/chat_event_batch_report.rb +24 -0
- data/lib/tungo/models/chat_event_batch_stage.rb +18 -0
- data/lib/tungo/models/chat_event_choice.rb +26 -0
- data/lib/tungo/models/chat_event_citation.rb +35 -0
- data/lib/tungo/models/chat_event_done.rb +42 -0
- data/lib/tungo/models/chat_event_error.rb +24 -0
- data/lib/tungo/models/chat_event_progress.rb +26 -0
- data/lib/tungo/models/chat_event_proposal.rb +24 -0
- data/lib/tungo/models/chat_event_question.rb +25 -0
- data/lib/tungo/models/chat_event_status.rb +27 -0
- data/lib/tungo/models/chat_event_status_code.rb +20 -0
- data/lib/tungo/models/chat_event_text.rb +26 -0
- data/lib/tungo/models/chat_event_thinking.rb +20 -0
- data/lib/tungo/models/chat_event_tool.rb +35 -0
- data/lib/tungo/models/chat_event_tool_status.rb +18 -0
- data/lib/tungo/models/chat_history_block.rb +32 -0
- data/lib/tungo/models/chat_history_error.rb +27 -0
- data/lib/tungo/models/chat_history_error_code.rb +32 -0
- data/lib/tungo/models/chat_history_proposal.rb +20 -0
- data/lib/tungo/models/chat_history_question.rb +25 -0
- data/lib/tungo/models/chat_history_text.rb +20 -0
- data/lib/tungo/models/chat_history_tool.rb +35 -0
- data/lib/tungo/models/chat_history_tool_status.rb +17 -0
- data/lib/tungo/models/chat_message.rb +25 -0
- data/lib/tungo/models/chat_message_request.rb +64 -0
- data/lib/tungo/models/chat_message_request_mode.rb +19 -0
- data/lib/tungo/models/chat_pending_question.rb +20 -0
- data/lib/tungo/models/chat_question.rb +20 -0
- data/lib/tungo/models/chat_stop_result.rb +26 -0
- data/lib/tungo/models/chat_token_count.rb +35 -0
- data/lib/tungo/models/chat_token_count_request.rb +32 -0
- data/lib/tungo/models/chat_token_count_request_mode.rb +18 -0
- data/lib/tungo/models/chat_turn_error.rb +41 -0
- data/lib/tungo/models/chat_turn_error_code.rb +32 -0
- data/lib/tungo/models/chat_turn_error_limit_kind.rb +17 -0
- data/lib/tungo/models/chat_turn_proposal.rb +19 -0
- data/lib/tungo/models/chat_turn_result.rb +61 -0
- data/lib/tungo/models/chat_turn_usage.rb +36 -0
- data/lib/tungo/models/chat_usage.rb +31 -0
- data/lib/tungo/models/chat_user_message.rb +41 -0
- data/lib/tungo/models/company.rb +61 -0
- data/lib/tungo/models/company_autonomy.rb +43 -0
- data/lib/tungo/models/company_autonomy_custom.rb +20 -0
- data/lib/tungo/models/company_autonomy_defaults.rb +20 -0
- data/lib/tungo/models/company_autonomy_input.rb +29 -0
- data/lib/tungo/models/company_autonomy_input_levels.rb +72 -0
- data/lib/tungo/models/company_autonomy_input_levels_advance_report.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_bank_payment.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_bank_receipt.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_cash_order_in.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_cash_order_out.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_contract.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_counterparty.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_inventory_writeoff.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_purchase.rb +19 -0
- data/lib/tungo/models/company_autonomy_input_levels_sale.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels.rb +71 -0
- data/lib/tungo/models/company_autonomy_levels_advance_report.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_bank_payment.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_bank_receipt.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_cash_order_in.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_cash_order_out.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_contract.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_counterparty.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_inventory_writeoff.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_purchase.rb +19 -0
- data/lib/tungo/models/company_autonomy_levels_sale.rb +19 -0
- data/lib/tungo/models/company_counts.rb +23 -0
- data/lib/tungo/models/company_legal_form.rb +19 -0
- data/lib/tungo/models/company_list_item.rb +65 -0
- data/lib/tungo/models/company_permission.rb +26 -0
- data/lib/tungo/models/company_status.rb +19 -0
- data/lib/tungo/models/data_gap_form.rb +30 -0
- data/lib/tungo/models/data_gap_form_status.rb +66 -0
- data/lib/tungo/models/data_gap_item.rb +49 -0
- data/lib/tungo/models/data_gap_object.rb +25 -0
- data/lib/tungo/models/data_gaps.rb +41 -0
- data/lib/tungo/models/data_gaps_summary.rb +40 -0
- data/lib/tungo/models/direct_bank_poll_result.rb +25 -0
- data/lib/tungo/models/epay_return_links.rb +21 -0
- data/lib/tungo/models/error.rb +28 -0
- data/lib/tungo/models/error_detail.rb +74 -0
- data/lib/tungo/models/error_detail_allowed_method_item.rb +20 -0
- data/lib/tungo/models/error_detail_type.rb +27 -0
- data/lib/tungo/models/esf_incoming_action.rb +22 -0
- data/lib/tungo/models/esf_incoming_item.rb +76 -0
- data/lib/tungo/models/esf_incoming_match.rb +32 -0
- data/lib/tungo/models/esf_incoming_match_document.rb +29 -0
- data/lib/tungo/models/esf_incoming_match_status.rb +21 -0
- data/lib/tungo/models/esf_incoming_report.rb +41 -0
- data/lib/tungo/models/esf_outgoing_item.rb +53 -0
- data/lib/tungo/models/esf_outgoing_item_esf.rb +35 -0
- data/lib/tungo/models/esf_outgoing_item_tax_invoice.rb +25 -0
- data/lib/tungo/models/esf_outgoing_report.rb +36 -0
- data/lib/tungo/models/esf_purchases_job_request.rb +26 -0
- data/lib/tungo/models/esf_sale.rb +44 -0
- data/lib/tungo/models/esf_verdict.rb +20 -0
- data/lib/tungo/models/feed_action.rb +49 -0
- data/lib/tungo/models/feed_action_action.rb +23 -0
- data/lib/tungo/models/feed_action_method.rb +17 -0
- data/lib/tungo/models/feed_item.rb +91 -0
- data/lib/tungo/models/feed_page.rb +30 -0
- data/lib/tungo/models/feed_section.rb +20 -0
- data/lib/tungo/models/feed_section_counts.rb +25 -0
- data/lib/tungo/models/feed_section_titles.rb +25 -0
- data/lib/tungo/models/field_error.rb +28 -0
- data/lib/tungo/models/field_error_code.rb +28 -0
- data/lib/tungo/models/financial_notes.rb +50 -0
- data/lib/tungo/models/financial_notes_organization.rb +20 -0
- data/lib/tungo/models/financial_notes_section.rb +55 -0
- data/lib/tungo/models/financial_notes_table.rb +25 -0
- data/lib/tungo/models/financial_notes_table_row_item_item.rb +20 -0
- data/lib/tungo/models/financial_notes_to_fill.rb +29 -0
- data/lib/tungo/models/form_missing_action.rb +23 -0
- data/lib/tungo/models/form_missing_data.rb +39 -0
- data/lib/tungo/models/form_onec_object.rb +20 -0
- data/lib/tungo/models/get_workspace_platform_audit_response.rb +22 -0
- data/lib/tungo/models/get_workspace_platform_ledger_response.rb +22 -0
- data/lib/tungo/models/isna_file.rb +12 -0
- data/lib/tungo/models/isna_response.rb +20 -0
- data/lib/tungo/models/isna_summary.rb +95 -0
- data/lib/tungo/models/isna_summary_download.rb +20 -0
- data/lib/tungo/models/isna_summary_format.rb +25 -0
- data/lib/tungo/models/isna_summary_period.rb +31 -0
- data/lib/tungo/models/isna_summary_reconciliation.rb +19 -0
- data/lib/tungo/models/list_companies_response.rb +16 -0
- data/lib/tungo/models/list_company_automations_hooks_response.rb +15 -0
- data/lib/tungo/models/list_company_automations_runs_response.rb +22 -0
- data/lib/tungo/models/list_company_automations_scenarios_response.rb +15 -0
- data/lib/tungo/models/list_usage_rates_response.rb +15 -0
- data/lib/tungo/models/list_workspace_platform_requests_response.rb +22 -0
- data/lib/tungo/models/list_workspace_webhooks_endpoint_attempts_response.rb +22 -0
- data/lib/tungo/models/list_workspace_webhooks_endpoint_attempts_status.rb +20 -0
- data/lib/tungo/models/list_workspace_webhooks_endpoints_response.rb +22 -0
- data/lib/tungo/models/list_workspace_webhooks_event_types_response.rb +15 -0
- data/lib/tungo/models/list_workspace_webhooks_message_attempts_response.rb +22 -0
- data/lib/tungo/models/list_workspace_webhooks_messages_response.rb +22 -0
- data/lib/tungo/models/list_workspaces_response.rb +15 -0
- data/lib/tungo/models/money.rb +27 -0
- data/lib/tungo/models/my_workspace.rb +37 -0
- data/lib/tungo/models/my_workspace_kind.rb +19 -0
- data/lib/tungo/models/one_c_capability.rb +33 -0
- data/lib/tungo/models/one_c_capability_id.rb +26 -0
- data/lib/tungo/models/one_c_capability_status.rb +20 -0
- data/lib/tungo/models/one_c_gateway.rb +21 -0
- data/lib/tungo/models/one_c_status.rb +32 -0
- data/lib/tungo/models/one_c_status_last_check.rb +36 -0
- data/lib/tungo/models/one_c_status_last_check_verdict.rb +18 -0
- data/lib/tungo/models/pay_form.rb +34 -0
- data/lib/tungo/models/payment_method.rb +42 -0
- data/lib/tungo/models/platform_account.rb +60 -0
- data/lib/tungo/models/platform_account_blocked_reason.rb +19 -0
- data/lib/tungo/models/platform_account_purchase_limits.rb +25 -0
- data/lib/tungo/models/platform_auto_reload.rb +32 -0
- data/lib/tungo/models/platform_ledger_entry.rb +63 -0
- data/lib/tungo/models/platform_ledger_entry_kind.rb +20 -0
- data/lib/tungo/models/platform_limits.rb +25 -0
- data/lib/tungo/models/platform_limits_concurrent_turns.rb +20 -0
- data/lib/tungo/models/platform_limits_files.rb +56 -0
- data/lib/tungo/models/platform_limits_rate.rb +20 -0
- data/lib/tungo/models/platform_limits_rate_key.rb +26 -0
- data/lib/tungo/models/platform_limits_rate_workspace.rb +26 -0
- data/lib/tungo/models/platform_purchase.rb +33 -0
- data/lib/tungo/models/platform_purchase_input.rb +22 -0
- data/lib/tungo/models/platform_purchase_status.rb +26 -0
- data/lib/tungo/models/platform_request.rb +71 -0
- data/lib/tungo/models/platform_settings_input.rb +26 -0
- data/lib/tungo/models/platform_settings_input_auto_reload.rb +31 -0
- data/lib/tungo/models/platform_usage.rb +45 -0
- data/lib/tungo/models/platform_usage_by_company_item.rb +45 -0
- data/lib/tungo/models/platform_usage_by_day_item.rb +45 -0
- data/lib/tungo/models/platform_usage_by_key_item.rb +45 -0
- data/lib/tungo/models/platform_usage_by_model_item.rb +45 -0
- data/lib/tungo/models/platform_usage_totals.rb +40 -0
- data/lib/tungo/models/proposal_account.rb +32 -0
- data/lib/tungo/models/proposal_action.rb +52 -0
- data/lib/tungo/models/proposal_action_action.rb +19 -0
- data/lib/tungo/models/proposal_advance_offset.rb +33 -0
- data/lib/tungo/models/proposal_approval.rb +32 -0
- data/lib/tungo/models/proposal_card.rb +158 -0
- data/lib/tungo/models/proposal_contract.rb +35 -0
- data/lib/tungo/models/proposal_decision.rb +43 -0
- data/lib/tungo/models/proposal_document.rb +26 -0
- data/lib/tungo/models/proposal_header.rb +71 -0
- data/lib/tungo/models/proposal_history_event.rb +35 -0
- data/lib/tungo/models/proposal_kind.rb +28 -0
- data/lib/tungo/models/proposal_line.rb +66 -0
- data/lib/tungo/models/proposal_line_item.rb +20 -0
- data/lib/tungo/models/proposal_line_section.rb +17 -0
- data/lib/tungo/models/proposal_list_item.rb +100 -0
- data/lib/tungo/models/proposal_page.rb +33 -0
- data/lib/tungo/models/proposal_party.rb +26 -0
- data/lib/tungo/models/proposal_posting.rb +38 -0
- data/lib/tungo/models/proposal_result.rb +31 -0
- data/lib/tungo/models/proposal_source.rb +21 -0
- data/lib/tungo/models/proposal_source_channel.rb +21 -0
- data/lib/tungo/models/proposal_status.rb +25 -0
- data/lib/tungo/models/reject_request.rb +23 -0
- data/lib/tungo/models/statement_day.rb +66 -0
- data/lib/tungo/models/statement_day_counts.rb +40 -0
- data/lib/tungo/models/statement_day_kind.rb +21 -0
- data/lib/tungo/models/statement_day_list.rb +22 -0
- data/lib/tungo/models/tax_form_cell.rb +77 -0
- data/lib/tungo/models/tax_form_cell_cause.rb +44 -0
- data/lib/tungo/models/tax_form_cell_diff.rb +20 -0
- data/lib/tungo/models/tax_form_cell_one_c_value.rb +22 -0
- data/lib/tungo/models/tax_form_cell_ours_value.rb +22 -0
- data/lib/tungo/models/tax_form_cell_status.rb +21 -0
- data/lib/tungo/models/tax_form_cell_type.rb +22 -0
- data/lib/tungo/models/tax_form_due.rb +57 -0
- data/lib/tungo/models/tax_form_list_item.rb +67 -0
- data/lib/tungo/models/tax_form_list_item_coverage.rb +17 -0
- data/lib/tungo/models/tax_form_list_item_group.rb +20 -0
- data/lib/tungo/models/tax_form_list_item_required.rb +19 -0
- data/lib/tungo/models/tax_form_only_in_one_c.rb +20 -0
- data/lib/tungo/models/tax_form_period.rb +36 -0
- data/lib/tungo/models/tax_form_reference.rb +30 -0
- data/lib/tungo/models/tax_form_totals.rb +30 -0
- data/lib/tungo/models/tax_form_view.rb +83 -0
- data/lib/tungo/models/tax_form_view_coverage.rb +17 -0
- data/lib/tungo/models/tax_form_view_uncovered.rb +20 -0
- data/lib/tungo/models/tax_form_view_uncovered_cell_item.rb +20 -0
- data/lib/tungo/models/tax_forms_year.rb +31 -0
- data/lib/tungo/models/tax_period_kind.rb +21 -0
- data/lib/tungo/models/tax_period_ref.rb +21 -0
- data/lib/tungo/models/usage_rate.rb +42 -0
- data/lib/tungo/models/webhook_attempt.rb +56 -0
- data/lib/tungo/models/webhook_attempt_status.rb +20 -0
- data/lib/tungo/models/webhook_attempt_trigger.rb +17 -0
- data/lib/tungo/models/webhook_endpoint.rb +51 -0
- data/lib/tungo/models/webhook_endpoint_create.rb +39 -0
- data/lib/tungo/models/webhook_endpoint_created.rb +66 -0
- data/lib/tungo/models/webhook_endpoint_patch.rb +39 -0
- data/lib/tungo/models/webhook_envelope.rb +41 -0
- data/lib/tungo/models/webhook_event.rb +65 -0
- data/lib/tungo/models/webhook_event_api_key_cap_reached.rb +42 -0
- data/lib/tungo/models/webhook_event_api_key_cap_reached_data.rb +40 -0
- data/lib/tungo/models/webhook_event_api_key_expiring.rb +42 -0
- data/lib/tungo/models/webhook_event_api_key_expiring_data.rb +30 -0
- data/lib/tungo/models/webhook_event_automation_run_completed.rb +42 -0
- data/lib/tungo/models/webhook_event_automation_run_completed_data.rb +110 -0
- data/lib/tungo/models/webhook_event_automation_run_completed_data_output_error.rb +18 -0
- data/lib/tungo/models/webhook_event_automation_run_completed_data_output_value.rb +20 -0
- data/lib/tungo/models/webhook_event_automation_run_completed_data_proposal_item.rb +53 -0
- data/lib/tungo/models/webhook_event_automation_run_completed_data_proposal_item_auto.rb +20 -0
- data/lib/tungo/models/webhook_event_automation_run_completed_data_proposal_item_auto_code.rb +22 -0
- data/lib/tungo/models/webhook_event_automation_run_failed.rb +42 -0
- data/lib/tungo/models/webhook_event_automation_run_failed_data.rb +110 -0
- data/lib/tungo/models/webhook_event_automation_run_failed_data_output_error.rb +18 -0
- data/lib/tungo/models/webhook_event_automation_run_failed_data_output_value.rb +20 -0
- data/lib/tungo/models/webhook_event_automation_run_failed_data_proposal_item.rb +53 -0
- data/lib/tungo/models/webhook_event_automation_run_failed_data_proposal_item_auto.rb +20 -0
- data/lib/tungo/models/webhook_event_automation_run_failed_data_proposal_item_auto_code.rb +22 -0
- data/lib/tungo/models/webhook_event_automation_run_notice.rb +42 -0
- data/lib/tungo/models/webhook_event_automation_run_notice_data.rb +60 -0
- data/lib/tungo/models/webhook_event_automation_run_notice_data_reason.rb +19 -0
- data/lib/tungo/models/webhook_event_automation_write_unknown.rb +42 -0
- data/lib/tungo/models/webhook_event_automation_write_unknown_data.rb +37 -0
- data/lib/tungo/models/webhook_event_bank_statement_received.rb +41 -0
- data/lib/tungo/models/webhook_event_bank_statement_received_data.rb +40 -0
- data/lib/tungo/models/webhook_event_bank_statement_received_data_source.rb +17 -0
- data/lib/tungo/models/webhook_event_batch_completed.rb +42 -0
- data/lib/tungo/models/webhook_event_batch_completed_data.rb +65 -0
- data/lib/tungo/models/webhook_event_batch_completed_data_kind.rb +17 -0
- data/lib/tungo/models/webhook_event_batch_failed.rb +41 -0
- data/lib/tungo/models/webhook_event_batch_failed_data.rb +25 -0
- data/lib/tungo/models/webhook_event_batch_failed_data_kind.rb +17 -0
- data/lib/tungo/models/webhook_event_chat_turn_completed.rb +42 -0
- data/lib/tungo/models/webhook_event_chat_turn_completed_data.rb +41 -0
- data/lib/tungo/models/webhook_event_chat_turn_completed_data_usage.rb +35 -0
- data/lib/tungo/models/webhook_event_esf_incoming_received.rb +41 -0
- data/lib/tungo/models/webhook_event_esf_incoming_received_data.rb +40 -0
- data/lib/tungo/models/webhook_event_onec_connection_changed.rb +42 -0
- data/lib/tungo/models/webhook_event_onec_connection_changed_data.rb +35 -0
- data/lib/tungo/models/webhook_event_onec_connection_changed_data_reason.rb +24 -0
- data/lib/tungo/models/webhook_event_onec_connection_changed_data_state.rb +17 -0
- data/lib/tungo/models/webhook_event_payment_failed.rb +40 -0
- data/lib/tungo/models/webhook_event_payment_failed_data.rb +41 -0
- data/lib/tungo/models/webhook_event_payment_succeeded.rb +40 -0
- data/lib/tungo/models/webhook_event_payment_succeeded_data.rb +41 -0
- data/lib/tungo/models/webhook_event_ping.rb +42 -0
- data/lib/tungo/models/webhook_event_ping_data.rb +11 -0
- data/lib/tungo/models/webhook_event_platform_balance_exhausted.rb +41 -0
- data/lib/tungo/models/webhook_event_platform_balance_exhausted_data.rb +20 -0
- data/lib/tungo/models/webhook_event_platform_balance_low.rb +41 -0
- data/lib/tungo/models/webhook_event_platform_balance_low_data.rb +20 -0
- data/lib/tungo/models/webhook_event_platform_cap_threshold_reached.rb +41 -0
- data/lib/tungo/models/webhook_event_platform_cap_threshold_reached_data.rb +30 -0
- data/lib/tungo/models/webhook_event_proposal_awaiting_approval.rb +40 -0
- data/lib/tungo/models/webhook_event_proposal_awaiting_approval_data.rb +40 -0
- data/lib/tungo/models/webhook_event_proposal_failed.rb +41 -0
- data/lib/tungo/models/webhook_event_proposal_failed_data.rb +30 -0
- data/lib/tungo/models/webhook_event_proposal_rejected.rb +41 -0
- data/lib/tungo/models/webhook_event_proposal_rejected_data.rb +30 -0
- data/lib/tungo/models/webhook_event_proposal_written.rb +41 -0
- data/lib/tungo/models/webhook_event_proposal_written_data.rb +35 -0
- data/lib/tungo/models/webhook_event_type.rb +30 -0
- data/lib/tungo/models/webhook_message.rb +31 -0
- data/lib/tungo/models/webhook_resend.rb +15 -0
- data/lib/tungo/models/webhook_secret.rb +24 -0
- data/lib/tungo/models/webhook_secret_rotated.rb +29 -0
- data/lib/tungo/models/webhook_usage.rb +31 -0
- data/lib/tungo/models/workspace_plan.rb +25 -0
- data/lib/tungo/models.rb +497 -0
- data/lib/tungo/money.rb +112 -0
- data/lib/tungo/page.rb +94 -0
- data/lib/tungo/request_options.rb +57 -0
- data/lib/tungo/resources/api_keys.rb +74 -0
- data/lib/tungo/resources/automations.rb +681 -0
- data/lib/tungo/resources/batches.rb +242 -0
- data/lib/tungo/resources/chat.rb +355 -0
- data/lib/tungo/resources/companies.rb +48 -0
- data/lib/tungo/resources/esf.rb +148 -0
- data/lib/tungo/resources/feed.rb +91 -0
- data/lib/tungo/resources/forms.rb +118 -0
- data/lib/tungo/resources/onec.rb +33 -0
- data/lib/tungo/resources/platform.rb +316 -0
- data/lib/tungo/resources/proposals.rb +230 -0
- data/lib/tungo/resources/webhooks.rb +423 -0
- data/lib/tungo/resources/workspaces.rb +31 -0
- data/lib/tungo/resources.rb +88 -0
- data/lib/tungo/stream.rb +189 -0
- data/lib/tungo/transport.rb +373 -0
- data/lib/tungo/version.rb +6 -0
- data/lib/tungo/webhooks.rb +155 -0
- data/lib/tungo-sdk.rb +4 -0
- data/lib/tungo.rb +34 -0
- data/sig/manifest.yaml +8 -0
- data/sig/tungo/contract.rbs +8 -0
- data/sig/tungo/models/api_key.rbs +32 -0
- data/sig/tungo/models/api_key_create.rbs +21 -0
- data/sig/tungo/models/api_key_create_write_kind_item.rbs +22 -0
- data/sig/tungo/models/api_key_created.rbs +35 -0
- data/sig/tungo/models/api_key_created_permission_item.rbs +18 -0
- data/sig/tungo/models/api_key_created_status.rbs +15 -0
- data/sig/tungo/models/api_key_details.rbs +33 -0
- data/sig/tungo/models/api_key_details_blocked_reason.rbs +21 -0
- data/sig/tungo/models/api_key_details_permission_item.rbs +18 -0
- data/sig/tungo/models/api_key_details_status.rbs +15 -0
- data/sig/tungo/models/api_key_month.rbs +14 -0
- data/sig/tungo/models/api_key_patch.rbs +21 -0
- data/sig/tungo/models/api_key_patch_write_kind_item.rbs +22 -0
- data/sig/tungo/models/api_key_permission_item.rbs +18 -0
- data/sig/tungo/models/api_key_person.rbs +14 -0
- data/sig/tungo/models/api_key_roll.rbs +12 -0
- data/sig/tungo/models/api_key_rolled.rbs +34 -0
- data/sig/tungo/models/api_key_rolled_permission_item.rbs +18 -0
- data/sig/tungo/models/api_key_rolled_status.rbs +15 -0
- data/sig/tungo/models/api_key_self.rbs +36 -0
- data/sig/tungo/models/api_key_self_blocked_reason.rbs +21 -0
- data/sig/tungo/models/api_key_self_permission_item.rbs +18 -0
- data/sig/tungo/models/api_key_self_rate_limit.rbs +14 -0
- data/sig/tungo/models/api_key_self_status.rbs +15 -0
- data/sig/tungo/models/api_key_self_workspace.rbs +14 -0
- data/sig/tungo/models/api_key_self_workspace_kind.rbs +14 -0
- data/sig/tungo/models/api_key_status.rbs +15 -0
- data/sig/tungo/models/api_key_transfer.rbs +12 -0
- data/sig/tungo/models/api_key_updated.rbs +33 -0
- data/sig/tungo/models/api_key_updated_permission_item.rbs +18 -0
- data/sig/tungo/models/api_key_updated_status.rbs +15 -0
- data/sig/tungo/models/api_key_usage.rbs +19 -0
- data/sig/tungo/models/api_key_usage_by_company_item.rbs +14 -0
- data/sig/tungo/models/api_key_usage_by_day_item.rbs +14 -0
- data/sig/tungo/models/api_key_usage_by_model_item.rbs +14 -0
- data/sig/tungo/models/api_key_usage_totals.rbs +17 -0
- data/sig/tungo/models/api_key_warning.rbs +13 -0
- data/sig/tungo/models/api_key_warning_code.rbs +15 -0
- data/sig/tungo/models/approve_batch_company_proposals_response.rbs +12 -0
- data/sig/tungo/models/approve_error.rbs +14 -0
- data/sig/tungo/models/approve_error_error.rbs +27 -0
- data/sig/tungo/models/approve_request.rbs +14 -0
- data/sig/tungo/models/audit_entry.rbs +21 -0
- data/sig/tungo/models/audit_entry_action.rbs +142 -0
- data/sig/tungo/models/audit_entry_actor.rbs +14 -0
- data/sig/tungo/models/audit_entry_actor_type.rbs +14 -0
- data/sig/tungo/models/audit_entry_target.rbs +13 -0
- data/sig/tungo/models/automation_auto_approve.rbs +15 -0
- data/sig/tungo/models/automation_auto_approve_kind_item.rbs +21 -0
- data/sig/tungo/models/automation_deleted.rbs +13 -0
- data/sig/tungo/models/automation_event_filter.rbs +12 -0
- data/sig/tungo/models/automation_filter_condition.rbs +14 -0
- data/sig/tungo/models/automation_filter_condition_op.rbs +20 -0
- data/sig/tungo/models/automation_filter_condition_value.rbs +12 -0
- data/sig/tungo/models/automation_filter_condition_value_option4_item.rbs +12 -0
- data/sig/tungo/models/automation_hook.rbs +21 -0
- data/sig/tungo/models/automation_hook_accepted.rbs +15 -0
- data/sig/tungo/models/automation_hook_create.rbs +15 -0
- data/sig/tungo/models/automation_hook_event.rbs +21 -0
- data/sig/tungo/models/automation_hook_event_encoding.rbs +13 -0
- data/sig/tungo/models/automation_hook_event_source.rbs +13 -0
- data/sig/tungo/models/automation_hook_patch.rbs +16 -0
- data/sig/tungo/models/automation_hook_test_input.rbs +14 -0
- data/sig/tungo/models/automation_hook_test_result.rbs +21 -0
- data/sig/tungo/models/automation_hook_test_result_external_id_source.rbs +15 -0
- data/sig/tungo/models/automation_hook_test_scenario.rbs +18 -0
- data/sig/tungo/models/automation_hook_test_scenario_failed_condition.rbs +14 -0
- data/sig/tungo/models/automation_hook_with_token.rbs +24 -0
- data/sig/tungo/models/automation_manual_run.rbs +42 -0
- data/sig/tungo/models/automation_manual_run_output_error.rbs +13 -0
- data/sig/tungo/models/automation_manual_run_output_value.rbs +12 -0
- data/sig/tungo/models/automation_manual_run_state.rbs +17 -0
- data/sig/tungo/models/automation_manual_run_trigger.rbs +16 -0
- data/sig/tungo/models/automation_output_field.rbs +12 -0
- data/sig/tungo/models/automation_output_field_option1.rbs +13 -0
- data/sig/tungo/models/automation_output_field_option2.rbs +13 -0
- data/sig/tungo/models/automation_output_field_option3.rbs +13 -0
- data/sig/tungo/models/automation_output_field_option4.rbs +13 -0
- data/sig/tungo/models/automation_output_field_option5.rbs +14 -0
- data/sig/tungo/models/automation_output_spec.rbs +11 -0
- data/sig/tungo/models/automation_run.rbs +41 -0
- data/sig/tungo/models/automation_run_detail.rbs +42 -0
- data/sig/tungo/models/automation_run_detail_output_error.rbs +13 -0
- data/sig/tungo/models/automation_run_detail_output_value.rbs +12 -0
- data/sig/tungo/models/automation_run_detail_state.rbs +17 -0
- data/sig/tungo/models/automation_run_detail_trigger.rbs +16 -0
- data/sig/tungo/models/automation_run_output_error.rbs +13 -0
- data/sig/tungo/models/automation_run_output_value.rbs +12 -0
- data/sig/tungo/models/automation_run_proposal.rbs +18 -0
- data/sig/tungo/models/automation_run_proposal_auto.rbs +15 -0
- data/sig/tungo/models/automation_run_proposal_code.rbs +17 -0
- data/sig/tungo/models/automation_run_proposal_status.rbs +19 -0
- data/sig/tungo/models/automation_run_proposal_status_auto.rbs +15 -0
- data/sig/tungo/models/automation_run_proposal_status_code.rbs +17 -0
- data/sig/tungo/models/automation_run_state.rbs +17 -0
- data/sig/tungo/models/automation_run_step.rbs +24 -0
- data/sig/tungo/models/automation_run_step_action.rbs +15 -0
- data/sig/tungo/models/automation_run_step_output_error.rbs +13 -0
- data/sig/tungo/models/automation_run_step_output_value.rbs +12 -0
- data/sig/tungo/models/automation_run_step_skipped_by.rbs +15 -0
- data/sig/tungo/models/automation_run_step_state.rbs +16 -0
- data/sig/tungo/models/automation_run_trigger.rbs +16 -0
- data/sig/tungo/models/automation_scenario.rbs +24 -0
- data/sig/tungo/models/automation_scenario_action.rbs +14 -0
- data/sig/tungo/models/automation_scenario_enabled.rbs +12 -0
- data/sig/tungo/models/automation_scenario_input.rbs +19 -0
- data/sig/tungo/models/automation_scenario_input_action.rbs +14 -0
- data/sig/tungo/models/automation_scenario_input_auto_approve.rbs +15 -0
- data/sig/tungo/models/automation_scenario_input_auto_approve_kind_item.rbs +21 -0
- data/sig/tungo/models/automation_scenario_input_trigger.rbs +12 -0
- data/sig/tungo/models/automation_scenario_input_trigger_option1.rbs +14 -0
- data/sig/tungo/models/automation_scenario_input_trigger_option2.rbs +13 -0
- data/sig/tungo/models/automation_scenario_input_trigger_option3.rbs +14 -0
- data/sig/tungo/models/automation_scenario_input_trigger_option3_event.rbs +20 -0
- data/sig/tungo/models/automation_scenario_input_trigger_option4.rbs +12 -0
- data/sig/tungo/models/automation_scenario_run_input.rbs +12 -0
- data/sig/tungo/models/automation_scenario_saved.rbs +25 -0
- data/sig/tungo/models/automation_scenario_saved_action.rbs +14 -0
- data/sig/tungo/models/automation_scenario_step.rbs +15 -0
- data/sig/tungo/models/automation_scenario_step_action.rbs +15 -0
- data/sig/tungo/models/automation_scenario_step_when.rbs +15 -0
- data/sig/tungo/models/automation_schedule.rbs +12 -0
- data/sig/tungo/models/automation_schedule_daily.rbs +13 -0
- data/sig/tungo/models/automation_schedule_interval.rbs +16 -0
- data/sig/tungo/models/automation_schedule_monthly.rbs +16 -0
- data/sig/tungo/models/automation_schedule_weekly.rbs +14 -0
- data/sig/tungo/models/automation_state.rbs +16 -0
- data/sig/tungo/models/automation_state_input.rbs +13 -0
- data/sig/tungo/models/automation_step.rbs +15 -0
- data/sig/tungo/models/automation_step_action.rbs +15 -0
- data/sig/tungo/models/automation_step_when.rbs +15 -0
- data/sig/tungo/models/automation_trigger.rbs +12 -0
- data/sig/tungo/models/automation_trigger_event.rbs +14 -0
- data/sig/tungo/models/automation_trigger_event_event.rbs +20 -0
- data/sig/tungo/models/automation_trigger_hook.rbs +14 -0
- data/sig/tungo/models/automation_trigger_manual.rbs +12 -0
- data/sig/tungo/models/automation_trigger_schedule.rbs +14 -0
- data/sig/tungo/models/autonomy_level.rbs +18 -0
- data/sig/tungo/models/bank_statement_job_request.rbs +15 -0
- data/sig/tungo/models/batch_approve_job.rbs +23 -0
- data/sig/tungo/models/batch_approve_job_kind.rbs +15 -0
- data/sig/tungo/models/batch_approve_request.rbs +18 -0
- data/sig/tungo/models/batch_approve_response.rbs +23 -0
- data/sig/tungo/models/batch_approve_response_stopped.rbs +13 -0
- data/sig/tungo/models/batch_approve_result.rbs +19 -0
- data/sig/tungo/models/batch_approve_result_outcome.rbs +24 -0
- data/sig/tungo/models/batch_job.rbs +20 -0
- data/sig/tungo/models/batch_job_kind.rbs +15 -0
- data/sig/tungo/models/batch_job_list.rbs +13 -0
- data/sig/tungo/models/batch_job_report.rbs +24 -0
- data/sig/tungo/models/batch_job_report_gateway.rbs +13 -0
- data/sig/tungo/models/batch_job_row.rbs +20 -0
- data/sig/tungo/models/batch_job_row_status.rbs +16 -0
- data/sig/tungo/models/batch_manual_row.rbs +15 -0
- data/sig/tungo/models/batch_row_question.rbs +14 -0
- data/sig/tungo/models/batch_row_question_option_item.rbs +13 -0
- data/sig/tungo/models/batch_stop_result.rbs +13 -0
- data/sig/tungo/models/batch_summary.rbs +22 -0
- data/sig/tungo/models/batch_summary_approve.rbs +14 -0
- data/sig/tungo/models/batch_summary_approve_body.rbs +13 -0
- data/sig/tungo/models/batch_summary_kind.rbs +15 -0
- data/sig/tungo/models/batch_summary_proposal.rbs +20 -0
- data/sig/tungo/models/batch_summary_proposal_outcome.rbs +17 -0
- data/sig/tungo/models/batch_summary_totals.rbs +22 -0
- data/sig/tungo/models/card_session.rbs +14 -0
- data/sig/tungo/models/chat_answer_request.rbs +14 -0
- data/sig/tungo/models/chat_assistant_message.rbs +19 -0
- data/sig/tungo/models/chat_assistant_message_state.rbs +14 -0
- data/sig/tungo/models/chat_attachment.rbs +14 -0
- data/sig/tungo/models/chat_attachment_meta.rbs +14 -0
- data/sig/tungo/models/chat_choice_answer.rbs +13 -0
- data/sig/tungo/models/chat_choice_option.rbs +14 -0
- data/sig/tungo/models/chat_choice_question.rbs +15 -0
- data/sig/tungo/models/chat_citation.rbs +15 -0
- data/sig/tungo/models/chat_dialog.rbs +23 -0
- data/sig/tungo/models/chat_dialog_closed.rbs +13 -0
- data/sig/tungo/models/chat_dialog_deleted.rbs +13 -0
- data/sig/tungo/models/chat_dialog_list.rbs +13 -0
- data/sig/tungo/models/chat_dialog_patch.rbs +12 -0
- data/sig/tungo/models/chat_dialog_renamed.rbs +13 -0
- data/sig/tungo/models/chat_dialog_summary.rbs +16 -0
- data/sig/tungo/models/chat_event.rbs +12 -0
- data/sig/tungo/models/chat_event_batch.rbs +18 -0
- data/sig/tungo/models/chat_event_batch_outcome.rbs +16 -0
- data/sig/tungo/models/chat_event_batch_report.rbs +14 -0
- data/sig/tungo/models/chat_event_batch_stage.rbs +14 -0
- data/sig/tungo/models/chat_event_choice.rbs +14 -0
- data/sig/tungo/models/chat_event_citation.rbs +16 -0
- data/sig/tungo/models/chat_event_done.rbs +17 -0
- data/sig/tungo/models/chat_event_error.rbs +14 -0
- data/sig/tungo/models/chat_event_progress.rbs +14 -0
- data/sig/tungo/models/chat_event_proposal.rbs +14 -0
- data/sig/tungo/models/chat_event_question.rbs +14 -0
- data/sig/tungo/models/chat_event_status.rbs +14 -0
- data/sig/tungo/models/chat_event_status_code.rbs +14 -0
- data/sig/tungo/models/chat_event_text.rbs +14 -0
- data/sig/tungo/models/chat_event_thinking.rbs +13 -0
- data/sig/tungo/models/chat_event_tool.rbs +16 -0
- data/sig/tungo/models/chat_event_tool_status.rbs +14 -0
- data/sig/tungo/models/chat_history_block.rbs +12 -0
- data/sig/tungo/models/chat_history_error.rbs +14 -0
- data/sig/tungo/models/chat_history_error_code.rbs +26 -0
- data/sig/tungo/models/chat_history_proposal.rbs +13 -0
- data/sig/tungo/models/chat_history_question.rbs +14 -0
- data/sig/tungo/models/chat_history_text.rbs +13 -0
- data/sig/tungo/models/chat_history_tool.rbs +16 -0
- data/sig/tungo/models/chat_history_tool_status.rbs +13 -0
- data/sig/tungo/models/chat_message.rbs +12 -0
- data/sig/tungo/models/chat_message_request.rbs +20 -0
- data/sig/tungo/models/chat_message_request_mode.rbs +14 -0
- data/sig/tungo/models/chat_pending_question.rbs +13 -0
- data/sig/tungo/models/chat_question.rbs +13 -0
- data/sig/tungo/models/chat_stop_result.rbs +14 -0
- data/sig/tungo/models/chat_token_count.rbs +16 -0
- data/sig/tungo/models/chat_token_count_request.rbs +15 -0
- data/sig/tungo/models/chat_token_count_request_mode.rbs +14 -0
- data/sig/tungo/models/chat_turn_error.rbs +16 -0
- data/sig/tungo/models/chat_turn_error_code.rbs +26 -0
- data/sig/tungo/models/chat_turn_error_limit_kind.rbs +13 -0
- data/sig/tungo/models/chat_turn_proposal.rbs +13 -0
- data/sig/tungo/models/chat_turn_result.rbs +21 -0
- data/sig/tungo/models/chat_turn_usage.rbs +16 -0
- data/sig/tungo/models/chat_usage.rbs +15 -0
- data/sig/tungo/models/chat_user_message.rbs +17 -0
- data/sig/tungo/models/company.rbs +21 -0
- data/sig/tungo/models/company_autonomy.rbs +17 -0
- data/sig/tungo/models/company_autonomy_custom.rbs +13 -0
- data/sig/tungo/models/company_autonomy_defaults.rbs +13 -0
- data/sig/tungo/models/company_autonomy_input.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels.rbs +21 -0
- data/sig/tungo/models/company_autonomy_input_levels_advance_report.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_bank_payment.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_bank_receipt.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_cash_order_in.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_cash_order_out.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_contract.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_counterparty.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_inventory_writeoff.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_purchase.rbs +14 -0
- data/sig/tungo/models/company_autonomy_input_levels_sale.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels.rbs +21 -0
- data/sig/tungo/models/company_autonomy_levels_advance_report.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_bank_payment.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_bank_receipt.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_cash_order_in.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_cash_order_out.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_contract.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_counterparty.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_inventory_writeoff.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_purchase.rbs +14 -0
- data/sig/tungo/models/company_autonomy_levels_sale.rbs +14 -0
- data/sig/tungo/models/company_counts.rbs +13 -0
- data/sig/tungo/models/company_legal_form.rbs +15 -0
- data/sig/tungo/models/company_list_item.rbs +22 -0
- data/sig/tungo/models/company_permission.rbs +20 -0
- data/sig/tungo/models/company_status.rbs +14 -0
- data/sig/tungo/models/data_gap_form.rbs +15 -0
- data/sig/tungo/models/data_gap_form_status.rbs +22 -0
- data/sig/tungo/models/data_gap_item.rbs +19 -0
- data/sig/tungo/models/data_gap_object.rbs +14 -0
- data/sig/tungo/models/data_gaps.rbs +17 -0
- data/sig/tungo/models/data_gaps_summary.rbs +17 -0
- data/sig/tungo/models/direct_bank_poll_result.rbs +14 -0
- data/sig/tungo/models/epay_return_links.rbs +13 -0
- data/sig/tungo/models/error.rbs +14 -0
- data/sig/tungo/models/error_detail.rbs +20 -0
- data/sig/tungo/models/error_detail_allowed_method_item.rbs +16 -0
- data/sig/tungo/models/error_detail_type.rbs +21 -0
- data/sig/tungo/models/esf_incoming_action.rbs +16 -0
- data/sig/tungo/models/esf_incoming_item.rbs +25 -0
- data/sig/tungo/models/esf_incoming_match.rbs +15 -0
- data/sig/tungo/models/esf_incoming_match_document.rbs +15 -0
- data/sig/tungo/models/esf_incoming_match_status.rbs +16 -0
- data/sig/tungo/models/esf_incoming_report.rbs +17 -0
- data/sig/tungo/models/esf_outgoing_item.rbs +20 -0
- data/sig/tungo/models/esf_outgoing_item_esf.rbs +16 -0
- data/sig/tungo/models/esf_outgoing_item_tax_invoice.rbs +14 -0
- data/sig/tungo/models/esf_outgoing_report.rbs +16 -0
- data/sig/tungo/models/esf_purchases_job_request.rbs +14 -0
- data/sig/tungo/models/esf_sale.rbs +18 -0
- data/sig/tungo/models/esf_verdict.rbs +14 -0
- data/sig/tungo/models/feed_action.rbs +18 -0
- data/sig/tungo/models/feed_action_action.rbs +17 -0
- data/sig/tungo/models/feed_action_method.rbs +13 -0
- data/sig/tungo/models/feed_item.rbs +27 -0
- data/sig/tungo/models/feed_page.rbs +15 -0
- data/sig/tungo/models/feed_section.rbs +14 -0
- data/sig/tungo/models/feed_section_counts.rbs +14 -0
- data/sig/tungo/models/feed_section_titles.rbs +14 -0
- data/sig/tungo/models/field_error.rbs +14 -0
- data/sig/tungo/models/field_error_code.rbs +22 -0
- data/sig/tungo/models/financial_notes.rbs +19 -0
- data/sig/tungo/models/financial_notes_organization.rbs +13 -0
- data/sig/tungo/models/financial_notes_section.rbs +20 -0
- data/sig/tungo/models/financial_notes_table.rbs +14 -0
- data/sig/tungo/models/financial_notes_table_row_item_item.rbs +12 -0
- data/sig/tungo/models/financial_notes_to_fill.rbs +15 -0
- data/sig/tungo/models/form_missing_action.rbs +17 -0
- data/sig/tungo/models/form_missing_data.rbs +17 -0
- data/sig/tungo/models/form_onec_object.rbs +13 -0
- data/sig/tungo/models/get_workspace_platform_audit_response.rbs +13 -0
- data/sig/tungo/models/get_workspace_platform_ledger_response.rbs +13 -0
- data/sig/tungo/models/isna_file.rbs +11 -0
- data/sig/tungo/models/isna_response.rbs +12 -0
- data/sig/tungo/models/isna_summary.rbs +28 -0
- data/sig/tungo/models/isna_summary_download.rbs +13 -0
- data/sig/tungo/models/isna_summary_format.rbs +14 -0
- data/sig/tungo/models/isna_summary_period.rbs +15 -0
- data/sig/tungo/models/isna_summary_reconciliation.rbs +13 -0
- data/sig/tungo/models/list_companies_response.rbs +12 -0
- data/sig/tungo/models/list_company_automations_hooks_response.rbs +12 -0
- data/sig/tungo/models/list_company_automations_runs_response.rbs +13 -0
- data/sig/tungo/models/list_company_automations_scenarios_response.rbs +12 -0
- data/sig/tungo/models/list_usage_rates_response.rbs +12 -0
- data/sig/tungo/models/list_workspace_platform_requests_response.rbs +13 -0
- data/sig/tungo/models/list_workspace_webhooks_endpoint_attempts_response.rbs +13 -0
- data/sig/tungo/models/list_workspace_webhooks_endpoint_attempts_status.rbs +15 -0
- data/sig/tungo/models/list_workspace_webhooks_endpoints_response.rbs +13 -0
- data/sig/tungo/models/list_workspace_webhooks_event_types_response.rbs +12 -0
- data/sig/tungo/models/list_workspace_webhooks_message_attempts_response.rbs +13 -0
- data/sig/tungo/models/list_workspace_webhooks_messages_response.rbs +13 -0
- data/sig/tungo/models/list_workspaces_response.rbs +12 -0
- data/sig/tungo/models/money.rbs +14 -0
- data/sig/tungo/models/my_workspace.rbs +16 -0
- data/sig/tungo/models/my_workspace_kind.rbs +14 -0
- data/sig/tungo/models/one_c_capability.rbs +15 -0
- data/sig/tungo/models/one_c_capability_id.rbs +20 -0
- data/sig/tungo/models/one_c_capability_status.rbs +15 -0
- data/sig/tungo/models/one_c_gateway.rbs +15 -0
- data/sig/tungo/models/one_c_status.rbs +15 -0
- data/sig/tungo/models/one_c_status_last_check.rbs +16 -0
- data/sig/tungo/models/one_c_status_last_check_verdict.rbs +14 -0
- data/sig/tungo/models/pay_form.rbs +15 -0
- data/sig/tungo/models/payment_method.rbs +17 -0
- data/sig/tungo/models/platform_account.rbs +20 -0
- data/sig/tungo/models/platform_account_blocked_reason.rbs +14 -0
- data/sig/tungo/models/platform_account_purchase_limits.rbs +14 -0
- data/sig/tungo/models/platform_auto_reload.rbs +15 -0
- data/sig/tungo/models/platform_ledger_entry.rbs +21 -0
- data/sig/tungo/models/platform_ledger_entry_kind.rbs +15 -0
- data/sig/tungo/models/platform_limits.rbs +14 -0
- data/sig/tungo/models/platform_limits_concurrent_turns.rbs +13 -0
- data/sig/tungo/models/platform_limits_files.rbs +20 -0
- data/sig/tungo/models/platform_limits_rate.rbs +13 -0
- data/sig/tungo/models/platform_limits_rate_key.rbs +14 -0
- data/sig/tungo/models/platform_limits_rate_workspace.rbs +14 -0
- data/sig/tungo/models/platform_purchase.rbs +15 -0
- data/sig/tungo/models/platform_purchase_input.rbs +13 -0
- data/sig/tungo/models/platform_purchase_status.rbs +21 -0
- data/sig/tungo/models/platform_request.rbs +23 -0
- data/sig/tungo/models/platform_settings_input.rbs +14 -0
- data/sig/tungo/models/platform_settings_input_auto_reload.rbs +15 -0
- data/sig/tungo/models/platform_usage.rbs +18 -0
- data/sig/tungo/models/platform_usage_by_company_item.rbs +18 -0
- data/sig/tungo/models/platform_usage_by_day_item.rbs +18 -0
- data/sig/tungo/models/platform_usage_by_key_item.rbs +18 -0
- data/sig/tungo/models/platform_usage_by_model_item.rbs +18 -0
- data/sig/tungo/models/platform_usage_totals.rbs +17 -0
- data/sig/tungo/models/proposal_account.rbs +15 -0
- data/sig/tungo/models/proposal_action.rbs +19 -0
- data/sig/tungo/models/proposal_action_action.rbs +14 -0
- data/sig/tungo/models/proposal_advance_offset.rbs +16 -0
- data/sig/tungo/models/proposal_approval.rbs +15 -0
- data/sig/tungo/models/proposal_card.rbs +42 -0
- data/sig/tungo/models/proposal_contract.rbs +16 -0
- data/sig/tungo/models/proposal_decision.rbs +18 -0
- data/sig/tungo/models/proposal_document.rbs +14 -0
- data/sig/tungo/models/proposal_header.rbs +24 -0
- data/sig/tungo/models/proposal_history_event.rbs +16 -0
- data/sig/tungo/models/proposal_kind.rbs +22 -0
- data/sig/tungo/models/proposal_line.rbs +23 -0
- data/sig/tungo/models/proposal_line_item.rbs +13 -0
- data/sig/tungo/models/proposal_line_section.rbs +13 -0
- data/sig/tungo/models/proposal_list_item.rbs +30 -0
- data/sig/tungo/models/proposal_page.rbs +15 -0
- data/sig/tungo/models/proposal_party.rbs +14 -0
- data/sig/tungo/models/proposal_posting.rbs +16 -0
- data/sig/tungo/models/proposal_result.rbs +15 -0
- data/sig/tungo/models/proposal_source.rbs +13 -0
- data/sig/tungo/models/proposal_source_channel.rbs +16 -0
- data/sig/tungo/models/proposal_status.rbs +19 -0
- data/sig/tungo/models/reject_request.rbs +13 -0
- data/sig/tungo/models/statement_day.rbs +22 -0
- data/sig/tungo/models/statement_day_counts.rbs +17 -0
- data/sig/tungo/models/statement_day_kind.rbs +15 -0
- data/sig/tungo/models/statement_day_list.rbs +13 -0
- data/sig/tungo/models/tax_form_cell.rbs +23 -0
- data/sig/tungo/models/tax_form_cell_cause.rbs +18 -0
- data/sig/tungo/models/tax_form_cell_diff.rbs +12 -0
- data/sig/tungo/models/tax_form_cell_one_c_value.rbs +12 -0
- data/sig/tungo/models/tax_form_cell_ours_value.rbs +12 -0
- data/sig/tungo/models/tax_form_cell_status.rbs +15 -0
- data/sig/tungo/models/tax_form_cell_type.rbs +16 -0
- data/sig/tungo/models/tax_form_due.rbs +20 -0
- data/sig/tungo/models/tax_form_list_item.rbs +22 -0
- data/sig/tungo/models/tax_form_list_item_coverage.rbs +13 -0
- data/sig/tungo/models/tax_form_list_item_group.rbs +15 -0
- data/sig/tungo/models/tax_form_list_item_required.rbs +12 -0
- data/sig/tungo/models/tax_form_only_in_one_c.rbs +13 -0
- data/sig/tungo/models/tax_form_period.rbs +16 -0
- data/sig/tungo/models/tax_form_reference.rbs +15 -0
- data/sig/tungo/models/tax_form_totals.rbs +15 -0
- data/sig/tungo/models/tax_form_view.rbs +26 -0
- data/sig/tungo/models/tax_form_view_coverage.rbs +13 -0
- data/sig/tungo/models/tax_form_view_uncovered.rbs +13 -0
- data/sig/tungo/models/tax_form_view_uncovered_cell_item.rbs +13 -0
- data/sig/tungo/models/tax_forms_year.rbs +15 -0
- data/sig/tungo/models/tax_period_kind.rbs +16 -0
- data/sig/tungo/models/tax_period_ref.rbs +13 -0
- data/sig/tungo/models/usage_rate.rbs +17 -0
- data/sig/tungo/models/webhook_attempt.rbs +20 -0
- data/sig/tungo/models/webhook_attempt_status.rbs +15 -0
- data/sig/tungo/models/webhook_attempt_trigger.rbs +13 -0
- data/sig/tungo/models/webhook_endpoint.rbs +19 -0
- data/sig/tungo/models/webhook_endpoint_create.rbs +16 -0
- data/sig/tungo/models/webhook_endpoint_created.rbs +21 -0
- data/sig/tungo/models/webhook_endpoint_patch.rbs +16 -0
- data/sig/tungo/models/webhook_envelope.rbs +17 -0
- data/sig/tungo/models/webhook_event.rbs +12 -0
- data/sig/tungo/models/webhook_event_api_key_cap_reached.rbs +17 -0
- data/sig/tungo/models/webhook_event_api_key_cap_reached_data.rbs +17 -0
- data/sig/tungo/models/webhook_event_api_key_expiring.rbs +17 -0
- data/sig/tungo/models/webhook_event_api_key_expiring_data.rbs +15 -0
- data/sig/tungo/models/webhook_event_automation_run_completed.rbs +17 -0
- data/sig/tungo/models/webhook_event_automation_run_completed_data.rbs +29 -0
- data/sig/tungo/models/webhook_event_automation_run_completed_data_output_error.rbs +13 -0
- data/sig/tungo/models/webhook_event_automation_run_completed_data_output_value.rbs +12 -0
- data/sig/tungo/models/webhook_event_automation_run_completed_data_proposal_item.rbs +19 -0
- data/sig/tungo/models/webhook_event_automation_run_completed_data_proposal_item_auto.rbs +15 -0
- data/sig/tungo/models/webhook_event_automation_run_completed_data_proposal_item_auto_code.rbs +17 -0
- data/sig/tungo/models/webhook_event_automation_run_failed.rbs +17 -0
- data/sig/tungo/models/webhook_event_automation_run_failed_data.rbs +29 -0
- data/sig/tungo/models/webhook_event_automation_run_failed_data_output_error.rbs +13 -0
- data/sig/tungo/models/webhook_event_automation_run_failed_data_output_value.rbs +12 -0
- data/sig/tungo/models/webhook_event_automation_run_failed_data_proposal_item.rbs +19 -0
- data/sig/tungo/models/webhook_event_automation_run_failed_data_proposal_item_auto.rbs +15 -0
- data/sig/tungo/models/webhook_event_automation_run_failed_data_proposal_item_auto_code.rbs +17 -0
- data/sig/tungo/models/webhook_event_automation_run_notice.rbs +17 -0
- data/sig/tungo/models/webhook_event_automation_run_notice_data.rbs +21 -0
- data/sig/tungo/models/webhook_event_automation_run_notice_data_reason.rbs +15 -0
- data/sig/tungo/models/webhook_event_automation_write_unknown.rbs +17 -0
- data/sig/tungo/models/webhook_event_automation_write_unknown_data.rbs +16 -0
- data/sig/tungo/models/webhook_event_bank_statement_received.rbs +17 -0
- data/sig/tungo/models/webhook_event_bank_statement_received_data.rbs +17 -0
- data/sig/tungo/models/webhook_event_bank_statement_received_data_source.rbs +13 -0
- data/sig/tungo/models/webhook_event_batch_completed.rbs +17 -0
- data/sig/tungo/models/webhook_event_batch_completed_data.rbs +22 -0
- data/sig/tungo/models/webhook_event_batch_completed_data_kind.rbs +13 -0
- data/sig/tungo/models/webhook_event_batch_failed.rbs +17 -0
- data/sig/tungo/models/webhook_event_batch_failed_data.rbs +14 -0
- data/sig/tungo/models/webhook_event_batch_failed_data_kind.rbs +13 -0
- data/sig/tungo/models/webhook_event_chat_turn_completed.rbs +17 -0
- data/sig/tungo/models/webhook_event_chat_turn_completed_data.rbs +17 -0
- data/sig/tungo/models/webhook_event_chat_turn_completed_data_usage.rbs +16 -0
- data/sig/tungo/models/webhook_event_esf_incoming_received.rbs +17 -0
- data/sig/tungo/models/webhook_event_esf_incoming_received_data.rbs +17 -0
- data/sig/tungo/models/webhook_event_onec_connection_changed.rbs +17 -0
- data/sig/tungo/models/webhook_event_onec_connection_changed_data.rbs +16 -0
- data/sig/tungo/models/webhook_event_onec_connection_changed_data_reason.rbs +20 -0
- data/sig/tungo/models/webhook_event_onec_connection_changed_data_state.rbs +13 -0
- data/sig/tungo/models/webhook_event_payment_failed.rbs +17 -0
- data/sig/tungo/models/webhook_event_payment_failed_data.rbs +17 -0
- data/sig/tungo/models/webhook_event_payment_succeeded.rbs +17 -0
- data/sig/tungo/models/webhook_event_payment_succeeded_data.rbs +17 -0
- data/sig/tungo/models/webhook_event_ping.rbs +17 -0
- data/sig/tungo/models/webhook_event_ping_data.rbs +11 -0
- data/sig/tungo/models/webhook_event_platform_balance_exhausted.rbs +17 -0
- data/sig/tungo/models/webhook_event_platform_balance_exhausted_data.rbs +13 -0
- data/sig/tungo/models/webhook_event_platform_balance_low.rbs +17 -0
- data/sig/tungo/models/webhook_event_platform_balance_low_data.rbs +13 -0
- data/sig/tungo/models/webhook_event_platform_cap_threshold_reached.rbs +17 -0
- data/sig/tungo/models/webhook_event_platform_cap_threshold_reached_data.rbs +15 -0
- data/sig/tungo/models/webhook_event_proposal_awaiting_approval.rbs +17 -0
- data/sig/tungo/models/webhook_event_proposal_awaiting_approval_data.rbs +17 -0
- data/sig/tungo/models/webhook_event_proposal_failed.rbs +17 -0
- data/sig/tungo/models/webhook_event_proposal_failed_data.rbs +15 -0
- data/sig/tungo/models/webhook_event_proposal_rejected.rbs +17 -0
- data/sig/tungo/models/webhook_event_proposal_rejected_data.rbs +15 -0
- data/sig/tungo/models/webhook_event_proposal_written.rbs +17 -0
- data/sig/tungo/models/webhook_event_proposal_written_data.rbs +16 -0
- data/sig/tungo/models/webhook_event_type.rbs +15 -0
- data/sig/tungo/models/webhook_message.rbs +15 -0
- data/sig/tungo/models/webhook_resend.rbs +12 -0
- data/sig/tungo/models/webhook_secret.rbs +13 -0
- data/sig/tungo/models/webhook_secret_rotated.rbs +14 -0
- data/sig/tungo/models/webhook_usage.rbs +15 -0
- data/sig/tungo/models/workspace_plan.rbs +14 -0
- data/sig/tungo/resources/api_keys.rbs +12 -0
- data/sig/tungo/resources/automations.rbs +33 -0
- data/sig/tungo/resources/batches.rbs +20 -0
- data/sig/tungo/resources/chat.rbs +21 -0
- data/sig/tungo/resources/companies.rbs +11 -0
- data/sig/tungo/resources/esf.rbs +13 -0
- data/sig/tungo/resources/feed.rbs +12 -0
- data/sig/tungo/resources/forms.rbs +14 -0
- data/sig/tungo/resources/onec.rbs +10 -0
- data/sig/tungo/resources/platform.rbs +19 -0
- data/sig/tungo/resources/proposals.rbs +15 -0
- data/sig/tungo/resources/webhooks.rbs +26 -0
- data/sig/tungo/resources/workspaces.rbs +10 -0
- data/sig/tungo/resources.rbs +25 -0
- data/sig/tungo/runtime.rbs +392 -0
- metadata +1110 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: c415a9a9702c830f7036d0f2331956c57bfcfb84e75e55069491d26433335903
|
|
4
|
+
data.tar.gz: 32dee197f111c665c358d3a4420282e997cff09c1591a204dfc59e9cb5b71526
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: e6ca9fc4de6f8069f52c786140699f17af038928276c8fd07f099b44e37a7ac2efa5268e9f572f4b61d1dab7093a9cd68bd66d6036383b3917fd67a54b39bfb7
|
|
7
|
+
data.tar.gz: d6be717d231df82023c2b2117b512806e18522db02424b2efa5522814ddbae60e0557fb3b4bd84c19f14a15f4733d1dcc698513093f1f64a91c170daffb4a687
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Tungo SDK for Ruby are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
<!-- Generated by tungo-sdkgen: edit changelogReleases in the generator, not this file. -->
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
## [0.2.0] - 2026-11-12
|
|
13
|
+
|
|
14
|
+
First production-ready release. It contains breaking changes compared with 0.1.0; 0.1.0 should not be used.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Requests and responses use typed models generated from the API contract.
|
|
19
|
+
- Errors are classified by the `error.type` of the API error envelope, with the HTTP status as a fallback; the `hint` field, which the API never sent, is removed.
|
|
20
|
+
- Retries happen only for requests that are safe to repeat (idempotent methods, or requests carrying an `Idempotency-Key`), with jittered exponential backoff that honours `retry-after-ms` and `Retry-After`.
|
|
21
|
+
- Timeouts cover the whole request, are configurable per client and per request, and combine with caller-supplied cancellation.
|
|
22
|
+
- Server-sent events are delivered incrementally; closing or abandoning a stream closes the connection.
|
|
23
|
+
- List methods return typed pages and offer an auto-paging iterator.
|
|
24
|
+
- Webhook verification enforces the timestamp tolerance against the system clock and reports every failure as a typed error.
|
|
25
|
+
- Money helpers parse decimal strings exactly; tiyn amounts are 64-bit integers.
|
|
26
|
+
- The default base URL is `https://api.tungo.kz`; it can be set with `TUNGO_BASE_URL`.
|
|
27
|
+
|
|
28
|
+
## [0.1.0] - 2026-11-09
|
|
29
|
+
|
|
30
|
+
Initial preview. Not suitable for production use.
|
|
31
|
+
|
|
32
|
+
[Unreleased]: https://github.com/TungoAI/tungo-sdk-ruby/compare/v0.2.0...HEAD
|
|
33
|
+
[0.2.0]: https://github.com/TungoAI/tungo-sdk-ruby/compare/v0.1.0...v0.2.0
|
|
34
|
+
[0.1.0]: https://github.com/TungoAI/tungo-sdk-ruby/releases/tag/v0.1.0
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tungo AI (https://tungo.kz)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
<!-- Generated by tungo-sdkgen. Do not edit: the file is rewritten on every generation. -->
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<picture>
|
|
6
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/TungoAI/.github/main/assets/logo02.svg" />
|
|
7
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/TungoAI/.github/main/assets/logo03.svg" />
|
|
8
|
+
<img alt="Tungo AI" src="https://raw.githubusercontent.com/TungoAI/.github/main/assets/logo03.svg" width="240" />
|
|
9
|
+
</picture>
|
|
10
|
+
|
|
11
|
+
# Tungo SDK for Ruby
|
|
12
|
+
|
|
13
|
+
**The official Ruby library for the Tungo Platform API**
|
|
14
|
+
|
|
15
|
+
[](https://rubygems.org/gems/tungo-sdk)
|
|
16
|
+
[](https://github.com/TungoAI/tungo-sdk-ruby/actions/workflows/ci.yml)
|
|
17
|
+
[](https://github.com/TungoAI/tungo-sdk-ruby/blob/main/LICENSE)
|
|
18
|
+
|
|
19
|
+
**English** · [Русский](https://github.com/TungoAI/tungo-sdk-ruby/blob/main/README.ru.md) · [Қазақша](https://github.com/TungoAI/tungo-sdk-ruby/blob/main/README.kk.md)
|
|
20
|
+
|
|
21
|
+
[tungo.kz](https://tungo.kz) · [Quick start](#quick-start) · [API reference](#api-reference) · [Changelog](https://github.com/TungoAI/tungo-sdk-ruby/blob/main/CHANGELOG.md) · [Issues](https://github.com/TungoAI/tungo-sdk-ruby/issues)
|
|
22
|
+
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
The official Ruby library for the Tungo Platform API (`https://api.tungo.kz`): the AI accountant, 1C integration, bank statements, e-invoices, tax forms and automations of [Tungo AI](https://tungo.kz).
|
|
28
|
+
|
|
29
|
+
It is generated from the API's OpenAPI contract, so its methods and models always match the contract it was built from.
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
Ruby 3.2 or newer; the test suite runs on Ruby 3.2, 3.3, 3.4, 4.0. HTTP goes through `Net::HTTP` from the standard library with persistent connections. The only runtime dependencies are `base64` and `bigdecimal`, default gems that newer Rubies load only when they are declared. RBS signatures for the whole public API ship in `sig/`.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
bundle add tungo-sdk
|
|
39
|
+
# or
|
|
40
|
+
gem install tungo-sdk
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Load it with `require "tungo"` (Bundler's automatic require works too; `require "tungo-sdk"` is an alias).
|
|
44
|
+
|
|
45
|
+
## Quick start
|
|
46
|
+
|
|
47
|
+
```ruby
|
|
48
|
+
require "tungo"
|
|
49
|
+
|
|
50
|
+
client = Tungo::Client.new(api_key: ENV.fetch("TUNGO_API_KEY"), company_id: "co_01h455vb4pex5vsknk084sn02q")
|
|
51
|
+
|
|
52
|
+
result = client.ask("Покажи дебиторку за октябрь")
|
|
53
|
+
puts result.answer
|
|
54
|
+
puts "dialog #{result.dialog_id}"
|
|
55
|
+
|
|
56
|
+
client.companies.list.data.each { |company| puts company.name }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Authentication and configuration
|
|
60
|
+
|
|
61
|
+
Create one client and share it: it is immutable and safe to use from several threads or tasks. Every option can be passed explicitly; five of them fall back to environment variables.
|
|
62
|
+
|
|
63
|
+
| Option | Environment variable | Default |
|
|
64
|
+
| --- | --- | --- |
|
|
65
|
+
| API key | `TUNGO_API_KEY` | none |
|
|
66
|
+
| Base URL | `TUNGO_BASE_URL` | `https://api.tungo.kz` |
|
|
67
|
+
| Webhook secret | `TUNGO_WEBHOOK_SECRET` | none |
|
|
68
|
+
| Default company | `TUNGO_COMPANY_ID` | none |
|
|
69
|
+
| Default workspace | `TUNGO_WORKSPACE_ID` | none |
|
|
70
|
+
| Timeout | | 60 s (600 s for non-streaming chat turns) |
|
|
71
|
+
| Maximum retries | | 2 |
|
|
72
|
+
| Default headers, HTTP client | | none, built-in |
|
|
73
|
+
|
|
74
|
+
The API key is sent only to operations that require it; public endpoints and incoming hooks never receive it, and it never appears in error messages or debug output. Calling an authenticated operation without a key fails locally, before any request is made.
|
|
75
|
+
|
|
76
|
+
Every method also accepts per-request options: timeout, maximum retries, extra headers, an idempotency key and cancellation.
|
|
77
|
+
|
|
78
|
+
```ruby
|
|
79
|
+
client = Tungo::Client.new(
|
|
80
|
+
api_key: ENV.fetch("TUNGO_API_KEY"), # default: ENV["TUNGO_API_KEY"]
|
|
81
|
+
base_url: ENV.fetch("TUNGO_BASE_URL"), # default: ENV["TUNGO_BASE_URL"], then the production API
|
|
82
|
+
webhook_secret: "whsec_c2VjcmV0", # default: ENV["TUNGO_WEBHOOK_SECRET"]
|
|
83
|
+
company_id: "co_01h455vb4pex5vsknk084sn02q",
|
|
84
|
+
workspace_id: "ws_01h455vb4pex5vsknk084sn02q",
|
|
85
|
+
timeout: 60,
|
|
86
|
+
max_retries: 2,
|
|
87
|
+
default_headers: { "X-App" => "billing" }
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# Per-request options
|
|
91
|
+
dialog = client.chat.get(
|
|
92
|
+
"0b5f6a0e-6a1c-4d55-9a57-2f1d8b9c3e10",
|
|
93
|
+
request_options: { timeout: 10, max_retries: 0, extra_headers: { "X-Trace" => "abc" } }
|
|
94
|
+
)
|
|
95
|
+
puts dialog.api_response.request_id
|
|
96
|
+
puts dialog.api_response.rate_limit&.remaining
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Parameters are keyword arguments: path ids are positional, everything else is named. `nil` and "not given" are different: `nil` is sent as JSON `null` where the API accepts it, an argument you leave out is not sent at all. Company-scoped methods use the client's `company_id` unless you pass `company_id:` to the call (the same goes for `workspace_id`); the two defaults also fall back to `TUNGO_COMPANY_ID` and `TUNGO_WORKSPACE_ID`.
|
|
100
|
+
|
|
101
|
+
Every result exposes the HTTP response it came from through `api_response` (status, headers, request id, rate-limit headers of that very response); operations without a response body return it directly. To cancel a call, interrupt its thread (`Thread#raise`, `Thread#kill`, `Timeout.timeout`): sockets and back-off sleeps are interruptible and the connection is closed.
|
|
102
|
+
|
|
103
|
+
The API key must be printable ASCII without spaces or line breaks: a key read from a file with its trailing newline is refused with `Tungo::ConfigError` when the client is built (the key itself is never printed). `default_headers:` that carry credentials (`Authorization`, `X-Api-Key`, `Proxy-Authorization`, `Cookie`) are sent only to operations authenticated with the API key, never to `POST /hooks/{token}` or to public endpoints; a header given for one call through `request_options: { extra_headers: ... }` is always sent.
|
|
104
|
+
|
|
105
|
+
`client.close` closes the pooled connections. `Tungo::Client.new(transport: Tungo::Transport::NetHTTP.new(proxy: "http://proxy:8080") { |http| http.ca_file = "ca.pem" })` customises the connections; any object with the same `execute` method can replace the transport.
|
|
106
|
+
|
|
107
|
+
## Errors
|
|
108
|
+
|
|
109
|
+
Every failure is a subtype of the SDK's base error. An HTTP error response becomes an API error chosen by the `error.type` field of the response body, falling back to the HTTP status when the body is not the API's error envelope:
|
|
110
|
+
|
|
111
|
+
| `error.type` | Status |
|
|
112
|
+
| --- | --- |
|
|
113
|
+
| `invalid_request_error` | 400 |
|
|
114
|
+
| `authentication_error` | 401 |
|
|
115
|
+
| `payment_required_error` | 402 |
|
|
116
|
+
| `permission_error` | 403 |
|
|
117
|
+
| `not_found_error` | 404 |
|
|
118
|
+
| `conflict_error` | 409 |
|
|
119
|
+
| `gone_error` | 410 |
|
|
120
|
+
| `limit_error` | 429 |
|
|
121
|
+
| `api_error` | 500 |
|
|
122
|
+
| `unavailable_error` | 503 |
|
|
123
|
+
|
|
124
|
+
An API error carries the status, type, code, message, request id, field errors, the parsed retry-after delay, the response headers and the raw body. Problems that happen without a response have their own types: connection error, timeout, decode error (a successful response whose body is not valid), and configuration or validation error (raised before any request).
|
|
125
|
+
|
|
126
|
+
```ruby
|
|
127
|
+
begin
|
|
128
|
+
client.proposals.approve("P-000042")
|
|
129
|
+
rescue Tungo::LimitError => e
|
|
130
|
+
warn "Limit reached, retry in #{e.retry_after} s"
|
|
131
|
+
rescue Tungo::InvalidRequestError => e
|
|
132
|
+
e.fields.each { |field| warn "#{field.path}: #{field.message}" }
|
|
133
|
+
rescue Tungo::APIError => e
|
|
134
|
+
warn "#{e.status} #{e.type} #{e.code}: #{e.api_message} (request #{e.request_id})"
|
|
135
|
+
rescue Tungo::TimeoutError, Tungo::ConnectionError => e
|
|
136
|
+
warn "Network problem: #{e.message}"
|
|
137
|
+
end
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The class names are `Tungo::InvalidRequestError`, `AuthenticationError`, `PaymentRequiredError`, `PermissionError`, `NotFoundError`, `ConflictError`, `GoneError`, `LimitError`, `ServerError` (`api_error`) and `UnavailableError`, all subclasses of `Tungo::APIError`. Without a response the SDK raises `Tungo::ConnectionError`, `Tungo::TimeoutError`, `Tungo::DecodeError`, `Tungo::ConfigError` or `Tungo::ValidationError`; all of them inherit from `Tungo::Error`, and the original exception is kept in `cause`.
|
|
141
|
+
|
|
142
|
+
`Tungo::DecodeError` means the API answered with a success status but the body could not be used: it is not JSON, it is empty, a declared property has the wrong JSON kind (a string where the contract says number, an object where it says array, and so on), a stream call was answered with something other than `text/event-stream`, or a chat stream ended before its `done` event. The check of kinds is deliberately light: only the properties of the top-level object, and `null`, missing properties, unknown properties and unknown enumeration values are always accepted. The error carries `api_response` and the raw `body`. The request itself was accepted by the server, so do not repeat a write because of it.
|
|
143
|
+
|
|
144
|
+
`client.ask` raises the typed `Tungo::APIError` when the turn reports an error in its `errors` list; pass `raise_on_error: false` to get the result with the errors instead.
|
|
145
|
+
|
|
146
|
+
## Retries and timeouts
|
|
147
|
+
|
|
148
|
+
A request is retried up to 2 times (3 attempts) on connection errors, timeouts and the statuses 408, 429, 500, 502, 503 and 504, but only when repeating it is safe: `GET`, `HEAD`, `PUT` and `DELETE` requests, and `POST` or `PATCH` requests that carry an `Idempotency-Key`. For the operations whose contract declares that header the SDK generates a random key and reuses it for every attempt; you can pass your own.
|
|
149
|
+
|
|
150
|
+
The delay between attempts is `min(0.5 s × 2^attempt, 8 s)` with random jitter. A positive `retry-after-ms` or `Retry-After` response header overrides it; if the server asks for more than 60 s the SDK does not wait and raises the error with the delay filled in.
|
|
151
|
+
|
|
152
|
+
The timeout covers the whole request including reading the body. Streaming calls have no total timeout, only a connect timeout and an idle timeout of 120 s. Cancellation supplied by the caller is combined with the timeout.
|
|
153
|
+
|
|
154
|
+
```ruby
|
|
155
|
+
client = Tungo::Client.new(max_retries: 5, timeout: 20)
|
|
156
|
+
|
|
157
|
+
client.companies.list(request_options: { max_retries: 0, timeout: 5 })
|
|
158
|
+
client.proposals.approve("P-000042", request_options: { idempotency_key: "approve-P-000042" })
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
`chat_timeout:` (600 s) is the client-wide timeout of non-streaming chat turns; `connect_timeout:` and `stream_idle_timeout:` apply to streams. A per-request `timeout:` overrides them for one call. The total timeout covers connecting, sending and reading the whole body. A `Retry-After` of zero, a negative one or a date in the past is treated as absent: the SDK waits its normal back-off instead of retrying at once.
|
|
162
|
+
|
|
163
|
+
## Pagination
|
|
164
|
+
|
|
165
|
+
List operations use cursor pagination (`{ data, next_cursor }`). The plain method returns one typed page that knows whether there is a next page and can fetch it. The auto-paging variant is a lazy iterator: it requests the next page only when needed, carries your filters over, and stops fetching as soon as you stop iterating.
|
|
166
|
+
|
|
167
|
+
```ruby
|
|
168
|
+
page = client.proposals.list(status: "previewed", limit: 50)
|
|
169
|
+
page.data.each { |proposal| puts proposal.title }
|
|
170
|
+
page = page.next_page if page.next_page?
|
|
171
|
+
|
|
172
|
+
client.proposals.list_all(status: "previewed").each do |proposal|
|
|
173
|
+
puts "#{proposal.id} #{proposal.total.formatted}"
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
first_ten = client.proposals.list_all.first(10)
|
|
177
|
+
puts first_ten.size
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`*_all` returns a plain `Enumerator`, so `first`, `take_while`, `lazy` and friends work and fetch only the pages they need. If the API ever returns a cursor it has already returned during the walk (not only the previous one), a `Tungo::PaginationError` is raised instead of looping forever.
|
|
181
|
+
|
|
182
|
+
## Streaming
|
|
183
|
+
|
|
184
|
+
Streaming operations use server-sent events and deliver typed events as they arrive. Leaving the loop early or closing the stream closes the connection. A stream request is retried only before its first byte; an error response is raised as the same typed API error as for ordinary calls. A chat stream that ends before its final event is reported as an error, never as a finished answer.
|
|
185
|
+
|
|
186
|
+
```ruby
|
|
187
|
+
stream = client.chat.create_stream(message: "Сколько НДС к уплате за III квартал?")
|
|
188
|
+
turn = stream.each_text { |delta| print delta }
|
|
189
|
+
puts
|
|
190
|
+
puts "dialog #{turn.dialog_id}, turn #{turn.turn_no}, stop reason #{turn.stop_reason}"
|
|
191
|
+
|
|
192
|
+
# Or handle every typed event yourself; leaving the block closes the connection.
|
|
193
|
+
client.chat.create_stream(message: "Привет").each do |event|
|
|
194
|
+
case event
|
|
195
|
+
when Tungo::Models::ChatEventText then print event.delta
|
|
196
|
+
when Tungo::Models::ChatEventTool then puts "[#{event.name}]"
|
|
197
|
+
when Tungo::Models::ChatEventDone then break
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
All five streaming operations work the same way: `chat.create_stream`, `chat.answer_stream`, `chat.list_events`, `batches.list_events` (typed `ChatEvent` variants, as a `Tungo::ChatStream`) and `feed.list_events` (`FeedItem` objects). Heart-beats are skipped; `each_sse` yields the raw events instead. `accumulate` and `each_text` raise the typed `Tungo::APIError` if the turn reports an error, and `Tungo::DecodeError` ("stream ended before completion") if the stream ends with neither a `done` nor an `error` event, so a cut answer never looks like a finished turn; plain `each` simply ends. A success answer whose `Content-Type` is not `text/event-stream` raises `Tungo::DecodeError` when the stream is opened. A stream can be consumed once; it may be handed to another thread and read or closed there (each request runs on a worker thread of the transport), but not read by two threads at once. Pass `last_event_id:` to resume the pure event streams.
|
|
203
|
+
|
|
204
|
+
## Webhooks
|
|
205
|
+
|
|
206
|
+
Outgoing webhooks are signed according to the Standard Webhooks specification (Svix). The verify helper takes the raw request body and the headers (`webhook-*` or `svix-*`), checks the HMAC-SHA256 signature in constant time and the timestamp within 300 s of the system clock, and returns the typed event. Any problem is reported as a webhook verification error. If no secret is passed, the client's webhook secret is used.
|
|
207
|
+
|
|
208
|
+
The send-hook helper posts an event to an incoming hook (`/hooks/{token}`) and, when given a secret, signs the exact bytes it sends in the `X-Signature: sha256=<hex>` header. The API key is never sent to hooks.
|
|
209
|
+
|
|
210
|
+
```ruby
|
|
211
|
+
# In a Rack or Rails endpoint: pass the raw body and the request headers.
|
|
212
|
+
event = client.verify_webhook(request.body.read, request.env)
|
|
213
|
+
case event
|
|
214
|
+
when Tungo::Models::WebhookEventProposalWritten
|
|
215
|
+
puts "Proposal #{event.data.proposal_id} was written"
|
|
216
|
+
else
|
|
217
|
+
puts "Unhandled event #{event.type}"
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Send an event to an incoming hook, signed with the hook's secret.
|
|
221
|
+
accepted = client.send_hook("th_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
|
222
|
+
{ id: "order_1532", amount_tiyn: 4_500_000 }, secret: "hksec_secret")
|
|
223
|
+
puts accepted.event_id
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
`Tungo::Webhooks.verify_webhook(payload, headers, secret)` does the same without a client. Headers can be a Hash, a Rack env or any header collection. `Tungo::Webhooks.verify_hook_signature(body, signature, secret)` checks the `X-Signature` of an incoming hook on your side.
|
|
227
|
+
|
|
228
|
+
## Money
|
|
229
|
+
|
|
230
|
+
The API expresses amounts in tiyn (1/100 of a tenge) as 64-bit integers. The money helper converts decimal strings and exact decimal values to tiyn without floating-point error, rounding half away from zero (`"1.005"` → `101`), and formats tiyn for display (`4500000` → `45 000,00 ₸`). Invalid input raises a typed error.
|
|
231
|
+
|
|
232
|
+
```ruby
|
|
233
|
+
Tungo::Money.to_tiyn("1.005") # => 101
|
|
234
|
+
Tungo::Money.to_tiyn(BigDecimal("45000.5")) # => 4_500_050
|
|
235
|
+
Tungo::Money.format_tiyn(4_500_000) # => "45 000,00 ₸"
|
|
236
|
+
Tungo::Money.format_tiyn(-50, "USD") # => "-0,50 $"
|
|
237
|
+
Tungo::Money.to_tenge(4_500_050) # => BigDecimal("45000.5")
|
|
238
|
+
Tungo::Money.valid_bin_iin?("990140000017") # => true
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Numbers with a fraction in API responses (such as `Money#amount`) are parsed as `BigDecimal`, never as `Float`, and a `BigDecimal` you pass in is sent digit for digit. `to_tiyn` also accepts `Integer`, `Rational` and, for convenience, `Float` (converted through its shortest decimal representation). Invalid input raises `Tungo::MoneyError`.
|
|
242
|
+
|
|
243
|
+
## Models
|
|
244
|
+
|
|
245
|
+
Every schema of the contract is a class under `Tungo::Models`: an immutable value object with typed readers.
|
|
246
|
+
|
|
247
|
+
```ruby
|
|
248
|
+
company = client.companies.get
|
|
249
|
+
company.name # typed reader
|
|
250
|
+
company[:some_new_field] # a field this SDK version does not know yet
|
|
251
|
+
company.key?(:bin) # present (even when null) or absent?
|
|
252
|
+
company.to_h # plain Ruby data with symbol keys
|
|
253
|
+
company.to_json # exactly what travels on the wire
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Enumerations are modules with one constant per known value (`Tungo::Models::ProposalStatus::PREVIEWED`); the readers return plain strings, so a value added by a newer API passes through. Unions with a discriminator (`ChatEvent`, `WebhookEvent`, ...) decode to the matching variant class and to `Tungo::UnknownVariant` for a variant this version does not know.
|
|
257
|
+
|
|
258
|
+
## Long-running helpers
|
|
259
|
+
|
|
260
|
+
```ruby
|
|
261
|
+
run = client.run_scenario_and_wait("scn_01h455vb4pex5vsknk084sn02q", timeout: 300)
|
|
262
|
+
puts run.state
|
|
263
|
+
|
|
264
|
+
job = client.upload_bank_statement(Pathname("kl_to_1c.txt"))
|
|
265
|
+
job = client.wait_for_batch(job.id)
|
|
266
|
+
puts job.running
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
The wait helpers poll with a pause that grows from 1 s to 5 s and raise `Tungo::WaitTimeoutError` (a `Tungo::TimeoutError`) when the deadline (`timeout:`, 600 s by default) passes. `send_hook` and `automations.post_hook` send the `event_id` you pass as the `Idempotency-Key`, and a random UUID when you pass none.
|
|
270
|
+
|
|
271
|
+
## API reference
|
|
272
|
+
|
|
273
|
+
Generated from the Tungo Platform API contract: **13 resources, 82 methods, 22 webhook event types**.
|
|
274
|
+
|
|
275
|
+
| Resource | Description | Methods |
|
|
276
|
+
| --- | --- | --- |
|
|
277
|
+
| `client.workspaces` | Organisations (workspaces) the API key can access | `list` |
|
|
278
|
+
| `client.companies` | Companies of an organisation and their profiles | `list` · `get` |
|
|
279
|
+
| `client.platform` | Platform balance, ledger, usage reports, limits, audit log and model rates | `list_usage_rates` · `get_account` · `get_audit / get_audit_all` · `get_ledger / get_ledger_all` · `list_limits` · `list_requests / list_requests_all` · `get_usage` |
|
|
280
|
+
| `client.api_keys` | The current API key and its usage statistics | `get_current` · `get_current_usage` · `get_usage` |
|
|
281
|
+
| `client.webhooks` | Outgoing webhooks of an organisation (Svix): endpoints, event catalogue, deliveries and signature check | `list_endpoints / list_endpoints_all` · `create_endpoint` · `get_endpoint` · `update_endpoint` · `delete_endpoint` · `list_endpoint_attempts / list_endpoint_attempts_all` · `rotate_endpoint_secret` · `test_endpoint` · `list_event_types` · `list_messages / list_messages_all` · `list_message_attempts / list_message_attempts_all` · `resend_message` · `get_usage` |
|
|
282
|
+
| `client.chat` | Conversations with the AI accountant: questions, streaming chat (SSE), token counting and history | `list / list_all` · `create / create_stream` · `count_tokens` · `get` · `update` · `delete` · `answer / answer_stream` · `list_events` · `stop` |
|
|
283
|
+
| `client.proposals` | Documents proposed by the AI accountant: review, approval for posting to 1C, and rejection | `list / list_all` · `approve_batch` · `get` · `approve` · `reject` |
|
|
284
|
+
| `client.feed` | The company's feed of events and proposals (pages and a live SSE stream) | `get / get_all` · `list_events` |
|
|
285
|
+
| `client.batches` | Processing batches for bank statements, incoming e-invoices and DirectBank | `list / list_all` · `create_bank_statement` · `create_esf_purchases` · `get` · `list_events` · `stop` · `get_summary` · `list_statements / list_statements_all` · `poll_directbank` |
|
|
286
|
+
| `client.esf` | Incoming and outgoing electronic invoices (the ESF system) | `get_incoming / get_incoming_all` · `get_outgoing / get_outgoing_all` |
|
|
287
|
+
| `client.forms` | Tax forms (FNO 100.00 and others): building, ISNA checks and data gaps | `list` · `build` · `list_data_gaps` · `get_isna` · `list_notes` |
|
|
288
|
+
| `client.onec` | Status of the company's connection to its 1C database | `get_status` |
|
|
289
|
+
| `client.automations` | Company automations: incoming hooks, scenarios, step chains, runs and the AI autonomy level | `post_hook` · `list_hooks` · `create_hook` · `get_hook` · `update_hook` · `delete_hook` · `rotate_hook` · `test_hook` · `list_runs / list_runs_all` · `get_run` · `cancel_run` · `retry_run` · `list_scenarios` · `create_scenario` · `get_scenario` · `put_scenario` · `update_scenario` · `delete_scenario` · `run_scenario` · `get_state` · `put_state` · `get_autonomy` · `put_autonomy` |
|
|
290
|
+
|
|
291
|
+
## Other SDKs
|
|
292
|
+
|
|
293
|
+
The same API is available in ten languages. All SDKs are generated from one contract and behave the same way.
|
|
294
|
+
|
|
295
|
+
| Language | Repository | Package |
|
|
296
|
+
| --- | --- | --- |
|
|
297
|
+
| TypeScript | [tungo-sdk-typescript](https://github.com/TungoAI/tungo-sdk-typescript) | `@tungoai/sdk` |
|
|
298
|
+
| Python | [tungo-sdk-python](https://github.com/TungoAI/tungo-sdk-python) | `tungoai` |
|
|
299
|
+
| Go | [tungo-sdk-go](https://github.com/TungoAI/tungo-sdk-go) | `github.com/TungoAI/tungo-sdk-go` |
|
|
300
|
+
| Rust | [tungo-sdk-rust](https://github.com/TungoAI/tungo-sdk-rust) | `tungo-sdk` |
|
|
301
|
+
| PHP | [tungo-sdk-php](https://github.com/TungoAI/tungo-sdk-php) | `tungo/sdk` |
|
|
302
|
+
| Java | [tungo-sdk-java](https://github.com/TungoAI/tungo-sdk-java) | `kz.tungo:tungo-sdk` |
|
|
303
|
+
| Kotlin | [tungo-sdk-kotlin](https://github.com/TungoAI/tungo-sdk-kotlin) | `kz.tungo:tungo-sdk-kotlin` |
|
|
304
|
+
| Swift | [tungo-sdk-swift](https://github.com/TungoAI/tungo-sdk-swift) | `TungoSDK` |
|
|
305
|
+
| **Ruby** | [tungo-sdk-ruby](https://github.com/TungoAI/tungo-sdk-ruby) | `tungo-sdk` |
|
|
306
|
+
| .NET | [tungo-sdk-dotnet](https://github.com/TungoAI/tungo-sdk-dotnet) | `Tungo.Sdk` |
|
|
307
|
+
|
|
308
|
+
## Versioning and support
|
|
309
|
+
|
|
310
|
+
This library follows [Semantic Versioning](https://semver.org/). While the major version is 0, a minor release may contain breaking changes; they are always listed in the [changelog](https://github.com/TungoAI/tungo-sdk-ruby/blob/main/CHANGELOG.md). This README describes version 0.2.0.
|
|
311
|
+
|
|
312
|
+
The code is generated: please report problems and ideas in the [issue tracker](https://github.com/TungoAI/tungo-sdk-ruby/issues) rather than opening pull requests against generated files. To report a vulnerability, follow the [security policy](https://github.com/TungoAI/tungo-sdk-ruby/blob/main/SECURITY.md).
|
|
313
|
+
|
|
314
|
+
## License
|
|
315
|
+
|
|
316
|
+
[MIT](https://github.com/TungoAI/tungo-sdk-ruby/blob/main/LICENSE)
|
data/SECURITY.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
Security fixes are released for the latest minor version of the Tungo SDK for Ruby. Upgrade to the newest release before reporting a problem.
|
|
6
|
+
|
|
7
|
+
## Reporting a vulnerability
|
|
8
|
+
|
|
9
|
+
Please do not open a public issue for a security problem.
|
|
10
|
+
|
|
11
|
+
Report it privately through GitHub: https://github.com/TungoAI/tungo-sdk-ruby/security/advisories/new
|
|
12
|
+
|
|
13
|
+
Include the SDK version, the runtime version, and the smallest example that shows the problem. Never include a real API key or webhook secret in a report; if a key was exposed, revoke it in the Tungo console first.
|
|
14
|
+
|
|
15
|
+
You will get an acknowledgement within five working days. We will agree on a disclosure date with you and credit you in the release notes unless you prefer otherwise.
|
|
16
|
+
|
|
17
|
+
## Scope
|
|
18
|
+
|
|
19
|
+
This policy covers the code in this repository. Problems in the Tungo API itself should be reported the same way; they will be routed to the platform team.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Tungo
|
|
4
|
+
# The rate-limit headers of one response.
|
|
5
|
+
#
|
|
6
|
+
# @!attribute limit
|
|
7
|
+
# @return [Integer, nil] requests allowed in the current window (+x-ratelimit-limit+)
|
|
8
|
+
# @!attribute remaining
|
|
9
|
+
# @return [Integer, nil] requests left in the current window (+x-ratelimit-remaining+)
|
|
10
|
+
# @!attribute reset
|
|
11
|
+
# @return [Integer, nil] seconds until the next window (+x-ratelimit-reset+)
|
|
12
|
+
RateLimit = Data.define(:limit, :remaining, :reset) do
|
|
13
|
+
# @return [Tungo::RateLimit, nil] nil when the response carries none of the headers
|
|
14
|
+
def self.from_headers(headers)
|
|
15
|
+
values = %w[x-ratelimit-limit x-ratelimit-remaining x-ratelimit-reset].map do |name|
|
|
16
|
+
text = headers[name].to_s.strip
|
|
17
|
+
text.match?(/\A-?[0-9]+\z/) ? text.to_i : nil
|
|
18
|
+
end
|
|
19
|
+
values.all?(&:nil?) ? nil : new(*values)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Status and headers of the HTTP response behind a result. Every result exposes it:
|
|
24
|
+
# {Tungo::Model#api_response}, {Tungo::Page#api_response}, {Tungo::Stream#api_response};
|
|
25
|
+
# operations without a response body return it directly.
|
|
26
|
+
#
|
|
27
|
+
# @!attribute status
|
|
28
|
+
# @return [Integer] HTTP status
|
|
29
|
+
# @!attribute headers
|
|
30
|
+
# @return [Hash{String=>String}] response headers with lower-case names
|
|
31
|
+
APIResponse = Data.define(:status, :headers) do
|
|
32
|
+
# @return [String, nil] the value of a header, looked up case-insensitively
|
|
33
|
+
def [](name)
|
|
34
|
+
headers[name.to_s.downcase]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# @return [String, nil] the request id to quote to support (+x-request-id+)
|
|
38
|
+
def request_id
|
|
39
|
+
headers["x-request-id"]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @return [Tungo::RateLimit, nil] the rate-limit headers of this very response
|
|
43
|
+
def rate_limit
|
|
44
|
+
RateLimit.from_headers(headers)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# @return [Boolean] true when the API replayed a stored response for a repeated Idempotency-Key
|
|
48
|
+
def idempotent_replayed?
|
|
49
|
+
headers["idempotent-replayed"] == "true"
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|