Skip to content

Commit

Permalink
Regenerating SDKs following introspection of schemas.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonCWang committed Oct 10, 2024
1 parent 8cdabd8 commit a6a8cfc
Show file tree
Hide file tree
Showing 172 changed files with 3,745 additions and 2,167 deletions.
284 changes: 109 additions & 175 deletions lightspark/src/objects/account.rs

Large diffs are not rendered by default.

25 changes: 19 additions & 6 deletions lightspark/src/objects/account_to_api_tokens_connection.rs
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use crate::objects::api_token::ApiToken;
use crate::objects::connection::Connection;
use crate::objects::page_info::PageInfo;
use serde::{Deserialize, Serialize};
use std::vec::Vec;
use crate::objects::api_token::ApiToken;
use crate::objects::page_info::PageInfo;
use crate::objects::connection::Connection;


#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToApiTokensConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde(rename = "account_to_api_tokens_connection_count")]
#[serde (rename = "account_to_api_tokens_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde(rename = "account_to_api_tokens_connection_page_info")]
#[serde (rename = "account_to_api_tokens_connection_page_info")]
pub page_info: PageInfo,

/// The API tokens for the current page of this connection.
#[serde(rename = "account_to_api_tokens_connection_entities")]
#[serde (rename = "account_to_api_tokens_connection_entities")]
pub entities: Vec<ApiToken>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToApiTokensConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -35,11 +41,15 @@ impl Connection for AccountToApiTokensConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToApiTokensConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToApiTokensConnectionFragment on AccountToApiTokensConnection {
__typename
Expand All @@ -56,3 +66,6 @@ fragment AccountToApiTokensConnectionFragment on AccountToApiTokensConnection {
}
}
";



25 changes: 19 additions & 6 deletions lightspark/src/objects/account_to_channels_connection.rs
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use crate::objects::channel::Channel;
use crate::objects::connection::Connection;
use crate::objects::page_info::PageInfo;
use serde::{Deserialize, Serialize};
use std::vec::Vec;
use crate::objects::channel::Channel;
use crate::objects::page_info::PageInfo;
use crate::objects::connection::Connection;


#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToChannelsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde(rename = "account_to_channels_connection_count")]
#[serde (rename = "account_to_channels_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde(rename = "account_to_channels_connection_page_info")]
#[serde (rename = "account_to_channels_connection_page_info")]
pub page_info: PageInfo,

/// The channels for the current page of this connection.
#[serde(rename = "account_to_channels_connection_entities")]
#[serde (rename = "account_to_channels_connection_entities")]
pub entities: Vec<Channel>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToChannelsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -35,11 +41,15 @@ impl Connection for AccountToChannelsConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToChannelsConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToChannelsConnectionFragment on AccountToChannelsConnection {
__typename
Expand All @@ -56,3 +66,6 @@ fragment AccountToChannelsConnectionFragment on AccountToChannelsConnection {
}
}
";



26 changes: 19 additions & 7 deletions lightspark/src/objects/account_to_nodes_connection.rs
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use crate::objects::lightspark_node::LightsparkNodeEnum;
use crate::objects::page_info::PageInfo;
use serde::{Deserialize, Serialize};
use std::vec::Vec;

use crate::objects::connection::Connection;
use std::vec::Vec;
use crate::objects::lightspark_node::LightsparkNode;
use crate::objects::page_info::PageInfo;
use crate::objects::lightspark_node::LightsparkNodeEnum;

/// A connection between an account and the nodes it manages.
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToNodesConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde(rename = "account_to_nodes_connection_count")]
#[serde (rename = "account_to_nodes_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde(rename = "account_to_nodes_connection_page_info")]
#[serde (rename = "account_to_nodes_connection_page_info")]
pub page_info: PageInfo,

/// The nodes for the current page of this connection.
#[serde(rename = "account_to_nodes_connection_entities")]
#[serde (rename = "account_to_nodes_connection_entities")]
pub entities: Vec<LightsparkNodeEnum>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToNodesConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -37,11 +42,15 @@ impl Connection for AccountToNodesConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToNodesConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToNodesConnectionFragment on AccountToNodesConnection {
__typename
Expand All @@ -58,3 +67,6 @@ fragment AccountToNodesConnectionFragment on AccountToNodesConnection {
}
}
";



27 changes: 20 additions & 7 deletions lightspark/src/objects/account_to_payment_requests_connection.rs
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use crate::objects::page_info::PageInfo;
use crate::objects::payment_request::PaymentRequestEnum;
use serde::{Deserialize, Serialize};

use crate::objects::connection::Connection;
use std::vec::Vec;
use crate::objects::payment_request::PaymentRequest;
use crate::objects::connection::Connection;
use crate::objects::payment_request::PaymentRequestEnum;
use crate::objects::page_info::PageInfo;


#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToPaymentRequestsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde(rename = "account_to_payment_requests_connection_count")]
#[serde (rename = "account_to_payment_requests_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde(rename = "account_to_payment_requests_connection_page_info")]
#[serde (rename = "account_to_payment_requests_connection_page_info")]
pub page_info: PageInfo,

/// The payment requests for the current page of this connection.
#[serde(rename = "account_to_payment_requests_connection_entities")]
#[serde (rename = "account_to_payment_requests_connection_entities")]
pub entities: Vec<PaymentRequestEnum>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToPaymentRequestsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -36,11 +42,15 @@ impl Connection for AccountToPaymentRequestsConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToPaymentRequestsConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToPaymentRequestsConnectionFragment on AccountToPaymentRequestsConnection {
__typename
Expand All @@ -57,3 +67,6 @@ fragment AccountToPaymentRequestsConnectionFragment on AccountToPaymentRequestsC
}
}
";



33 changes: 23 additions & 10 deletions lightspark/src/objects/account_to_transactions_connection.rs
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@

// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved
use serde::{Deserialize, Serialize};
use crate::objects::currency_amount::CurrencyAmount;
use crate::objects::page_info::PageInfo;
use std::vec::Vec;
use crate::objects::connection::Connection;
use crate::objects::transaction::Transaction;
use crate::objects::transaction::TransactionEnum;
use serde::{Deserialize, Serialize};
use crate::objects::page_info::PageInfo;

use crate::objects::connection::Connection;
use std::vec::Vec;

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct AccountToTransactionsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
#[serde(rename = "account_to_transactions_connection_count")]
#[serde (rename = "account_to_transactions_connection_count")]
pub count: i64,

/// An object that holds pagination information about the objects in this connection.
#[serde(rename = "account_to_transactions_connection_page_info")]
#[serde (rename = "account_to_transactions_connection_page_info")]
pub page_info: PageInfo,

/// Profit (or loss) generated by the transactions in this connection, with the set of filters and constraints provided.
#[serde(rename = "account_to_transactions_connection_profit_loss")]
#[serde (rename = "account_to_transactions_connection_profit_loss")]
pub profit_loss: Option<CurrencyAmount>,

/// Average fee earned for the transactions in this connection, with the set of filters and constraints provided.
#[serde(rename = "account_to_transactions_connection_average_fee_earned")]
#[serde (rename = "account_to_transactions_connection_average_fee_earned")]
pub average_fee_earned: Option<CurrencyAmount>,

/// Total amount transacted by the transactions in this connection, with the set of filters and constraints provided.
#[serde(rename = "account_to_transactions_connection_total_amount_transacted")]
#[serde (rename = "account_to_transactions_connection_total_amount_transacted")]
pub total_amount_transacted: Option<CurrencyAmount>,

/// The transactions for the current page of this connection.
#[serde(rename = "account_to_transactions_connection_entities")]
#[serde (rename = "account_to_transactions_connection_entities")]
pub entities: Vec<TransactionEnum>,

/// The typename of the object
#[serde(rename = "__typename")]
pub typename: String,

}


impl Connection for AccountToTransactionsConnection {

/// The total count of objects in this connection, using the current filters. It is different from the number of objects returned in the current page (in the `entities` field).
fn get_count(&self) -> i64 {
self.count
Expand All @@ -49,11 +55,15 @@ impl Connection for AccountToTransactionsConnection {
self.page_info.clone()
}


fn type_name(&self) -> &'static str {
"AccountToTransactionsConnection"
}
}




pub const FRAGMENT: &str = "
fragment AccountToTransactionsConnectionFragment on AccountToTransactionsConnection {
__typename
Expand Down Expand Up @@ -94,3 +104,6 @@ fragment AccountToTransactionsConnectionFragment on AccountToTransactionsConnect
}
}
";



Loading

0 comments on commit a6a8cfc

Please sign in to comment.