serialization and gitignore in canvas
This commit is contained in:
2
canvas
2
canvas
Submodule canvas updated: 29fdc5a6c7...6f1cda36d8
@@ -20,6 +20,18 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
".komp_ac.table_validation.TableValidationResponse",
|
".komp_ac.table_validation.TableValidationResponse",
|
||||||
"#[derive(serde::Serialize, serde::Deserialize)]",
|
"#[derive(serde::Serialize, serde::Deserialize)]",
|
||||||
)
|
)
|
||||||
|
.type_attribute(
|
||||||
|
".komp_ac.table_validation.PatternRule",
|
||||||
|
"#[derive(serde::Serialize, serde::Deserialize)]",
|
||||||
|
)
|
||||||
|
.type_attribute(
|
||||||
|
".komp_ac.table_validation.PatternRules",
|
||||||
|
"#[derive(serde::Serialize, serde::Deserialize)]",
|
||||||
|
)
|
||||||
|
.type_attribute(
|
||||||
|
".komp_ac.table_validation.CustomFormatter",
|
||||||
|
"#[derive(serde::Serialize, serde::Deserialize)]",
|
||||||
|
)
|
||||||
.type_attribute(
|
.type_attribute(
|
||||||
".komp_ac.table_validation.UpdateFieldValidationRequest",
|
".komp_ac.table_validation.UpdateFieldValidationRequest",
|
||||||
"#[derive(serde::Serialize, serde::Deserialize)]",
|
"#[derive(serde::Serialize, serde::Deserialize)]",
|
||||||
|
|||||||
Binary file not shown.
@@ -26,7 +26,13 @@ pub struct FieldValidation {
|
|||||||
#[prost(message, optional, tag = "10")]
|
#[prost(message, optional, tag = "10")]
|
||||||
pub limits: ::core::option::Option<CharacterLimits>,
|
pub limits: ::core::option::Option<CharacterLimits>,
|
||||||
/// Future expansion:
|
/// Future expansion:
|
||||||
/// PatternRules pattern = 11;
|
///
|
||||||
|
/// Validation 2
|
||||||
|
#[prost(message, optional, tag = "11")]
|
||||||
|
pub pattern: ::core::option::Option<PatternRules>,
|
||||||
|
/// Validation 4 – custom formatting logic
|
||||||
|
#[prost(message, optional, tag = "14")]
|
||||||
|
pub formatter: ::core::option::Option<CustomFormatter>,
|
||||||
#[prost(message, optional, tag = "3")]
|
#[prost(message, optional, tag = "3")]
|
||||||
pub mask: ::core::option::Option<DisplayMask>,
|
pub mask: ::core::option::Option<DisplayMask>,
|
||||||
/// ExternalValidation external = 13;
|
/// ExternalValidation external = 13;
|
||||||
@@ -65,6 +71,46 @@ pub struct DisplayMask {
|
|||||||
#[prost(string, optional, tag = "3")]
|
#[prost(string, optional, tag = "3")]
|
||||||
pub template_char: ::core::option::Option<::prost::alloc::string::String>,
|
pub template_char: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
}
|
}
|
||||||
|
/// One position‑based validation rule, similar to CharacterFilter + PositionRange
|
||||||
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct PatternRule {
|
||||||
|
/// Range descriptor: how far the rule applies
|
||||||
|
/// Examples:
|
||||||
|
/// - "0" → Single position 0
|
||||||
|
/// - "0-3" → Range 0..3 inclusive
|
||||||
|
/// - "from:5" → From position 5 onward
|
||||||
|
/// - "0,2,5" → Multiple discrete positions
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub range: ::prost::alloc::string::String,
|
||||||
|
/// Character filter type, case‑insensitive keywords:
|
||||||
|
/// "ALPHABETIC", "NUMERIC", "ALPHANUMERIC",
|
||||||
|
/// "ONEOF(<chars>)", "EXACT(:)", "CUSTOM(<name>)"
|
||||||
|
#[prost(string, tag = "2")]
|
||||||
|
pub filter: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CustomFormatter {
|
||||||
|
/// Formatter type identifier; handled client‑side.
|
||||||
|
/// Examples: "PSCFormatter", "PhoneFormatter", "CreditCardFormatter", "DateFormatter"
|
||||||
|
#[prost(string, tag = "1")]
|
||||||
|
pub r#type: ::prost::alloc::string::String,
|
||||||
|
/// Optional free‑text note or parameters (e.g. locale, pattern)
|
||||||
|
#[prost(string, optional, tag = "2")]
|
||||||
|
pub description: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
}
|
||||||
|
/// Collection of pattern rules for one field
|
||||||
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct PatternRules {
|
||||||
|
/// All rules that make up the validation logic
|
||||||
|
#[prost(message, repeated, tag = "1")]
|
||||||
|
pub rules: ::prost::alloc::vec::Vec<PatternRule>,
|
||||||
|
/// Optional human‑readable description for UI/debug purposes
|
||||||
|
#[prost(string, optional, tag = "2")]
|
||||||
|
pub description: ::core::option::Option<::prost::alloc::string::String>,
|
||||||
|
}
|
||||||
#[derive(serde::Serialize, serde::Deserialize)]
|
#[derive(serde::Serialize, serde::Deserialize)]
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
pub struct UpdateFieldValidationRequest {
|
pub struct UpdateFieldValidationRequest {
|
||||||
|
|||||||
Reference in New Issue
Block a user