1#![allow(
14 missing_docs,
15 clippy::doc_lazy_continuation,
16 clippy::doc_overindented_list_items
17)]
18
19use serde::{Deserialize, Serialize};
20
21#[derive(Debug, Clone, Default, Serialize, Deserialize)]
23pub struct CategoryInterface {
24 pub title: String,
26 pub visibility: Visibility,
28 #[serde(
29 rename = "thumbnailUrl",
30 default,
31 skip_serializing_if = "Option::is_none"
32 )]
33 pub thumbnail_url: Option<String>,
34 #[serde(default, skip_serializing_if = "Vec::is_empty")]
35 pub posts: Vec<PostInterface>,
36 #[serde(
37 rename = "subCategories",
38 default,
39 skip_serializing_if = "Vec::is_empty"
40 )]
41 pub sub_categories: Vec<SubCategoryInterface>,
42}
43
44#[derive(Debug, Clone, Default, Serialize, Deserialize)]
46pub struct InstructorDetails {
47 pub name: String,
49 pub description: String,
51}
52
53#[derive(Debug, Clone, Default, Serialize, Deserialize)]
55pub struct PostInterface {
56 pub title: String,
58 pub visibility: Visibility,
60 #[serde(
61 rename = "thumbnailUrl",
62 default,
63 skip_serializing_if = "Option::is_none"
64 )]
65 pub thumbnail_url: Option<String>,
66 #[serde(rename = "contentType")]
68 pub content_type: ContentType,
69 pub description: String,
71 #[serde(
72 rename = "bucketVideoUrl",
73 default,
74 skip_serializing_if = "Option::is_none"
75 )]
76 pub bucket_video_url: Option<String>,
77 #[serde(
78 rename = "postMaterials",
79 default,
80 skip_serializing_if = "Vec::is_empty"
81 )]
82 pub post_materials: Vec<PostMaterialInterface>,
83}
84
85#[derive(Debug, Clone, Default, Serialize, Deserialize)]
87pub struct PostMaterialInterface {
88 pub title: String,
90 #[serde(rename = "type")]
92 pub type_: Type,
93 pub url: String,
95}
96
97#[derive(Debug, Clone, Default, Serialize, Deserialize)]
99pub struct ProductInterface {
100 pub title: String,
102 pub description: String,
104 #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
105 pub image_url: Option<String>,
106 #[serde(default, skip_serializing_if = "Vec::is_empty")]
108 pub categories: Vec<CategoryInterface>,
109 #[serde(
110 rename = "instructorDetails",
111 default,
112 skip_serializing_if = "Option::is_none"
113 )]
114 pub instructor_details: Option<InstructorDetails>,
115}
116
117#[derive(Debug, Clone, Default, Serialize, Deserialize)]
119pub struct PublicExporterPayload {
120 #[serde(rename = "locationId")]
122 pub location_id: String,
123 #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
124 pub user_id: Option<String>,
125 #[serde(default, skip_serializing_if = "Vec::is_empty")]
127 pub products: Vec<ProductInterface>,
128}
129
130#[derive(Debug, Clone, Default, Serialize, Deserialize)]
132pub struct SubCategoryInterface {
133 pub title: String,
135 pub visibility: Visibility,
137 #[serde(
138 rename = "thumbnailUrl",
139 default,
140 skip_serializing_if = "Option::is_none"
141 )]
142 pub thumbnail_url: Option<String>,
143 #[serde(default, skip_serializing_if = "Vec::is_empty")]
144 pub posts: Vec<PostInterface>,
145}
146
147pub type ContentType = String;
150
151pub type Type = String;
158
159pub type Visibility = String;