1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.741.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EmbedTokenResponse {
/// Narrowly-scoped embed token for the iframe. Absent for fully anonymous or raw apps, which load without a scoped token.
#[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub token: Option<Option<String>>,
/// Expiration of the embed token.
#[serde(rename = "expiration", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub expiration: Option<Option<String>>,
/// Raw apps render single-iframe and skip the opaque-viewer indirection and the embed token entirely.
#[serde(rename = "raw_app")]
pub raw_app: bool,
/// Publisher opted this app into sandbox isolation. When false the viewer runs the app same-origin with its full session.
#[serde(rename = "sandbox")]
pub sandbox: bool,
/// The resolved app path; the embedder uses it to scope the app's backing localStorage per app.
#[serde(rename = "app_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub app_path: Option<Option<String>>,
/// The resolved workspace; pairs with app_path so apps at the same path in different workspaces don't share a localStorage store.
#[serde(rename = "workspace_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<Option<String>>,
}
impl EmbedTokenResponse {
pub fn new(raw_app: bool, sandbox: bool) -> EmbedTokenResponse {
EmbedTokenResponse {
token: None,
expiration: None,
raw_app,
sandbox,
app_path: None,
workspace_id: None,
}
}
}