ORE Studio 0.0.4
Loading...
Searching...
No Matches
ore_import_engine_protocol.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2026 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_ORE_API_MESSAGING_ORE_IMPORT_ENGINE_PROTOCOL_HPP
21#define ORES_ORE_API_MESSAGING_ORE_IMPORT_ENGINE_PROTOCOL_HPP
22
23#include <string>
24#include <vector>
25#include <string_view>
26#include "ores.ore.api/messaging/ore_import_protocol.hpp"
27
28namespace ores::ore::messaging {
29
42 static constexpr std::string_view nats_subject = "ore.v1.ore.import.execute";
43
44 std::string request_id;
45 std::string import_choices_json;
46 std::string correlation_id;
47 std::string bearer_token;
48};
49
57 bool success = false;
58 std::string message;
59 std::string correlation_id;
60 std::vector<ore_import_item_error> item_errors;
61 std::vector<std::string> saved_currency_iso_codes;
62 std::vector<std::string> saved_portfolio_ids;
63 std::vector<std::string> saved_book_ids;
64 std::vector<std::string> saved_trade_ids;
65};
66
75 static constexpr std::string_view nats_subject = "ore.v1.ore.import.rollback";
76
77 std::string correlation_id;
78 std::string bearer_token;
79 std::vector<std::string> saved_currency_iso_codes;
80 std::vector<std::string> saved_portfolio_ids;
81 std::vector<std::string> saved_book_ids;
82 std::vector<std::string> saved_trade_ids;
83};
84
85}
86
87#endif
Workflow step command: execute the full ORE import.
Definition ore_import_engine_protocol.hpp:41
std::string bearer_token
Caller's JWT — used for delegated NATS calls.
Definition ore_import_engine_protocol.hpp:47
std::string import_choices_json
JSON-serialised import_choices.
Definition ore_import_engine_protocol.hpp:45
std::string request_id
UUID; storage key root for the tarball.
Definition ore_import_engine_protocol.hpp:44
Internal result stored as workflow_step.response_json for step 0.
Definition ore_import_engine_protocol.hpp:56
Workflow compensation command: roll back a completed ORE import.
Definition ore_import_engine_protocol.hpp:74
std::string bearer_token
Caller's JWT — used for delegated NATS calls.
Definition ore_import_engine_protocol.hpp:78