pallet_stateful_storage_runtime_api/
lib.rs1#![cfg_attr(not(feature = "std"), no_std)]
2#![allow(clippy::too_many_arguments)]
3#![allow(clippy::unnecessary_mut_passed)]
4#![allow(rustdoc::bare_urls)]
5#![deny(
7 rustdoc::broken_intra_doc_links,
8 rustdoc::missing_crate_level_docs,
9 rustdoc::invalid_codeblock_attributes,
10 missing_docs
11)]
12
13use common_primitives::{
21 msa::MessageSourceId,
22 schema::SchemaId,
23 stateful_storage::{ItemizedStoragePageResponse, PaginatedStorageResponse},
24};
25use sp_runtime::DispatchError;
26extern crate alloc;
27use alloc::vec::Vec;
28
29sp_api::decl_runtime_apis! {
32
33 #[api_version(1)]
37
38 pub trait StatefulStorageRuntimeApi
40 {
41 fn get_paginated_storage(msa_id: MessageSourceId, schema_id: SchemaId) -> Result<Vec<PaginatedStorageResponse>, DispatchError>;
43 fn get_itemized_storage(msa_id: MessageSourceId, schema_id: SchemaId) -> Result<ItemizedStoragePageResponse, DispatchError>;
45 }
46}