pub struct Analytics { /* private fields */ }Expand description
Analytics and forecasting API
Implementations§
Source§impl Analytics
impl Analytics
pub fn into_reference(val: Analytics, env: Env) -> Result<Reference<Analytics>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Analytics>>
Source§impl Analytics
impl Analytics
Sourcepub async fn sales_summary(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<SalesSummaryOutput>
pub async fn sales_summary( &self, query: Option<AnalyticsQueryInput>, ) -> Result<SalesSummaryOutput>
Get sales summary for a time period
Sourcepub async fn revenue_by_period(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<Vec<RevenueByPeriodOutput>>
pub async fn revenue_by_period( &self, query: Option<AnalyticsQueryInput>, ) -> Result<Vec<RevenueByPeriodOutput>>
Get revenue broken down by time periods
Sourcepub async fn top_products(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<Vec<TopProductOutput>>
pub async fn top_products( &self, query: Option<AnalyticsQueryInput>, ) -> Result<Vec<TopProductOutput>>
Get top selling products
Sourcepub async fn product_performance(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<Vec<ProductPerformanceOutput>>
pub async fn product_performance( &self, query: Option<AnalyticsQueryInput>, ) -> Result<Vec<ProductPerformanceOutput>>
Get product performance with period comparison
Sourcepub async fn customer_metrics(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<CustomerMetricsOutput>
pub async fn customer_metrics( &self, query: Option<AnalyticsQueryInput>, ) -> Result<CustomerMetricsOutput>
Get customer metrics
Sourcepub async fn top_customers(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<Vec<TopCustomerOutput>>
pub async fn top_customers( &self, query: Option<AnalyticsQueryInput>, ) -> Result<Vec<TopCustomerOutput>>
Get top customers by spend
Sourcepub async fn inventory_health(&self) -> Result<InventoryHealthOutput>
pub async fn inventory_health(&self) -> Result<InventoryHealthOutput>
Get inventory health summary
Sourcepub async fn low_stock_items(
&self,
threshold: Option<f64>,
) -> Result<Vec<LowStockItemOutput>>
pub async fn low_stock_items( &self, threshold: Option<f64>, ) -> Result<Vec<LowStockItemOutput>>
Get low stock items
Sourcepub async fn inventory_movement(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<Vec<InventoryMovementOutput>>
pub async fn inventory_movement( &self, query: Option<AnalyticsQueryInput>, ) -> Result<Vec<InventoryMovementOutput>>
Get inventory movement summary
Sourcepub async fn demand_forecast(
&self,
skus: Option<Vec<String>>,
days_ahead: Option<u32>,
) -> Result<Vec<DemandForecastOutput>>
pub async fn demand_forecast( &self, skus: Option<Vec<String>>, days_ahead: Option<u32>, ) -> Result<Vec<DemandForecastOutput>>
Get demand forecast for inventory items
Sourcepub async fn revenue_forecast(
&self,
periods_ahead: Option<u32>,
granularity: Option<String>,
) -> Result<Vec<RevenueForecastOutput>>
pub async fn revenue_forecast( &self, periods_ahead: Option<u32>, granularity: Option<String>, ) -> Result<Vec<RevenueForecastOutput>>
Get revenue forecast
Sourcepub async fn order_status_breakdown(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<OrderStatusBreakdownOutput>
pub async fn order_status_breakdown( &self, query: Option<AnalyticsQueryInput>, ) -> Result<OrderStatusBreakdownOutput>
Get order status breakdown
Sourcepub async fn fulfillment_metrics(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<FulfillmentMetricsOutput>
pub async fn fulfillment_metrics( &self, query: Option<AnalyticsQueryInput>, ) -> Result<FulfillmentMetricsOutput>
Get fulfillment metrics
Sourcepub async fn return_metrics(
&self,
query: Option<AnalyticsQueryInput>,
) -> Result<ReturnMetricsOutput>
pub async fn return_metrics( &self, query: Option<AnalyticsQueryInput>, ) -> Result<ReturnMetricsOutput>
Get return metrics
Trait Implementations§
Source§impl FromNapiMutRef for Analytics
impl FromNapiMutRef for Analytics
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for Analytics
impl FromNapiRef for Analytics
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &Analytics
impl FromNapiValue for &Analytics
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut Analytics
impl FromNapiValue for &mut Analytics
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for Analytics
impl ToNapiValue for Analytics
Source§unsafe fn to_napi_value(env: napi_env, val: Analytics) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Analytics) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Analytics
impl ValidateNapiValue for &Analytics
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut Analytics
impl ValidateNapiValue for &mut Analytics
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for Analytics
impl !RefUnwindSafe for Analytics
impl Send for Analytics
impl Sync for Analytics
impl Unpin for Analytics
impl UnsafeUnpin for Analytics
impl !UnwindSafe for Analytics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more