From 6bd39c37db4a45657a31c9c4ea547f2348355c88 Mon Sep 17 00:00:00 2001 From: Kesha Hietala Date: Mon, 3 Jun 2024 16:54:19 -0400 Subject: [PATCH] add some tisfy annotations --- cedar-policy/src/ffi/is_authorized.rs | 1 + cedar-policy/src/ffi/validate.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/cedar-policy/src/ffi/is_authorized.rs b/cedar-policy/src/ffi/is_authorized.rs index 990faf8bc..135b1ca5a 100644 --- a/cedar-policy/src/ffi/is_authorized.rs +++ b/cedar-policy/src/ffi/is_authorized.rs @@ -223,6 +223,7 @@ impl Diagnostics { #[serde(rename_all = "camelCase")] pub struct AuthorizationError { /// Id of the policy where the error (or warning) occurred + #[cfg_attr(feature = "wasm", tsify(type = "string"))] pub policy_id: PolicyId, /// Error (or warning). /// You can look at the `severity` field to see whether it is actually an diff --git a/cedar-policy/src/ffi/validate.rs b/cedar-policy/src/ffi/validate.rs index ba31292ef..94bfaa0dd 100644 --- a/cedar-policy/src/ffi/validate.rs +++ b/cedar-policy/src/ffi/validate.rs @@ -168,6 +168,7 @@ impl Default for ValidationSettings { #[serde(rename_all = "camelCase")] pub struct ValidationError { /// Id of the policy where the error (or warning) occurred + #[cfg_attr(feature = "wasm", tsify(type = "string"))] pub policy_id: PolicyId, /// Error (or warning) itself. /// You can look at the `severity` field to see whether it is actually an