diff --git a/Cargo.toml b/Cargo.toml index 462c5a4..90baaa9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,44 +1,4 @@ -[package] -name = "pinecone-sdk" -version = "0.1.2" -edition = "2021" -description = "Pinecone Rust SDK" -repository = "https://github.com/pinecone-io/pinecone-rust-client" -homepage = "https://www.pinecone.io/" -rust-version = "1.78.0" -readme = "./README.md" -license = "Apache-2.0" -keywords = ["pinecone", "vector", "database", "cloud", "vectordb"] -categories = ["api-bindings", "database"] -exclude = ["tests/*"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -tokio = { version = "1", features = ["full"] } -regex = "1.10" -serde_json = "1.0" -snafu = "0.8" -rand = "0.8" -tonic = { version = "0.11", features = ["tls", "transport", "tls-roots"] } -prost = "0.12" -prost-types = "0.12" -# reqwest = "0.12" -once_cell = "1.19" - -# openapi -serde = { version = "^1.0", features = ["derive"] } -# serde_json = "^1.0" -url = "^2.5" -uuid = { version = "^1.8", features = ["serde", "v4"] } -reqwest = { version = "^0.12", features = ["json", "multipart"] } -thiserror = "1.0.63" -anyhow = "1.0.86" - -[dev-dependencies] -temp-env = "0.3" -httpmock = "0.7.0-rc.1" -serial_test = "3.1" - -[build-dependencies] -tonic-build = "0.11" +[workspace] +members = ["pinecone-sdk"] +exclude = ["codegen"] +resolver = "2" \ No newline at end of file diff --git a/justfile b/justfile index 93e7299..a1de7b3 100644 --- a/justfile +++ b/justfile @@ -2,7 +2,7 @@ api_version := "2024-07" # Generate version file generate-version: - echo "/// Pinecone API version\npub const API_VERSION: &str = \"{{api_version}}\";" > src/version.rs + echo "/// Pinecone API version\npub const API_VERSION: &str = \"{{api_version}}\";" > pinecone-sdk/src/version.rs # Build the OpenAPI and Protobuf definitions in `codegen/apis` build-apis: diff --git a/pinecone-sdk/Cargo.toml b/pinecone-sdk/Cargo.toml new file mode 100644 index 0000000..462c5a4 --- /dev/null +++ b/pinecone-sdk/Cargo.toml @@ -0,0 +1,44 @@ +[package] +name = "pinecone-sdk" +version = "0.1.2" +edition = "2021" +description = "Pinecone Rust SDK" +repository = "https://github.com/pinecone-io/pinecone-rust-client" +homepage = "https://www.pinecone.io/" +rust-version = "1.78.0" +readme = "./README.md" +license = "Apache-2.0" +keywords = ["pinecone", "vector", "database", "cloud", "vectordb"] +categories = ["api-bindings", "database"] +exclude = ["tests/*"] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +tokio = { version = "1", features = ["full"] } +regex = "1.10" +serde_json = "1.0" +snafu = "0.8" +rand = "0.8" +tonic = { version = "0.11", features = ["tls", "transport", "tls-roots"] } +prost = "0.12" +prost-types = "0.12" +# reqwest = "0.12" +once_cell = "1.19" + +# openapi +serde = { version = "^1.0", features = ["derive"] } +# serde_json = "^1.0" +url = "^2.5" +uuid = { version = "^1.8", features = ["serde", "v4"] } +reqwest = { version = "^0.12", features = ["json", "multipart"] } +thiserror = "1.0.63" +anyhow = "1.0.86" + +[dev-dependencies] +temp-env = "0.3" +httpmock = "0.7.0-rc.1" +serial_test = "3.1" + +[build-dependencies] +tonic-build = "0.11" diff --git a/src/lib.rs b/pinecone-sdk/src/lib.rs similarity index 100% rename from src/lib.rs rename to pinecone-sdk/src/lib.rs diff --git a/src/models/embedding.rs b/pinecone-sdk/src/models/embedding.rs similarity index 100% rename from src/models/embedding.rs rename to pinecone-sdk/src/models/embedding.rs diff --git a/src/models/embeddings_list.rs b/pinecone-sdk/src/models/embeddings_list.rs similarity index 100% rename from src/models/embeddings_list.rs rename to pinecone-sdk/src/models/embeddings_list.rs diff --git a/src/models/embeddings_list_usage.rs b/pinecone-sdk/src/models/embeddings_list_usage.rs similarity index 100% rename from src/models/embeddings_list_usage.rs rename to pinecone-sdk/src/models/embeddings_list_usage.rs diff --git a/src/models/index_list.rs b/pinecone-sdk/src/models/index_list.rs similarity index 100% rename from src/models/index_list.rs rename to pinecone-sdk/src/models/index_list.rs diff --git a/src/models/index_model.rs b/pinecone-sdk/src/models/index_model.rs similarity index 100% rename from src/models/index_model.rs rename to pinecone-sdk/src/models/index_model.rs diff --git a/src/models/metric.rs b/pinecone-sdk/src/models/metric.rs similarity index 100% rename from src/models/metric.rs rename to pinecone-sdk/src/models/metric.rs diff --git a/src/models/mod.rs b/pinecone-sdk/src/models/mod.rs similarity index 100% rename from src/models/mod.rs rename to pinecone-sdk/src/models/mod.rs diff --git a/src/models/namespace.rs b/pinecone-sdk/src/models/namespace.rs similarity index 100% rename from src/models/namespace.rs rename to pinecone-sdk/src/models/namespace.rs diff --git a/src/models/wait_policy.rs b/pinecone-sdk/src/models/wait_policy.rs similarity index 100% rename from src/models/wait_policy.rs rename to pinecone-sdk/src/models/wait_policy.rs diff --git a/src/openapi/README.md b/pinecone-sdk/src/openapi/README.md similarity index 100% rename from src/openapi/README.md rename to pinecone-sdk/src/openapi/README.md diff --git a/src/openapi/apis/configuration.rs b/pinecone-sdk/src/openapi/apis/configuration.rs similarity index 100% rename from src/openapi/apis/configuration.rs rename to pinecone-sdk/src/openapi/apis/configuration.rs diff --git a/src/openapi/apis/inference_api.rs b/pinecone-sdk/src/openapi/apis/inference_api.rs similarity index 100% rename from src/openapi/apis/inference_api.rs rename to pinecone-sdk/src/openapi/apis/inference_api.rs diff --git a/src/openapi/apis/manage_indexes_api.rs b/pinecone-sdk/src/openapi/apis/manage_indexes_api.rs similarity index 100% rename from src/openapi/apis/manage_indexes_api.rs rename to pinecone-sdk/src/openapi/apis/manage_indexes_api.rs diff --git a/src/openapi/apis/mod.rs b/pinecone-sdk/src/openapi/apis/mod.rs similarity index 100% rename from src/openapi/apis/mod.rs rename to pinecone-sdk/src/openapi/apis/mod.rs diff --git a/src/openapi/mod.rs b/pinecone-sdk/src/openapi/mod.rs similarity index 100% rename from src/openapi/mod.rs rename to pinecone-sdk/src/openapi/mod.rs diff --git a/src/openapi/models/collection_list.rs b/pinecone-sdk/src/openapi/models/collection_list.rs similarity index 100% rename from src/openapi/models/collection_list.rs rename to pinecone-sdk/src/openapi/models/collection_list.rs diff --git a/src/openapi/models/collection_model.rs b/pinecone-sdk/src/openapi/models/collection_model.rs similarity index 100% rename from src/openapi/models/collection_model.rs rename to pinecone-sdk/src/openapi/models/collection_model.rs diff --git a/src/openapi/models/configure_index_request.rs b/pinecone-sdk/src/openapi/models/configure_index_request.rs similarity index 100% rename from src/openapi/models/configure_index_request.rs rename to pinecone-sdk/src/openapi/models/configure_index_request.rs diff --git a/src/openapi/models/configure_index_request_spec.rs b/pinecone-sdk/src/openapi/models/configure_index_request_spec.rs similarity index 100% rename from src/openapi/models/configure_index_request_spec.rs rename to pinecone-sdk/src/openapi/models/configure_index_request_spec.rs diff --git a/src/openapi/models/configure_index_request_spec_pod.rs b/pinecone-sdk/src/openapi/models/configure_index_request_spec_pod.rs similarity index 100% rename from src/openapi/models/configure_index_request_spec_pod.rs rename to pinecone-sdk/src/openapi/models/configure_index_request_spec_pod.rs diff --git a/src/openapi/models/create_collection_request.rs b/pinecone-sdk/src/openapi/models/create_collection_request.rs similarity index 100% rename from src/openapi/models/create_collection_request.rs rename to pinecone-sdk/src/openapi/models/create_collection_request.rs diff --git a/src/openapi/models/create_index_request.rs b/pinecone-sdk/src/openapi/models/create_index_request.rs similarity index 100% rename from src/openapi/models/create_index_request.rs rename to pinecone-sdk/src/openapi/models/create_index_request.rs diff --git a/src/openapi/models/deletion_protection.rs b/pinecone-sdk/src/openapi/models/deletion_protection.rs similarity index 100% rename from src/openapi/models/deletion_protection.rs rename to pinecone-sdk/src/openapi/models/deletion_protection.rs diff --git a/src/openapi/models/embed_request.rs b/pinecone-sdk/src/openapi/models/embed_request.rs similarity index 100% rename from src/openapi/models/embed_request.rs rename to pinecone-sdk/src/openapi/models/embed_request.rs diff --git a/src/openapi/models/embed_request_inputs_inner.rs b/pinecone-sdk/src/openapi/models/embed_request_inputs_inner.rs similarity index 100% rename from src/openapi/models/embed_request_inputs_inner.rs rename to pinecone-sdk/src/openapi/models/embed_request_inputs_inner.rs diff --git a/src/openapi/models/embed_request_parameters.rs b/pinecone-sdk/src/openapi/models/embed_request_parameters.rs similarity index 100% rename from src/openapi/models/embed_request_parameters.rs rename to pinecone-sdk/src/openapi/models/embed_request_parameters.rs diff --git a/src/openapi/models/embedding.rs b/pinecone-sdk/src/openapi/models/embedding.rs similarity index 100% rename from src/openapi/models/embedding.rs rename to pinecone-sdk/src/openapi/models/embedding.rs diff --git a/src/openapi/models/embeddings_list.rs b/pinecone-sdk/src/openapi/models/embeddings_list.rs similarity index 100% rename from src/openapi/models/embeddings_list.rs rename to pinecone-sdk/src/openapi/models/embeddings_list.rs diff --git a/src/openapi/models/embeddings_list_usage.rs b/pinecone-sdk/src/openapi/models/embeddings_list_usage.rs similarity index 100% rename from src/openapi/models/embeddings_list_usage.rs rename to pinecone-sdk/src/openapi/models/embeddings_list_usage.rs diff --git a/src/openapi/models/error_response.rs b/pinecone-sdk/src/openapi/models/error_response.rs similarity index 100% rename from src/openapi/models/error_response.rs rename to pinecone-sdk/src/openapi/models/error_response.rs diff --git a/src/openapi/models/error_response_error.rs b/pinecone-sdk/src/openapi/models/error_response_error.rs similarity index 100% rename from src/openapi/models/error_response_error.rs rename to pinecone-sdk/src/openapi/models/error_response_error.rs diff --git a/src/openapi/models/index_list.rs b/pinecone-sdk/src/openapi/models/index_list.rs similarity index 100% rename from src/openapi/models/index_list.rs rename to pinecone-sdk/src/openapi/models/index_list.rs diff --git a/src/openapi/models/index_model.rs b/pinecone-sdk/src/openapi/models/index_model.rs similarity index 100% rename from src/openapi/models/index_model.rs rename to pinecone-sdk/src/openapi/models/index_model.rs diff --git a/src/openapi/models/index_model_spec.rs b/pinecone-sdk/src/openapi/models/index_model_spec.rs similarity index 100% rename from src/openapi/models/index_model_spec.rs rename to pinecone-sdk/src/openapi/models/index_model_spec.rs diff --git a/src/openapi/models/index_model_status.rs b/pinecone-sdk/src/openapi/models/index_model_status.rs similarity index 100% rename from src/openapi/models/index_model_status.rs rename to pinecone-sdk/src/openapi/models/index_model_status.rs diff --git a/src/openapi/models/index_spec.rs b/pinecone-sdk/src/openapi/models/index_spec.rs similarity index 100% rename from src/openapi/models/index_spec.rs rename to pinecone-sdk/src/openapi/models/index_spec.rs diff --git a/src/openapi/models/list_indexes_401_response.rs b/pinecone-sdk/src/openapi/models/list_indexes_401_response.rs similarity index 100% rename from src/openapi/models/list_indexes_401_response.rs rename to pinecone-sdk/src/openapi/models/list_indexes_401_response.rs diff --git a/src/openapi/models/list_indexes_401_response_error.rs b/pinecone-sdk/src/openapi/models/list_indexes_401_response_error.rs similarity index 100% rename from src/openapi/models/list_indexes_401_response_error.rs rename to pinecone-sdk/src/openapi/models/list_indexes_401_response_error.rs diff --git a/src/openapi/models/mod.rs b/pinecone-sdk/src/openapi/models/mod.rs similarity index 100% rename from src/openapi/models/mod.rs rename to pinecone-sdk/src/openapi/models/mod.rs diff --git a/src/openapi/models/pod_spec.rs b/pinecone-sdk/src/openapi/models/pod_spec.rs similarity index 100% rename from src/openapi/models/pod_spec.rs rename to pinecone-sdk/src/openapi/models/pod_spec.rs diff --git a/src/openapi/models/pod_spec_metadata_config.rs b/pinecone-sdk/src/openapi/models/pod_spec_metadata_config.rs similarity index 100% rename from src/openapi/models/pod_spec_metadata_config.rs rename to pinecone-sdk/src/openapi/models/pod_spec_metadata_config.rs diff --git a/src/openapi/models/serverless_spec.rs b/pinecone-sdk/src/openapi/models/serverless_spec.rs similarity index 100% rename from src/openapi/models/serverless_spec.rs rename to pinecone-sdk/src/openapi/models/serverless_spec.rs diff --git a/src/pinecone/control.rs b/pinecone-sdk/src/pinecone/control.rs similarity index 100% rename from src/pinecone/control.rs rename to pinecone-sdk/src/pinecone/control.rs diff --git a/src/pinecone/data.rs b/pinecone-sdk/src/pinecone/data.rs similarity index 100% rename from src/pinecone/data.rs rename to pinecone-sdk/src/pinecone/data.rs diff --git a/src/pinecone/inference.rs b/pinecone-sdk/src/pinecone/inference.rs similarity index 100% rename from src/pinecone/inference.rs rename to pinecone-sdk/src/pinecone/inference.rs diff --git a/src/pinecone/mod.rs b/pinecone-sdk/src/pinecone/mod.rs similarity index 100% rename from src/pinecone/mod.rs rename to pinecone-sdk/src/pinecone/mod.rs diff --git a/src/protos/google.api.rs b/pinecone-sdk/src/protos/google.api.rs similarity index 100% rename from src/protos/google.api.rs rename to pinecone-sdk/src/protos/google.api.rs diff --git a/src/protos/mod.rs b/pinecone-sdk/src/protos/mod.rs similarity index 100% rename from src/protos/mod.rs rename to pinecone-sdk/src/protos/mod.rs diff --git a/src/utils/errors.rs b/pinecone-sdk/src/utils/errors.rs similarity index 100% rename from src/utils/errors.rs rename to pinecone-sdk/src/utils/errors.rs diff --git a/src/utils/mod.rs b/pinecone-sdk/src/utils/mod.rs similarity index 100% rename from src/utils/mod.rs rename to pinecone-sdk/src/utils/mod.rs diff --git a/src/utils/user_agent.rs b/pinecone-sdk/src/utils/user_agent.rs similarity index 100% rename from src/utils/user_agent.rs rename to pinecone-sdk/src/utils/user_agent.rs diff --git a/src/version.rs b/pinecone-sdk/src/version.rs similarity index 100% rename from src/version.rs rename to pinecone-sdk/src/version.rs