fix visibilities of types and fields

This commit is contained in:
Brent Schroeter 2025-09-16 22:43:56 -07:00
parent 1d7d5c8a59
commit 9c2943f56c
3 changed files with 23 additions and 22 deletions

View file

@ -12,12 +12,12 @@ use serde::{Deserialize, Serialize};
/// Read only. /// Read only.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub struct AiTextValue { pub struct AiTextValue {
state: String, pub state: String,
#[serde(rename = "isStale")] #[serde(rename = "isStale")]
is_stale: bool, pub is_stale: bool,
#[serde(rename = "errorType")] #[serde(rename = "errorType")]
error_type: Option<String>, pub error_type: Option<String>,
value: Option<String>, pub value: Option<String>,
} }
/// Attachments allow you to add images, documents, or other files which can /// Attachments allow you to add images, documents, or other files which can
@ -33,27 +33,27 @@ pub struct AiTextValue {
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub struct AttachmentRead { pub struct AttachmentRead {
/// Unique attachment id /// Unique attachment id
id: String, pub id: String,
/// Content type, e.g. "image/jpeg" /// Content type, e.g. "image/jpeg"
#[serde(rename = "type")] #[serde(rename = "type")]
type_: String, pub type_: String,
/// Filename, e.g. "foo.jpg" /// Filename, e.g. "foo.jpg"
filename: String, pub filename: String,
/// Height, in pixels (these may be available if the attachment is an /// Height, in pixels (these may be available if the attachment is an
/// image) /// image)
height: Option<i32>, pub height: Option<i32>,
/// File size, in bytes /// File size, in bytes
size: usize, pub size: usize,
/// url, e.g. "https://v5.airtableusercontent.com/foo". /// url, e.g. `"https://v5.airtableusercontent.com/foo"`.
/// ///
/// URLs returned will expire 2 hours after being returned from our API. /// URLs returned will expire 2 hours after being returned from our API.
/// If you want to persist the attachments, we recommend downloading /// If you want to persist the attachments, we recommend downloading
/// them instead of saving the URL. See our support article for more /// them instead of saving the URL. See our support article for more
/// information. /// information.
url: String, pub url: String,
/// Width, in pixels (these may be available if the attachment is an /// Width, in pixels (these may be available if the attachment is an
/// image) /// image)
width: Option<i32>, pub width: Option<i32>,
// TODO: Add `thumbnails` field. // TODO: Add `thumbnails` field.
} }
@ -115,9 +115,9 @@ pub struct Barcode {
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub struct Button { pub struct Button {
/// Button label /// Button label
label: String, pub label: String,
/// For "Open URL" actions, the computed url value /// For "Open URL" actions, the computed url value
url: Option<String>, pub url: Option<String>,
} }
/// A collaborator field lets you add collaborators to your records. /// A collaborator field lets you add collaborators to your records.
@ -129,23 +129,23 @@ pub struct Button {
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub struct CollaboratorRead { pub struct CollaboratorRead {
/// User id or group id /// User id or group id
id: String, pub id: String,
/// User's email address /// User's email address
email: Option<String>, pub email: Option<String>,
/// User's display name (may be omitted if the user hasn't created an /// User's display name (may be omitted if the user hasn't created an
/// account) /// account)
name: Option<String>, pub name: Option<String>,
/// User's collaborator permission Level /// User's collaborator permission Level
/// ///
/// This is only included if you're observing a webhooks response. /// This is only included if you're observing a webhooks response.
#[serde(rename = "permissionLevel")] #[serde(rename = "permissionLevel")]
permission_level: Option<String>, pub permission_level: Option<String>,
/// User's profile picture /// User's profile picture
/// ///
/// This is only included if it exists for the user and you're observing /// This is only included if it exists for the user and you're observing
/// a webhooks response. /// a webhooks response.
#[serde(rename = "profilePicUrl")] #[serde(rename = "profilePicUrl")]
profile_pic_url: Option<String>, pub profile_pic_url: Option<String>,
} }
/// Write only. Use CollaboratorRead for reading from fields. /// Write only. Use CollaboratorRead for reading from fields.
@ -161,7 +161,8 @@ pub enum CollaboratorWrite {
}, },
} }
/// Option<FormulaResult> should cover all values generated by a formula field. /// `Option<FormulaResult>` should cover all values generated by a formula
/// field.
/// ///
/// Read only. /// Read only.
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]

View file

@ -56,7 +56,7 @@ pub struct Base {
} }
#[derive(Clone, Deserialize)] #[derive(Clone, Deserialize)]
pub struct ListBasesResponse { struct ListBasesResponse {
/// If there are more records, the response will contain an offset. Pass /// If there are more records, the response will contain an offset. Pass
/// this offset into the next request to fetch the next page of records. /// this offset into the next request to fetch the next page of records.
offset: Option<String>, offset: Option<String>,

View file

@ -84,7 +84,7 @@ impl ListRecordsQuery {
} }
#[derive(Clone, Deserialize)] #[derive(Clone, Deserialize)]
pub struct ListRecordsResponse<T> struct ListRecordsResponse<T>
where where
T: Clone, T: Clone,
{ {