diff --git a/platform-api/api/destinations/motherduck.mdx b/platform-api/api/destinations/motherduck.mdx index 4c637327..9e6fc071 100644 --- a/platform-api/api/destinations/motherduck.mdx +++ b/platform-api/api/destinations/motherduck.mdx @@ -12,10 +12,12 @@ import MotherDuckPrerequisites from '/snippets/general-shared-text/motherduck.md To create or change a MotherDuck destination connector, see the following examples. +import MotherDuckSDK from '/snippets/destination_connectors/motherduck_sdk.mdx'; import MotherDuckAPIRESTCreate from '/snippets/destination_connectors/motherduck_rest_create.mdx'; import MotherDuckAPIRESTChange from '/snippets/destination_connectors/motherduck_rest_change.mdx'; + diff --git a/platform-api/api/destinations/overview.mdx b/platform-api/api/destinations/overview.mdx index 6665ff7d..483f262b 100644 --- a/platform-api/api/destinations/overview.mdx +++ b/platform-api/api/destinations/overview.mdx @@ -18,25 +18,25 @@ To use the [Unstructured Platform Workflow Endpoint](/platform-api/api/overview) To create or update a destination connector, you must also provide settings that are specific to that connector. For the list of specific settings, see: -- [Astra DB](/platform-api/api/destinations/astradb) (`astradb`) -- [Azure AI Search](/platform-api/api/destinations/azure-ai-search) (`azure_ai_search`) -- [Couchbase](/platform-api/api/destinations/couchbase) (`couchbase`) -- [Databricks Volumes](/platform-api/api/destinations/databricks-volumes) (`databricks_volumes`) -- [Delta Tables in Amazon S3](/platform-api/api/destinations/delta-table) (`delta_table`) -- [Delta Tables in Databricks](/platform-api/api/destinations/databricks-delta-table) (`databricks_volume_delta_tables`) -- [Elasticsearch](/platform-api/api/destinations/elasticsearch) (`elasticsearch`) -- [Google Cloud Storage](/platform-api/api/destinations/google-cloud) (`gcs`) -- [Kafka](/platform-api/api/destinations/kafka) (`kafka-cloud`) -- [Milvus](/platform-api/api/destinations/milvus) (`milvus`) -- [MongoDB](/platform-api/api/destinations/mongodb) (`mongodb`) -- [MotherDuck](/platform-api/api/destinations/motherduck) (`motherduck`) -- [Neo4j](/platform-api/api/destinations/neo4j) (`neo4j`) -- [OneDrive](/platform-api/api/destinations/onedrive) (`onedrive`) -- [Pinecone](/platform-api/api/destinations/pinecone) (`pinecone`) -- [PostgreSQL](/platform-api/api/destinations/postgresql) (`postgres`) -- [Qdrant](/platform-api/api/destinations/qdrant) (`qdrant-cloud`) -- [Redis](/platform-api/api/destinations/redis) (`redis`) -- [Snowflake](/platform-api/api/destinations/snowflake) (`snowflake`) -- [S3](/platform-api/api/destinations/s3) (`s3`) -- [Weaviate](/platform-api/api/destinations/weaviate) (`weaviate`) +- [Astra DB](/platform-api/api/destinations/astradb) (`ASTRADB` for the Python SDK or `astradb` for `curl` or Postman) +- [Azure AI Search](/platform-api/api/destinations/azure-ai-search) (`AZURE_AI_SEARCH` for the Python SDK or `azure_ai_search` for `curl` or Postman) +- [Couchbase](/platform-api/api/destinations/couchbase) (`COUCHBASE` for the Python SDK or `couchbase` for `curl` or Postman) +- [Databricks Volumes](/platform-api/api/destinations/databricks-volumes) (`DATABRICKS_VOLUMES` for the Python SDK or `databricks_volumes` for `curl` or Postman) +- [Delta Tables in Amazon S3](/platform-api/api/destinations/delta-table) (`DELTA_TABLE` for the Python SDK or `delta_table` for `curl` or Postman) +- [Delta Tables in Databricks](/platform-api/api/destinations/databricks-delta-table) (`DATABRICKS_VOLUME_DELTA_TABLES` for the Python SDK or `databricks_volume_delta_tables` for `curl` or Postman) +- [Elasticsearch](/platform-api/api/destinations/elasticsearch) (`ELASTICSEARCH` for the Python SDK or `elasticsearch` for `curl` or Postman) +- [Google Cloud Storage](/platform-api/api/destinations/google-cloud) (`GCS` for the Python SDK or `gcs` for `curl` or Postman) +- [Kafka](/platform-api/api/destinations/kafka) (`KAFKA_CLOUD` for the Python SDK or `kafka-cloud` for `curl` or Postman) +- [Milvus](/platform-api/api/destinations/milvus) (`MILVUS` for the Python SDK or `milvus` for `curl` or Postman) +- [MongoDB](/platform-api/api/destinations/mongodb) (`MONGODB` for the Python SDK or `mongodb` for `curl` or Postman) +- [MotherDuck](/platform-api/api/destinations/motherduck) (`MOTHERDUCK` for the Python SDK or `motherduck` for `curl` or Postman) +- [Neo4j](/platform-api/api/destinations/neo4j) (`NEO4J` for the Python SDK or `neo4j` for `curl` or Postman) +- [OneDrive](/platform-api/api/destinations/onedrive) (`ONEDRIVE` for the Python SDK or `onedrive` for `curl` or Postman) +- [Pinecone](/platform-api/api/destinations/pinecone) (`PINECONE` for the Python SDK or `pinecone` for `curl` or Postman) +- [PostgreSQL](/platform-api/api/destinations/postgresql) (`POSTGRES` for the Python SDK or `postgres` for `curl` or Postman) +- [Qdrant](/platform-api/api/destinations/qdrant) (`QDRANT_CLOUD` for the Python SDK or `qdrant-cloud` for `curl` or Postman) +- [Redis](/platform-api/api/destinations/redis) (`REDIS` for the Python SDK or `redis` for `curl` or Postman) +- [Snowflake](/platform-api/api/destinations/snowflake) (`SNOWFLAKE` for the Python SDK or `snowflake` for `curl` or Postman) +- [S3](/platform-api/api/destinations/s3) (`S3` for the Python SDK or `s3` for `curl` or Postman) +- [Weaviate](/platform-api/api/destinations/weaviate) (`WEAVIATE` for the Python SDK or `weaviate` for `curl` or Postman) diff --git a/platform-api/api/sources/overview.mdx b/platform-api/api/sources/overview.mdx index e4f1cc01..fed53173 100644 --- a/platform-api/api/sources/overview.mdx +++ b/platform-api/api/sources/overview.mdx @@ -18,23 +18,23 @@ To use the [Unstructured Platform Workflow Endpoint](/platform-api/api/overview) To create or update a source connector, you must also provide settings that are specific to that connector. For the list of specific settings, see: -- [Azure](/platform-api/api/sources/azure-blob-storage) (`azure`) -- [Box](/platform-api/api/sources/box) (`box`) -- [Confluence](/platform-api/api/sources/confluence) (`confluence`) -- [Couchbase](/platform-api/api/sources/couchbase) (`couchbase`) -- [Databricks Volumes](/platform-api/api/sources/databricks-volumes) (`databricks_volumes`) -- [Dropbox](/platform-api/api/sources/dropbox) (`dropbox`) -- [Elasticsearch](/platform-api/api/sources/elasticsearch) (`elasticsearch`) -- [Google Cloud Storage](/platform-api/api/sources/google-cloud) (`gcs`) -- [Google Drive](/platform-api/api/sources/google-drive) (`google_drive`) -- [Kafka](/platform-api/api/sources/kafka) (`kafka-cloud`) -- [MongoDB](/platform-api/api/sources/mongodb) (`mongodb`) -- [OneDrive](/platform-api/api/sources/onedrive) (`onedrive`) -- [Outlook](/platform-api/api/sources/outlook) (`outlook`) -- [PostgreSQL](/platform-api/api/sources/postgresql) (`postgres`) -- [S3](/platform-api/api/sources/s3) (`s3`) -- [Salesforce](/platform-api/api/sources/salesforce) (`salesforce`) -- [SharePoint](/platform-api/api/sources/sharepoint) (`sharepoint`) -- [Snowflake](/platform-api/api/sources/snowflake) (`snowflake`) +- [Azure](/platform-api/api/sources/azure-blob-storage) (`AZURE` for the Python SDK or `azure` for `curl` and Postman) +- [Box](/platform-api/api/sources/box) (`BOX` for the Python SDK or `box` for `curl` and Postman) +- [Confluence](/platform-api/api/sources/confluence) (`CONFLUENCE` for the Python SDK or `confluence` for `curl` and Postman) +- [Couchbase](/platform-api/api/sources/couchbase) (`COUCHBASE` for the Python SDK or `couchbase` for `curl` and Postman) +- [Databricks Volumes](/platform-api/api/sources/databricks-volumes) (`DATABRICKS_VOLUMES` for the Python SDK or `databricks_volumes` for `curl` and Postman) +- [Dropbox](/platform-api/api/sources/dropbox) (`DROPBOX` for the Python SDK or `dropbox` for `curl` and Postman) +- [Elasticsearch](/platform-api/api/sources/elasticsearch) (`ELASTICSEARCH` for the Python SDK or `elasticsearch` for `curl` and Postman) +- [Google Cloud Storage](/platform-api/api/sources/google-cloud) (`GCS` for the Python SDK or `gcs` for `curl` and Postman) +- [Google Drive](/platform-api/api/sources/google-drive) (`GOOGLE_DRIVE` for the Python SDK or `google_drive` for `curl` and Postman) +- [Kafka](/platform-api/api/sources/kafka) (`KAFKA_CLOUD` for the Python SDK or `kafka-cloud` for `curl` and Postman) +- [MongoDB](/platform-api/api/sources/mongodb) (`MONGODB` for the Python SDK or `mongodb` for `curl` and Postman) +- [OneDrive](/platform-api/api/sources/onedrive) (`ONEDRIVE` for the Python SDK or `onedrive` for `curl` and Postman) +- [Outlook](/platform-api/api/sources/outlook) (`OUTLOOK` for the Python SDK or `outlook` for `curl` and Postman) +- [PostgreSQL](/platform-api/api/sources/postgresql) (`POSTGRES` for the Python SDK or `postgres` for `curl` and Postman) +- [S3](/platform-api/api/sources/s3) (`S3` for the Python SDK or `s3` for `curl` and Postman) +- [Salesforce](/platform-api/api/sources/salesforce) (`SALESFORCE` for the Python SDK or `salesforce` for `curl` and Postman) +- [SharePoint](/platform-api/api/sources/sharepoint) (`SHAREPOINT` for the Python SDK or `sharepoint` for `curl` and Postman) +- [Snowflake](/platform-api/api/sources/snowflake) (`SNOWFLAKE` for the Python SDK or `snowflake` for `curl` and Postman) diff --git a/snippets/destination_connectors/astradb_sdk.mdx b/snippets/destination_connectors/astradb_sdk.mdx index e94f6db9..e503dc34 100644 --- a/snippets/destination_connectors/astradb_sdk.mdx +++ b/snippets/destination_connectors/astradb_sdk.mdx @@ -1,17 +1,21 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + AstraDBConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="astradb", # Create only. - config={ - "token": "", - "api_endpoint": "", - "collection_name": "", - "keyspace": "", - "batch_size": - } + type=DestinationConnectorType.ASTRADB, # Create only. + config=AstraDBConnectorConfigInput( + token="", + api_endpoint="", + collection_name="", + keyspace="", + batch_size= + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/azure_ai_search_sdk.mdx b/snippets/destination_connectors/azure_ai_search_sdk.mdx index 26c27e42..79cab701 100644 --- a/snippets/destination_connectors/azure_ai_search_sdk.mdx +++ b/snippets/destination_connectors/azure_ai_search_sdk.mdx @@ -1,15 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + AzureAISearchConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="azure_ai_search", # Create only. - config={ - "endpoint": "", - "index": "", - "azure_ai_search_key": "" - } + type=DestinationConnectorType.AZURE_AI_SEARCH, # Create only. + config=AzureAISearchConnectorConfigInput( + endpoint="", + index="", + key="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/couchbase_rest_change.mdx b/snippets/destination_connectors/couchbase_rest_change.mdx index 290cd5d7..72f91580 100644 --- a/snippets/destination_connectors/couchbase_rest_change.mdx +++ b/snippets/destination_connectors/couchbase_rest_change.mdx @@ -13,8 +13,7 @@ curl --request 'PUT' --location \ "scope": "", "collection": "", "password": "", - "batch_size": , - "collection_id": "" + "batch_size": } }' ``` \ No newline at end of file diff --git a/snippets/destination_connectors/couchbase_rest_create.mdx b/snippets/destination_connectors/couchbase_rest_create.mdx index d221efea..43813d5c 100644 --- a/snippets/destination_connectors/couchbase_rest_create.mdx +++ b/snippets/destination_connectors/couchbase_rest_create.mdx @@ -15,8 +15,7 @@ curl --request 'POST' --location \ "scope": "", "collection": "", "password": "", - "batch_size": , - "collection_id": "" + "batch_size": } }' ``` \ No newline at end of file diff --git a/snippets/destination_connectors/couchbase_sdk.mdx b/snippets/destination_connectors/couchbase_sdk.mdx index 2bfd8362..808c9b53 100644 --- a/snippets/destination_connectors/couchbase_sdk.mdx +++ b/snippets/destination_connectors/couchbase_sdk.mdx @@ -1,20 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + CouchbaseDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="couchbase", # Create only. - config={ - "username": "", - "bucket": "", - "connection_string": "", - "scope": "", - "collection": "", - "password": "", - "batch_size": , - "collection_id": "" - } + type=estinationConnectorType.COUCHBASE, # Create only. + config=CouchbaseDestinationConnectorConfigInput( + username="", + bucket="", + connection_string="", + scope="", + collection="", + password="", + batch_size= + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/databricks_delta_table_sdk.mdx b/snippets/destination_connectors/databricks_delta_table_sdk.mdx index c9359af1..e3da6475 100644 --- a/snippets/destination_connectors/databricks_delta_table_sdk.mdx +++ b/snippets/destination_connectors/databricks_delta_table_sdk.mdx @@ -1,23 +1,27 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + DatabricksVDTDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="databricks_volume_delta_tables", # Create only. - config={ - "server_hostname": "", - "http_path": "", - "token": "", - "client_id": "", - "client_secret": "", - "volume": "", - "catalog": "", - "volume_path": "", - "schema": "", - "database": "", - "table_name": "" - } + type=DestinationConnectorType.DATABRICKS_VOLUME_DELTA_TABLES, # Create only. + config=DatabricksVDTDestinationConnectorConfigInput( + server_hostname="", + http_path="", + token="", + client_id="", + client_secret="", + volume="", + catalog="", + volume_path="", + schema="", + database="", + table_name="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/databricks_volumes_sdk.mdx b/snippets/destination_connectors/databricks_volumes_sdk.mdx index 79594467..bf1cdb7a 100644 --- a/snippets/destination_connectors/databricks_volumes_sdk.mdx +++ b/snippets/destination_connectors/databricks_volumes_sdk.mdx @@ -1,19 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + DatabricksVolumesConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="databricks_volumes", # Create only. - config={ - "host": "", - "catalog": "", - "schema": "", - "volume": "", - "volume_path": "", - "client_secret": "", - "client_id": "" - } + type=DestinationConnectorType.DATABRICKS_VOLUMES, # Create only. + config=DatabricksVolumesConnectorConfigInput( + host="", + catalog="", + schema="", + volume="", + volume_path="", + client_secret="", + client_id="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/delta_table_sdk.mdx b/snippets/destination_connectors/delta_table_sdk.mdx index de5a3b24..99752f63 100644 --- a/snippets/destination_connectors/delta_table_sdk.mdx +++ b/snippets/destination_connectors/delta_table_sdk.mdx @@ -1,16 +1,20 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + DeltaTableConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="delta_table", # Create only. - config={ - "aws_region": "", - "table_uri": "", - "aws_access_key_id": "", - "aws_secret_access_key": "" - } + type=DestinationConnectorType.DELTA_TABLE, # Create only. + config=DeltaTableConnectorConfigInput( + aws_region="", + table_uri="", + aws_access_key_id="", + aws_secret_access_key="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/elasticsearch_sdk.mdx b/snippets/destination_connectors/elasticsearch_sdk.mdx index 9e81c9c6..c89f31ec 100644 --- a/snippets/destination_connectors/elasticsearch_sdk.mdx +++ b/snippets/destination_connectors/elasticsearch_sdk.mdx @@ -1,15 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + ElasticsearchConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="elasticsearch", # Create only. - config={ - "hosts": [""], - "es_api_key": "", - "index_name": "" - } + type=DestinationConnectorType.ELASTICSEARCH, # Create only. + config=ElasticsearchConnectorConfigInput( + hosts=[""], + es_api_key="", + index_name="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/gcs_sdk.mdx b/snippets/destination_connectors/gcs_sdk.mdx index ad7c8207..3ab4f15f 100644 --- a/snippets/destination_connectors/gcs_sdk.mdx +++ b/snippets/destination_connectors/gcs_sdk.mdx @@ -1,14 +1,18 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + GCSDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="gcs", # Create only. - config={ - "remote_url": "", - "service_account_key": "" - } + type=DestinationConnectorType.GCS, # Create only. + config=GCSDestinationConnectorConfigInput( + remote_url="", + service_account_key="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/kafka_sdk.mdx b/snippets/destination_connectors/kafka_sdk.mdx index f1f8758c..f4746d2d 100644 --- a/snippets/destination_connectors/kafka_sdk.mdx +++ b/snippets/destination_connectors/kafka_sdk.mdx @@ -1,19 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + KafkaCloudDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="kafka-cloud", # Create only. - config={ - "bootstrap_server": "", - "port": , - "group_id": "", - "kafka_api_key": "", - "secret": "", - "topic": "", - "num_messages_to_consume": - } + type=DestinationConnectorType.KAFKA_CLOUD, # Create only. + config=KafkaCloudDestinationConnectorConfigInput( + bootstrap_servers="", + port=, + group_id="", + kafka_api_key="", + secret="", + topic="", + batch_size= + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/milvus_sdk.mdx b/snippets/destination_connectors/milvus_sdk.mdx index 44d9b1df..78dff550 100644 --- a/snippets/destination_connectors/milvus_sdk.mdx +++ b/snippets/destination_connectors/milvus_sdk.mdx @@ -1,17 +1,21 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + MilvusDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="milvus", # Create only. - config={ - "user": "", - "uri": "", - "db_name": "", - "password": "", - "collection_name": "" - } + type=DestinationConnectorType.MILVUS, # Create only. + config=MilvusDestinationConnectorConfigInput( + user="", + uri="", + db_name="", + password="", + collection_name="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/mongodb_sdk.mdx b/snippets/destination_connectors/mongodb_sdk.mdx index a1925c1b..c14559c5 100644 --- a/snippets/destination_connectors/mongodb_sdk.mdx +++ b/snippets/destination_connectors/mongodb_sdk.mdx @@ -1,15 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + MongoDBConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="mongodb", # Create only. - config={ - "database": "", - "collection": "", - "uri": "" - } + type=DestinationConnectorType.MONGODB, # Create only. + config=MongoDBConnectorConfigInput( + database="", + collection="", + uri="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/motherduck_sdk.mdx b/snippets/destination_connectors/motherduck_sdk.mdx new file mode 100644 index 00000000..16148a6b --- /dev/null +++ b/snippets/destination_connectors/motherduck_sdk.mdx @@ -0,0 +1,20 @@ +```python Python SDK +# ... +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + MotherDuckDestinationConnectorConfigInput +) +# ... +destination_connector = DestinationConnector( + name="", # Create only. + type=DestinationConnectorType.MOTHERDUCK, # Create only. + config=MotherDuckDestinationConnectorConfigInput( + database="", + db_schema="", + table="", + md_token="" + ) +) +# ... +``` \ No newline at end of file diff --git a/snippets/destination_connectors/neo4j_sdk.mdx b/snippets/destination_connectors/neo4j_sdk.mdx index 9265b50e..1a09e339 100644 --- a/snippets/destination_connectors/neo4j_sdk.mdx +++ b/snippets/destination_connectors/neo4j_sdk.mdx @@ -1,17 +1,21 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + Neo4jDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="neo4j", # Create only. - config={ - "uri": "", - "database": "", - "username": "", - "password": "", - "batch_size": - } + type=DestinationConnectorType.NEO4J, # Create only. + config=Neo4jDestinationConnectorConfigInput( + uri="", + database="", + username="", + password="", + batch_size= + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/onedrive_sdk.mdx b/snippets/destination_connectors/onedrive_sdk.mdx index d8693ae5..a126cf71 100644 --- a/snippets/destination_connectors/onedrive_sdk.mdx +++ b/snippets/destination_connectors/onedrive_sdk.mdx @@ -1,18 +1,22 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + OneDriveDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="onedrive", # Create only. - config={ - "client_id": "", - "user_pname": "", - "tenant": "", - "authority_url": "", - "client_cred": "", - "remote_url": "" - } + type=DestinationConnectorType.ONEDRIVE, # Create only. + config=OneDriveDestinationConnectorConfigInput( + client_id="", + user_pname="", + tenant="", + authority_url="", + client_cred="", + remote_url="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/pinecone_sdk.mdx b/snippets/destination_connectors/pinecone_sdk.mdx index cefa9e19..76930188 100644 --- a/snippets/destination_connectors/pinecone_sdk.mdx +++ b/snippets/destination_connectors/pinecone_sdk.mdx @@ -1,15 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + PineconeDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="pinecone", # Create only. - config={ - "index_name" "", - "api_key": "", - "batch_size" - } + type=DestinationConnectorType.PINECONE, # Create only. + config=PineconeDestinationConnectorConfigInput( + index_name="", + api_key="", + batch_size= + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/postgresql_sdk.mdx b/snippets/destination_connectors/postgresql_sdk.mdx index 8367355f..a4bf736a 100644 --- a/snippets/destination_connectors/postgresql_sdk.mdx +++ b/snippets/destination_connectors/postgresql_sdk.mdx @@ -1,19 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + PostgresDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="postgres", # Create only. - config={ - "host": "", - "database": "", - "port": "", - "username": "", - "password": "", - "table_name": "", - "batch_size": - } + type=DestinationConnectorType.POSTGRES, # Create only. + config=PostgresDestinationConnectorConfigInput( + host="", + database="", + port="", + username="", + password="", + table_name="", + batch_size= + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/qdrant_sdk.mdx b/snippets/destination_connectors/qdrant_sdk.mdx index 93168ca6..6abe5c90 100644 --- a/snippets/destination_connectors/qdrant_sdk.mdx +++ b/snippets/destination_connectors/qdrant_sdk.mdx @@ -1,16 +1,20 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + QdrantCloudDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="qdrant", # Create only. - config={ - "url": "", - "collection_name": "", - "batch_size": "", - "api_key": "" - } + type=DestinationConnectorType.QDRANT_CLOUD, + config=QdrantCloudDestinationConnectorConfigInput( + url="", + collection_name="", + batch_size=, + api_key="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/redis_sdk.mdx b/snippets/destination_connectors/redis_sdk.mdx index e35b08b9..ee1250ad 100644 --- a/snippets/destination_connectors/redis_sdk.mdx +++ b/snippets/destination_connectors/redis_sdk.mdx @@ -1,24 +1,28 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + RedisDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="redis", # Create only. - config={ - "database": "", - "ssl": "", - "batch_size": , + type=DestinationConnectorType.REDIS, # Create only. + config=RedisDestinationConnectorConfigInput( + database="", + ssl=, + batch_size=, # For URI authentication: - "uri": "" + uri="" # For password authentication: - "host": "", - "port": , - "username": "", - "password": "" - } + host="", + port=, + username="", + password="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/s3_sdk.mdx b/snippets/destination_connectors/s3_sdk.mdx index a7421fee..fbebcef5 100644 --- a/snippets/destination_connectors/s3_sdk.mdx +++ b/snippets/destination_connectors/s3_sdk.mdx @@ -1,21 +1,25 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + S3DestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="s3", # Create only. - config={ + type=DestinationConnectorType.S3, # Create only. + config=S3DestinationConnectorConfigInput( # For AWS access key ID with AWS secret access key authentication: - "key": "", - "secret": "", + key="", + secret="", # For AWS STS token authentication: - "token": "", + token="", - "remote_url": "", - "endpoint_url": "" - } + remote_url="", + endpoint_url="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/snowflake_sdk.mdx b/snippets/destination_connectors/snowflake_sdk.mdx index 134d1f26..71402796 100644 --- a/snippets/destination_connectors/snowflake_sdk.mdx +++ b/snippets/destination_connectors/snowflake_sdk.mdx @@ -1,23 +1,27 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector( name="", # Create only. - type="snowflake", # Create only. - config={ - "account": "", - "user": "", - "host": "", - "port": , - "database": "", - "schema": "", - "role": "", - "password": "", - "record_id_key": "", - "table_name": "", - "batch_size": - } + type=DestinationConnectorType.SNOWFLAKE, # Create only. + config=SnowflakeDestinationConnectorConfigInput( + account="", + user="", + host="", + port=, + database="", + schema="", + role="", + password="", + record_id_key="", + table_name="", + batch_size= + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/destination_connectors/weaviate_sdk.mdx b/snippets/destination_connectors/weaviate_sdk.mdx index 0e08721e..44845aa3 100644 --- a/snippets/destination_connectors/weaviate_sdk.mdx +++ b/snippets/destination_connectors/weaviate_sdk.mdx @@ -1,15 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import DestinationConnector +from unstructured_client.models.shared import ( + DestinationConnector, + DestinationConnectorType, + WeaviateDestinationConnectorConfigInput +) # ... destination_connector = DestinationConnector( name="", # Create only. - type="weaviate", # Create only. - config={ - "host_url": "", - "class_name": "", - "api_key": "" - } + type=DestinationConnectorType.WEAVIATE_CLOUD, # Create only. + config=WeaviateDestinationConnectorConfigInput( + cluster_url="", + collection="", + api_key="" + ) ) # ... ``` \ No newline at end of file diff --git a/snippets/general-shared-text/couchbase-api-placeholders.mdx b/snippets/general-shared-text/couchbase-api-placeholders.mdx index 63f0604c..bedbeabe 100644 --- a/snippets/general-shared-text/couchbase-api-placeholders.mdx +++ b/snippets/general-shared-text/couchbase-api-placeholders.mdx @@ -6,4 +6,4 @@ - `` - The name of the collection in the scope. The default is `_default` if not otherwise specified. - `` (_required_) - The password for the Couchbase server. - `` - The maximum number of records to transmit per batch. The default is `50` if not otherwise specified. -- `` - The name of the collection field that contains the document ID. The default is `id` if not otherwise specified. \ No newline at end of file +- `` (source connector only) - The name of the collection field that contains the document ID. The default is `id` if not otherwise specified. \ No newline at end of file diff --git a/snippets/general-shared-text/elasticsearch-api-placeholders.mdx b/snippets/general-shared-text/elasticsearch-api-placeholders.mdx index c944d733..b825edba 100644 --- a/snippets/general-shared-text/elasticsearch-api-placeholders.mdx +++ b/snippets/general-shared-text/elasticsearch-api-placeholders.mdx @@ -1,4 +1,4 @@ - `` (_required_) - A unique name for this connector. -- `hosts` is a _required_ array, with `` specifying the URL of the Elastic Cloud instance to access, for example: `["https://...cloud.es.io"]`. +- `hosts` is a _required_ array, with `` specifying the URL of the Elastic Cloud instance to access, for example: `["https://...cloud.es.io"]`. - `` (_required_) - The Elastic Cloud API key for the target cluster. - `` (_required_) - The name of the target index in the cluster. diff --git a/snippets/general-shared-text/kafka-api-placeholders.mdx b/snippets/general-shared-text/kafka-api-placeholders.mdx index 263bb608..ae1297fc 100644 --- a/snippets/general-shared-text/kafka-api-placeholders.mdx +++ b/snippets/general-shared-text/kafka-api-placeholders.mdx @@ -5,4 +5,5 @@ - `` - For authentication, the API key for access to the cluster. - `` - For authentication, the secret for access to the cluster. - `` - The name of the topic to read messages from or write messages to on the cluster. -- `` - The maximum number of messages that the consumer will try to consume. The default is `100` if not otherwise specified. \ No newline at end of file +- `` (destination connector only) - The maximum number of messages to send in a single batch. The default is `100` if not otherwise specified. +- `` (source connector only) - The maximum number of messages that the consumer will try to consume. The default is `100` if not otherwise specified. \ No newline at end of file diff --git a/snippets/general-shared-text/snowflake-api-placeholders.mdx b/snippets/general-shared-text/snowflake-api-placeholders.mdx index 93768782..0777d01a 100644 --- a/snippets/general-shared-text/snowflake-api-placeholders.mdx +++ b/snippets/general-shared-text/snowflake-api-placeholders.mdx @@ -7,9 +7,8 @@ - `` (_required_): The warehouse's port number. The default is `443` if not otherwise specified. - `` (_required_): The name of the target Snowflake database. - `` (_required_): The name of the target Snowflake schema within the database. -- `` (_required_, source connector only): The name of the target Snowflake table within the database's schema. For the destination connector, the default is `elements` if not otherwise specified. +- ``: The name of the target Snowflake table within the database's schema. For the destination connector, the default is `elements` if not otherwise specified. - `` (source connector only): A comma-separated list of columns to fetch from the table. By default, all columns are fetched unless otherwise specified. - `` (_required_, source connector only): The name of the column that uniquely identifies each record in the table. - `` (destination connector only): The name of the column that uniquely identifies each record in the table. The default is `record_id` if not otherwise specified. -- `` (destination connector only): The name of a column to include. By default, all columns are included if not otherwise specified. - `` (_required_): The maximum number of rows to fetch for each batch. The default is `50` if not otherwise specified. \ No newline at end of file diff --git a/snippets/general-shared-text/snowflake-platform.mdx b/snippets/general-shared-text/snowflake-platform.mdx index 7a02942a..440e22ba 100644 --- a/snippets/general-shared-text/snowflake-platform.mdx +++ b/snippets/general-shared-text/snowflake-platform.mdx @@ -9,7 +9,7 @@ Fill in the following fields: - **Port** (_required_): The warehouse's port number. The default is `443` if not otherwise specified. - **Database** (_required_): The name of the target Snowflake database. - **Schema** (_required_): The name of the target Snowflake schema within the database. -- **Table** (_required_, source connector only): The name of the target Snowflake table within the database's schema. For the destination connector, the default is `elements` if not otherwise specified. +- **Table** (_required_ for source connector only): The name of the target Snowflake table within the database's schema. For the destination connector, the default is `elements` if not otherwise specified. - **Columns** (source connector only): A comma-separated list of columns to fetch from the table. By default, all columns are fetched unless otherwise specified. - **ID Column** (_required_, source connector only): The name of the column that uniquely identifies each record in the table. - **Record ID Key** (destination connector only): The name of the column that uniquely identifies each record in the table. The default is `record_id` if not otherwise specified. diff --git a/snippets/source_connectors/azure_sdk.mdx b/snippets/source_connectors/azure_sdk.mdx index 97e00264..ed53203a 100644 --- a/snippets/source_connectors/azure_sdk.mdx +++ b/snippets/source_connectors/azure_sdk.mdx @@ -1,27 +1,33 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import +( + SourceConnector, + SourceConnectorType, + AzureSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="azure", # Create only. - config={ - "remote_url": "az:///", - "recursive": , + type=SourceConnectorType.AZURE, # Create only. + config=AzureSourceConnectorConfigInput( + remote_url="az:///", + recursive=, # For anonymous authentication, do not set any of the # following fields. # For SAS token authentication: - "account_name": "", - "sas_token": "" + account_name="", + sas_token="" # For account key authentication: - "account_name": "", - "account_key": "" + account_name="", + account_key="" # For connection string authentication: - "connection_string": "" - } + connection_string="" + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/box_sdk.mdx b/snippets/source_connectors/box_sdk.mdx index cb3ae637..d6b8a404 100644 --- a/snippets/source_connectors/box_sdk.mdx +++ b/snippets/source_connectors/box_sdk.mdx @@ -1,14 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + BoxSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="box", # Create only. - config={ - "remote_url": "", - "recursive": "", - "box_app_config": "" - } + type=SourceConnectorType.BOX, # Create only. + config=BoxSourceConnectorConfigInput( + remote_url="", + recursive=, + box_app_config="" + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/confluence_sdk.mdx b/snippets/source_connectors/confluence_sdk.mdx index 8ef23f28..d12c1d6c 100644 --- a/snippets/source_connectors/confluence_sdk.mdx +++ b/snippets/source_connectors/confluence_sdk.mdx @@ -1,32 +1,37 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + ConfluenceSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="confluence", # Create only. - config={ - "url": "", - "max_num_of_spaces": , - "max_num_of_docs_from_each_space": , - "spaces": ["", ""], + type=SourceConnectorType.CONFLUENCE, # Create only. + config=ConfluenceSourceConnectorConfigInput( + url="", + max_num_of_spaces=, + max_num_of_docs_from_each_space=, + spaces=["", ""], # For API token authentication: - "username": "", - "token": "", - "cloud": "" + username="", + token="", + cloud= # For personal access token (PAT) authentication: - "token": "", - "cloud": "false" + token="", + cloud=False # For password authentication: - "username": "", - "password": "", - "cloud": "" - } + username="", + password="", + cloud= + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/couchbase_sdk.mdx b/snippets/source_connectors/couchbase_sdk.mdx index 18c588af..f6e882b9 100644 --- a/snippets/source_connectors/couchbase_sdk.mdx +++ b/snippets/source_connectors/couchbase_sdk.mdx @@ -1,19 +1,24 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + CouchbaseSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="couchbase", # Create only. - config={ - "username": "", - "bucket": "", - "connection_string": "", - "scope": "", - "collection": "", - "password": "", - "batch_size": , - "collection_id": "" - } + type=SourceConnectorType.COUCHBASE, # Create only. + config=CouchbaseSourceConnectorConfigInput( + username="", + bucket="", + connection_string="", + scope="", + collection="", + password="", + batch_size=, + collection_id="" + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/databricks_volumes_sdk.mdx b/snippets/source_connectors/databricks_volumes_sdk.mdx index c9169b80..1c86b38f 100644 --- a/snippets/source_connectors/databricks_volumes_sdk.mdx +++ b/snippets/source_connectors/databricks_volumes_sdk.mdx @@ -1,18 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + DatabricksVolumesConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="databricks_volumes", # Create only. - config={ - "host": "", - "client_id": "" - "client_secret": "", - "catalog": "", - "schema": "", - "volume": "", - "volume_path": "" - } + type=SourceConnectorType.DATABRICKS_VOLUMES, # Create only. + config=DatabricksVolumesConnectorConfigInput( + catalog="", + client_id="", + client_secret="", + host="", + schema_="", + volume="", + volume_path="" + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/dropbox_sdk.mdx b/snippets/source_connectors/dropbox_sdk.mdx index ddb7649b..345ce8d0 100644 --- a/snippets/source_connectors/dropbox_sdk.mdx +++ b/snippets/source_connectors/dropbox_sdk.mdx @@ -1,14 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + DropboxSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="dropbox", # Create only. - config={ - "token": "", - "remote_url": "", - "recursive": - } + type=SourceConnectorType.DROPBOX, # Create only. + config=DropboxSourceConnectorConfigInput( + token="", + remote_url="", + recursive= + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/elasticsearch_sdk.mdx b/snippets/source_connectors/elasticsearch_sdk.mdx index 512e23ac..8d3c4b6a 100644 --- a/snippets/source_connectors/elasticsearch_sdk.mdx +++ b/snippets/source_connectors/elasticsearch_sdk.mdx @@ -1,14 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + ElasticsearchConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="elasticsearch", # Create only. - config={ - "hosts": [""], - "es_api_key": "", - "index_name": "" - } + type=SourceConnectorType.ELASTICSEARCH, # Create only. + config=ElasticsearchConnectorConfigInput( + hosts=[""], + es_api_key="", + index_name="" + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/gcs_sdk.mdx b/snippets/source_connectors/gcs_sdk.mdx index 51f7582c..bf18c52a 100644 --- a/snippets/source_connectors/gcs_sdk.mdx +++ b/snippets/source_connectors/gcs_sdk.mdx @@ -1,14 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + GCSSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="gcs", # Create only. - config={ - "service_account_key": "", - "remote_url": "", - "recursive": - } + type=SourceConnectorType.GCS, # Create only. + config=GCSSourceConnectorConfigInput( + service_account_key="", + remote_url="", + recursive= + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/google_drive_sdk.mdx b/snippets/source_connectors/google_drive_sdk.mdx index afa5d687..4e29f7d7 100644 --- a/snippets/source_connectors/google_drive_sdk.mdx +++ b/snippets/source_connectors/google_drive_sdk.mdx @@ -1,18 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + GoogleDriveSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="google_drive", # Create only. - config={ - "drive_id": "", - "service_account_key": "", - "extensions": [ + type=SourceConnectorType.GOOGLE_DRIVE, # Create only. + config=GoogleDriveSourceConnectorConfigInput( + drive_id="", + service_account_key="", + extensions=[ "", "" ], - "recursive": - } + recursive= + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/kafka_sdk.mdx b/snippets/source_connectors/kafka_sdk.mdx index 8816e723..ae8b7e89 100644 --- a/snippets/source_connectors/kafka_sdk.mdx +++ b/snippets/source_connectors/kafka_sdk.mdx @@ -1,18 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + KafkaCloudSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="kafka-cloud", # Create only. - config={ - "bootstrap_server": "", - "port": , - "group_id": "", - "kafka_api_key": "", - "secret": "", - "topic": "", - "num_messages_to_consume": - } + type=SourceConnectorType.KAFKA_CLOUD, # Create only. + config=KafkaCloudSourceConnectorConfigInput( + bootstrap_servers="", + port=, + group_id="", + kafka_api_key="", + secret="", + topic="", + num_message_to_consume=, + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/mongodb_sdk.mdx b/snippets/source_connectors/mongodb_sdk.mdx index 1a6fe3e1..86980c7e 100644 --- a/snippets/source_connectors/mongodb_sdk.mdx +++ b/snippets/source_connectors/mongodb_sdk.mdx @@ -1,14 +1,19 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + MongoDBConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="mongodb", # Create only. - config={ - "uri": "", - "database": "", - "collection": "" - } + type=SourceConnectorType.MONGODB, # Create only. + config=MongoDBConnectorConfigInput( + uri="", + database="", + collection="" + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/onedrive_sdk.mdx b/snippets/source_connectors/onedrive_sdk.mdx index a796348f..93eac851 100644 --- a/snippets/source_connectors/onedrive_sdk.mdx +++ b/snippets/source_connectors/onedrive_sdk.mdx @@ -1,18 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + OneDriveSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="onedrive", # Create only. - config={ - "client_id": "", - "user_pname": "", - "tenant": "", - "authority_url": "", - "client_cred": "", - "path": "", - "recursive": - } + type=SourceConnectorType.ONEDRIVE, # Create only. + config=OneDriveSourceConnectorConfigInput( + client_id="", + user_pname="", + tenant="", + authority_url="", + client_cred="", + path="", + recursive= + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/outlook_sdk.mdx b/snippets/source_connectors/outlook_sdk.mdx index 5f208329..ac985355 100644 --- a/snippets/source_connectors/outlook_sdk.mdx +++ b/snippets/source_connectors/outlook_sdk.mdx @@ -1,18 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + OutlookSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="outlook", # Create only. - config={ - "client_id": "", - "authority_url": "", - "tenant": "", - "client_cred": "", - "user_email": "", - "outlook_folders": ["",""], - "recursive": - } + type=SourceConnectorType.OUTLOOK, # Create only. + config=OutlookSourceConnectorConfigInput( + client_id="", + authority_url="", + tenant="", + client_cred="", + user_email="", + outlook_folders=["",""], + recursive= + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/postgresql_sdk.mdx b/snippets/source_connectors/postgresql_sdk.mdx index 40d421f2..d90d5a85 100644 --- a/snippets/source_connectors/postgresql_sdk.mdx +++ b/snippets/source_connectors/postgresql_sdk.mdx @@ -1,23 +1,28 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + CreateSourceConnector, + SourceConnectorType, + PostgreSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="postgres", # Create only. - config={ - "host": "", - "database": "", - "port": "", - "username": "", - "password": "", - "table_name": "", - "batch_size": , - "id_column": "", - "fields": [ + type=SourceConnectorType.POSTGRES, # Create only. + config=PostgresSourceConnectorConfigInput( + host="", + database="", + port="", + username="", + password="", + table_name="", + batch_size=, + id_column="", + fields=[ "", "" ] - } + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/s3_sdk.mdx b/snippets/source_connectors/s3_sdk.mdx index e9c5a906..12326bc0 100644 --- a/snippets/source_connectors/s3_sdk.mdx +++ b/snippets/source_connectors/s3_sdk.mdx @@ -1,24 +1,29 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + S3SourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="s3", # Create only. - config={ + type=SourceConnectorType.S3, # Create only. + config=S3SourceConnectorConfigInput( # For anonymous authentication: - "anonymous": true, + anonymous=True, # For AWS access key ID with AWS secret access key authentication: - "key": "", - "secret": "", + key="", + secret="", # For AWS STS token authentication: - "token": "", + token="", - "remote_url": "", - "endpoint_url": "", - "recursive": - } + remote_url="", + endpoint_url="", + recursive= + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/salesforce_sdk.mdx b/snippets/source_connectors/salesforce_sdk.mdx index 4238af0c..6d12f950 100644 --- a/snippets/source_connectors/salesforce_sdk.mdx +++ b/snippets/source_connectors/salesforce_sdk.mdx @@ -1,18 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + SalesforceSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="salesforce", # Create only. - config={ - "username": "", - "consumer_key": "", - "private_key": "", - "categories": [ + type=SourceConnectorType.SALESFORCE, # Create only. + config=SalesforceSourceConnectorConfigInput( + username="", + consumer_key="", + private_key="", + categories=[ "", "" ] - } + ) ) +# ... ``` \ No newline at end of file diff --git a/snippets/source_connectors/sharepoint_sdk.mdx b/snippets/source_connectors/sharepoint_sdk.mdx index a6cec690..5268e3ab 100644 --- a/snippets/source_connectors/sharepoint_sdk.mdx +++ b/snippets/source_connectors/sharepoint_sdk.mdx @@ -1,19 +1,23 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + SharePointSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="sharepoint", # Create only. - config={ - "client_id": "", - "site": "", - "tenant": "", - "authority_url": "", - "user_pname": "", - "client_cred": "", - "path": "", - "recursive": - } + type=SourceConnectorType.SHAREPOINT, # Create only. + config=SharePointSourceConnectorConfigInput( + client_id="", + site="", + tenant="", + authority_url="", + user_pname="", + client_cred="", + path="", + recursive= + ) ) ``` \ No newline at end of file diff --git a/snippets/source_connectors/snowflake_rest_change.mdx b/snippets/source_connectors/snowflake_rest_change.mdx index d1d2f60f..ffe7a44f 100644 --- a/snippets/source_connectors/snowflake_rest_change.mdx +++ b/snippets/source_connectors/snowflake_rest_change.mdx @@ -19,8 +19,8 @@ curl --request 'PUT' --location \ "table_name": "", "batch_size": , "fields": [ - "field", - "field" + "", + "" ] } }' diff --git a/snippets/source_connectors/snowflake_rest_create.mdx b/snippets/source_connectors/snowflake_rest_create.mdx index b8ab559d..b925d8d4 100644 --- a/snippets/source_connectors/snowflake_rest_create.mdx +++ b/snippets/source_connectors/snowflake_rest_create.mdx @@ -21,8 +21,8 @@ curl --request 'POST' --location \ "table_name": "", "batch_size": , "fields": [ - "field", - "field" + "", + "" ] } }' diff --git a/snippets/source_connectors/snowflake_sdk.mdx b/snippets/source_connectors/snowflake_sdk.mdx index 0463bf08..47000554 100644 --- a/snippets/source_connectors/snowflake_sdk.mdx +++ b/snippets/source_connectors/snowflake_sdk.mdx @@ -1,26 +1,31 @@ ```python Python SDK # ... -from unstructured_client.models.shared import SourceConnector +from unstructured_client.models.shared import ( + SourceConnector, + SourceConnectorType, + SnowflakeSourceSourceConnectorConfigInput +) # ... source_connector = SourceConnector( name="", # Create only. - type="sharepoint", # Create only. - config={ - "account": "", - "user": "", - "host": "", - "port": , - "database": "", - "schema": "", - "role": "", - "password": "", - "id_column": "", - "table_name": "", - "batch_size": , - "fields": [ - "field", - "field" - ] - } + type=SourceConnectorType.SNOWFLAKE, # Create only. + config=SnowflakeSourceConnectorConfigInput( + account="", + role="", + user="", + password="", + host=" + database="", + schema_="", + table_name="", + id_column="", + fields=[ + "", + "" + ], + batch_size= + ) ) +# ... ``` \ No newline at end of file