From 3a182a74e80c97676587d947de9ff43dacf1f8cb Mon Sep 17 00:00:00 2001 From: Benno van den Berg Date: Tue, 27 Feb 2024 16:52:29 +0100 Subject: [PATCH] Use new client layout --- src/config.rs | 3 ++- src/interactive.rs | 3 +-- src/run/cell_writer.rs | 2 +- src/shell/notebook_writer.rs | 5 +++-- src/templates.rs | 3 +-- src/triggers.rs | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/config.rs b/src/config.rs index 3f1ccf07..0a3aefcf 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,7 @@ use anyhow::{anyhow, Error, Result}; use directories::ProjectDirs; -use fiberplane::api_client::clients::{default_config, ApiClient}; +use fiberplane::api_client::clients::default_config; +use fiberplane::api_client::ApiClient; use hyper::http::HeaderValue; use hyper::HeaderMap; use serde::{Deserialize, Serialize}; diff --git a/src/interactive.rs b/src/interactive.rs index 02b1e7d6..4953f593 100644 --- a/src/interactive.rs +++ b/src/interactive.rs @@ -1,10 +1,9 @@ use anyhow::{anyhow, bail, Context, Result}; use dialoguer::{theme, Confirm, FuzzySelect, Input, MultiSelect, Select}; -use fiberplane::api_client::clients::ApiClient; use fiberplane::api_client::{ data_source_get, data_source_list, notebook_search, proxy_list, snippet_list, template_list, trigger_list, view_list, webhook_delivery_list, webhook_list, - workspace_front_matter_schema_get, workspace_list, workspace_user_list, + workspace_front_matter_schema_get, workspace_list, workspace_user_list, ApiClient, }; use fiberplane::base64uuid::Base64Uuid; use fiberplane::models::data_sources::DataSource; diff --git a/src/run/cell_writer.rs b/src/run/cell_writer.rs index b8b4d2fa..b2e3a77b 100644 --- a/src/run/cell_writer.rs +++ b/src/run/cell_writer.rs @@ -1,8 +1,8 @@ use super::parse_logs::{contains_logs, parse_logs}; use anyhow::{anyhow, Context, Result}; use bytes::Bytes; -use fiberplane::api_client::clients::ApiClient; use fiberplane::api_client::notebook_cells_append; +use fiberplane::api_client::ApiClient; use fiberplane::base64uuid::Base64Uuid; use fiberplane::models::notebooks; use fiberplane::models::notebooks::{Cell, CodeCell, LogCell, TextCell}; diff --git a/src/shell/notebook_writer.rs b/src/shell/notebook_writer.rs index 3651d1eb..016cd1eb 100644 --- a/src/shell/notebook_writer.rs +++ b/src/shell/notebook_writer.rs @@ -1,6 +1,7 @@ use anyhow::{anyhow, Result}; -use fiberplane::api_client::clients::ApiClient; -use fiberplane::api_client::{notebook_cell_append_text, notebook_cells_append, profile_get}; +use fiberplane::api_client::{ + notebook_cell_append_text, notebook_cells_append, profile_get, ApiClient, +}; use fiberplane::base64uuid::Base64Uuid; use fiberplane::models::formatting::{Annotation, AnnotationWithOffset, Formatting, Mention}; use fiberplane::models::notebooks::operations::CellAppendText; diff --git a/src/templates.rs b/src/templates.rs index 143d5f90..49765b99 100644 --- a/src/templates.rs +++ b/src/templates.rs @@ -4,10 +4,9 @@ use crate::{config::api_client_configuration, fp_urls::NotebookUrlBuilder}; use anyhow::{anyhow, bail, Context, Error, Result}; use clap::{Parser, ValueEnum, ValueHint}; use cli_table::Table; -use fiberplane::api_client::clients::ApiClient; use fiberplane::api_client::{ notebook_create, notebook_get, template_create, template_delete, template_expand, template_get, - template_list, template_update, trigger_create, + template_list, template_update, trigger_create, ApiClient, }; use fiberplane::base64uuid::Base64Uuid; use fiberplane::models::names::Name; diff --git a/src/triggers.rs b/src/triggers.rs index 1b4d0d03..a83e0b0e 100644 --- a/src/triggers.rs +++ b/src/triggers.rs @@ -5,9 +5,9 @@ use crate::templates::TemplateArguments; use anyhow::{Context, Result}; use clap::{Parser, ValueEnum}; use cli_table::Table; -use fiberplane::api_client::clients::{default_config, ApiClient}; +use fiberplane::api_client::clients::default_config; use fiberplane::api_client::{ - trigger_create, trigger_delete, trigger_get, trigger_invoke, trigger_list, + trigger_create, trigger_delete, trigger_get, trigger_invoke, trigger_list, ApiClient, }; use fiberplane::base64uuid::Base64Uuid; use fiberplane::models::names::Name;