20#ifndef ORES_DQ_API_MESSAGING_DATASET_PROTOCOL_HPP
21#define ORES_DQ_API_MESSAGING_DATASET_PROTOCOL_HPP
26#include "ores.dq.api/domain/dataset.hpp"
27#include "ores.dq.api/domain/publication_mode.hpp"
28#include "ores.dq.api/domain/publication_result.hpp"
30namespace ores::dq::messaging {
32struct get_datasets_request {
33 using response_type =
struct get_datasets_response;
34 static constexpr std::string_view nats_subject =
"dq.v1.datasets.list";
39struct get_datasets_response {
40 std::vector<ores::dq::domain::dataset> datasets;
41 int total_available_count = 0;
44struct save_dataset_request {
45 using response_type =
struct save_dataset_response;
46 static constexpr std::string_view nats_subject =
"dq.v1.datasets.save";
47 std::vector<ores::dq::domain::dataset> datasets;
50struct save_dataset_response {
55struct delete_dataset_request {
56 using response_type =
struct delete_dataset_response;
57 static constexpr std::string_view nats_subject =
"dq.v1.datasets.delete";
58 std::vector<std::string> ids;
61struct delete_dataset_response {
66struct get_dataset_history_request {
67 using response_type =
struct get_dataset_history_response;
68 static constexpr std::string_view nats_subject =
"dq.v1.datasets.history";
72struct get_dataset_history_response {
75 std::vector<ores::dq::domain::dataset> history;
78struct publish_datasets_request {
79 using response_type =
struct publish_datasets_response;
80 static constexpr std::string_view nats_subject =
"dq.v1.datasets.publish";
81 std::vector<std::string> dataset_ids;
82 ores::dq::domain::publication_mode mode =
83 ores::dq::domain::publication_mode::upsert;
84 std::string published_by;
85 bool resolve_dependencies =
true;
88struct publish_datasets_response {
91 std::vector<ores::dq::domain::publication_result> results;