diff --git a/components/databricks/actions/cancel-all-runs/cancel-all-runs.mjs b/components/databricks/actions/cancel-all-runs/cancel-all-runs.mjs index 592740cc949fd..6cbec9bd8ea1c 100644 --- a/components/databricks/actions/cancel-all-runs/cancel-all-runs.mjs +++ b/components/databricks/actions/cancel-all-runs/cancel-all-runs.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-cancel-all-runs", name: "Cancel All Runs", description: "Cancel all active runs for a job. The runs are canceled asynchronously, so it doesn't prevent new runs from being started. [See the documentation](https://docs.databricks.com/api/workspace/jobs/cancelallruns)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/cancel-run/cancel-run.mjs b/components/databricks/actions/cancel-run/cancel-run.mjs index 9af5f0fd4c76a..bb54ba37e5d37 100644 --- a/components/databricks/actions/cancel-run/cancel-run.mjs +++ b/components/databricks/actions/cancel-run/cancel-run.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-cancel-run", name: "Cancel Run", description: "Cancel a job run. The run is canceled asynchronously, so it may still be running when this request completes. [See the documentation](https://docs.databricks.com/api/workspace/jobs/cancelrun)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/create-endpoint/create-endpoint.mjs b/components/databricks/actions/create-endpoint/create-endpoint.mjs index 33bf7ad4d7a8f..046e54bc31dd1 100644 --- a/components/databricks/actions/create-endpoint/create-endpoint.mjs +++ b/components/databricks/actions/create-endpoint/create-endpoint.mjs @@ -5,7 +5,7 @@ export default { key: "databricks-create-endpoint", name: "Create Endpoint", description: "Create a new vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/createendpoint)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { databricks, diff --git a/components/databricks/actions/create-job/create-job.mjs b/components/databricks/actions/create-job/create-job.mjs index 209cf119ac164..708146085ae73 100644 --- a/components/databricks/actions/create-job/create-job.mjs +++ b/components/databricks/actions/create-job/create-job.mjs @@ -5,7 +5,7 @@ export default { key: "databricks-create-job", name: "Create Job", description: "Create a job. [See the documentation](https://docs.databricks.com/api/workspace/jobs/create)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs b/components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs index b953d78090e61..02de4ce9f5c39 100644 --- a/components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs +++ b/components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs @@ -7,7 +7,7 @@ export default { key: "databricks-create-sql-warehouse", name: "Create SQL Warehouse", description: "Creates a new SQL Warehouse in Databricks. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/create)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/create-vector-search-index/create-vector-search-index.mjs b/components/databricks/actions/create-vector-search-index/create-vector-search-index.mjs new file mode 100644 index 0000000000000..492bbca32e0dd --- /dev/null +++ b/components/databricks/actions/create-vector-search-index/create-vector-search-index.mjs @@ -0,0 +1,163 @@ +import databricks from "../../databricks.app.mjs"; +import utils from "../../common/utils.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "databricks-create-vector-search-index", + name: "Create Vector Search Index", + description: + "Creates a new vector search index in Databricks. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/createindex)", + version: "0.0.1", + type: "action", + props: { + databricks, + name: { + type: "string", + label: "Index Name", + description: + "A unique name for the index (e.g., `main_catalog.docs.en_wiki_index`).", + }, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + indexType: { + type: "string", + label: "Index Type", + description: "Type of index (`DELTA_SYNC` or `DIRECT_ACCESS`).", + options: [ + "DELTA_SYNC", + "DIRECT_ACCESS", + ], + }, + primaryKey: { + type: "string", + label: "Primary Key", + description: "The primary key column for the index.", + }, + sourceTable: { + type: "string", + label: "Source Table", + description: + "The Delta table backing the index (required for `DELTA_SYNC`).", + optional: true, + }, + columnsToSync: { + type: "string[]", + label: "Columns to Sync", + description: + "List of columns to sync from the source Delta table. Example: `[\"id\", \"text\"]` (required for `DELTA_SYNC`).", + optional: true, + }, + embeddingSourceColumns: { + type: "string[]", + label: "Embedding Source Columns", + description: + "List of embedding source column configs. Each entry is a JSON object string like `{ \"embedding_model_endpoint_name\": \"e5-small-v2\", \"name\": \"text\" }`.Provide when Databricks computes embeddings (DELTA_SYNC).", + optional: true, + }, + schemaJson: { + type: "string", + label: "Schema JSON", + description: + "The schema of the index in JSON format. Example: `{ \"columns\": [{ \"name\": \"id\", \"type\": \"string\" }, { \"name\": \"text_vector\", \"type\": \"array\" }] }`. Required for `DIRECT_ACCESS` indexes.", + optional: true, + }, + pipelineType: { + type: "string", + label: "Pipeline Type", + description: "Pipeline type for syncing (default: TRIGGERED).", + options: [ + "TRIGGERED", + "CONTINUOUS", + ], + optional: true, + default: "TRIGGERED", + }, + }, + + async run({ $ }) { + const payload = { + name: this.name, + endpoint_name: this.endpointName, + index_type: this.indexType, + primary_key: this.primaryKey, + }; + + if (this.indexType === "DELTA_SYNC") { + if (this.schemaJson) { + throw new ConfigurationError( + "`Schema JSON` is not allowed when indexType is DELTA_SYNC.", + ); + } + if (!this.sourceTable) { + throw new ConfigurationError( + "sourceTable is required when indexType is DELTA_SYNC.", + ); + } + + const columnsToSync = Array.isArray(this.columnsToSync) + ? this.columnsToSync + : utils.parseObject(this.columnsToSync); + + const embeddingSourceColumns = utils.parseObject(this.embeddingSourceColumns); + const hasSource = Array.isArray(embeddingSourceColumns) && embeddingSourceColumns.length > 0; + if (!hasSource) { + throw new ConfigurationError( + "embeddingSourceColumns is required when indexType is DELTA_SYNC.", + ); + } + + const deltaSpec = { + source_table: this.sourceTable, + pipeline_type: this.pipelineType || "TRIGGERED", + }; + if (Array.isArray(columnsToSync) && columnsToSync.length > 0) { + deltaSpec.columns_to_sync = columnsToSync; + } + if (hasSource) { + for (const [ + i, + c, + ] of embeddingSourceColumns.entries()) { + if (!c?.name || !c?.embedding_model_endpoint_name) { + throw new ConfigurationError( + `embeddingSourceColumns[${i}] must include "name" and "embedding_model_endpoint_name"`, + ); + } + } + deltaSpec.embedding_source_columns = embeddingSourceColumns; + } + payload.delta_sync_index_spec = deltaSpec; + } + + else if (this.indexType === "DIRECT_ACCESS") { + if (this.sourceTable || this.columnsToSync?.length || this.embeddingSourceColumns?.length) { + throw new ConfigurationError( + "`Source Table`,`Embedding Source Columns` and `Columns to Sync` are not allowed when indexType is DIRECT_ACCESS.", + ); + } + if (!this.schemaJson) { + throw new ConfigurationError( + "schemaJson is required when indexType is DIRECT_ACCESS.", + ); + } + payload.direct_access_index_spec = { + schema_json: this.schemaJson, + }; + } + + const response = await this.databricks.createVectorSearchIndex({ + data: payload, + $, + }); + + $.export( + "$summary", + `Successfully created vector search index: ${response?.name || this.name}`, + ); + return response; + }, +}; diff --git a/components/databricks/actions/delete-endpoint/delete-endpoint.mjs b/components/databricks/actions/delete-endpoint/delete-endpoint.mjs index 4a95bb6f13e2d..6750820463af8 100644 --- a/components/databricks/actions/delete-endpoint/delete-endpoint.mjs +++ b/components/databricks/actions/delete-endpoint/delete-endpoint.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-delete-endpoint", name: "Delete Endpoint", description: "Delete a vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/deleteendpoint)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { databricks, diff --git a/components/databricks/actions/delete-job/delete-job.mjs b/components/databricks/actions/delete-job/delete-job.mjs index a5e55b716421b..79b6c528ee93e 100644 --- a/components/databricks/actions/delete-job/delete-job.mjs +++ b/components/databricks/actions/delete-job/delete-job.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-delete-job", name: "Delete Job", description: "Delete a job. Deleted jobs cannot be recovered. [See the documentation](https://docs.databricks.com/api/workspace/jobs/delete)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/delete-run/delete-run.mjs b/components/databricks/actions/delete-run/delete-run.mjs index 2fbda0185965d..b27836b1cabb5 100644 --- a/components/databricks/actions/delete-run/delete-run.mjs +++ b/components/databricks/actions/delete-run/delete-run.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-delete-run", name: "Delete Run", description: "Delete a non-active run. Returns an error if the run is active. [See the documentation](https://docs.databricks.com/api/workspace/jobs/deleterun)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs b/components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs index 47584608434df..3300848ba3852 100644 --- a/components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs +++ b/components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-delete-sql-warehouse", name: "Delete SQL Warehouse", description: "Deletes a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/delete)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/delete-vector-search-index-data/delete-vector-search-index-data.mjs b/components/databricks/actions/delete-vector-search-index-data/delete-vector-search-index-data.mjs new file mode 100644 index 0000000000000..b605f15edb7c3 --- /dev/null +++ b/components/databricks/actions/delete-vector-search-index-data/delete-vector-search-index-data.mjs @@ -0,0 +1,64 @@ +import databricks from "../../databricks.app.mjs"; +import utils from "../../common/utils.mjs"; + +export default { + key: "databricks-delete-vector-search-index-data", + name: "Delete Data from Vector Search Index", + description: + "Deletes rows from a Direct Access vector index by primary-key values. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/deletedatavectorindex)", + version: "0.0.1", + type: "action", + props: { + databricks, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + indexName: { + propDefinition: [ + databricks, + "indexName", + ({ endpointName }) => ({ + endpointName, + }), + ], + }, + primaryKeys: { + type: "string[]", + label: "Primary Keys", + description: + "Values of the index’s primary key column to delete (e.g. `1`, `2`). These are the values for the column you set as `primary_key` when the index was created.", + }, + }, + async run({ $ }) { + const parsedKeys = utils.parseObject(this.primaryKeys); + + const keys = (Array.isArray(parsedKeys) + ? parsedKeys + : [ + parsedKeys, + ]) + .map((s) => String(s).trim()) + .filter(Boolean); + + if (!keys.length) { + throw new Error("Please provide at least one primary key to delete."); + } + + const response = await this.databricks.deleteVectorSearchData({ + indexName: this.indexName, + params: { + primary_keys: keys, + }, + $, + }); + + $.export( + "$summary", + `Requested delete of ${keys.length} row(s) from index "${this.indexName}".`, + ); + return response; + }, +}; diff --git a/components/databricks/actions/delete-vector-search-index/delete-vector-search-index.mjs b/components/databricks/actions/delete-vector-search-index/delete-vector-search-index.mjs new file mode 100644 index 0000000000000..756f529d003b0 --- /dev/null +++ b/components/databricks/actions/delete-vector-search-index/delete-vector-search-index.mjs @@ -0,0 +1,36 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-delete-vector-search-index", + name: "Delete Vector Search Index", + description: "Deletes a vector search index in Databricks. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/deleteindex)", + version: "0.0.1", + type: "action", + props: { + databricks, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + indexName: { + propDefinition: [ + databricks, + "indexName", + ({ endpointName }) => ({ + endpointName, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.databricks.deleteVectorSearchIndex({ + indexName: this.indexName, + $, + }); + + $.export("$summary", `Successfully deleted vector search index: ${this.indexName}`); + return response; + }, +}; diff --git a/components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs b/components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs index 293ee437f120a..b98292e6a5faa 100644 --- a/components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs +++ b/components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs @@ -7,7 +7,7 @@ export default { key: "databricks-edit-sql-warehouse", name: "Edit SQL Warehouse", description: "Edits the configuration of an existing SQL Warehouse. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/edit)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/export-run/export-run.mjs b/components/databricks/actions/export-run/export-run.mjs index 63fca03ae7303..71e8e28fd7ea9 100644 --- a/components/databricks/actions/export-run/export-run.mjs +++ b/components/databricks/actions/export-run/export-run.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-export-run", name: "Export Run", description: "Export and retrieve the job run task. [See the documentation](https://docs.databricks.com/api/workspace/jobs/exportrun)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/get-endpoint/get-endpoint.mjs b/components/databricks/actions/get-endpoint/get-endpoint.mjs index 1f494f4658be1..0937ff8482688 100644 --- a/components/databricks/actions/get-endpoint/get-endpoint.mjs +++ b/components/databricks/actions/get-endpoint/get-endpoint.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-endpoint", name: "Get Endpoint", description: "Get details of a specific vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/getendpoint)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { databricks, diff --git a/components/databricks/actions/get-job-permissions/get-job-permissions.mjs b/components/databricks/actions/get-job-permissions/get-job-permissions.mjs index 3c9bae4657b9d..c1e77b0564888 100644 --- a/components/databricks/actions/get-job-permissions/get-job-permissions.mjs +++ b/components/databricks/actions/get-job-permissions/get-job-permissions.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-job-permissions", name: "Get Job Permissions", description: "Get permissions of a job. [See the documentation](https://docs.databricks.com/api/workspace/jobs/getpermissions)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/get-job/get-job.mjs b/components/databricks/actions/get-job/get-job.mjs index 6e418684cdd14..fd029c564e3b8 100644 --- a/components/databricks/actions/get-job/get-job.mjs +++ b/components/databricks/actions/get-job/get-job.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-job", name: "Get Job", description: "Retrieves the details for a single job. [See the documentation](https://docs.databricks.com/api/workspace/jobs/get)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/get-run-output/get-run-output.mjs b/components/databricks/actions/get-run-output/get-run-output.mjs index c44b1001a7bfa..6bc6ee495e0cb 100644 --- a/components/databricks/actions/get-run-output/get-run-output.mjs +++ b/components/databricks/actions/get-run-output/get-run-output.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-run-output", name: "Get Run Output", description: "Retrieve the output and metadata of a single task run. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#runs-get-output)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { databricks, diff --git a/components/databricks/actions/get-run/get-run.mjs b/components/databricks/actions/get-run/get-run.mjs index 84d95be7c0d5c..607fee72566b8 100644 --- a/components/databricks/actions/get-run/get-run.mjs +++ b/components/databricks/actions/get-run/get-run.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-run", name: "Get Run", description: "Retrieve the metadata of a run. [See the documentation](https://docs.databricks.com/api/workspace/jobs/getrun)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs b/components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs index 1fbdda709e71b..3ab986eb06a7a 100644 --- a/components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs +++ b/components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-sql-warehouse-config", name: "Get SQL Warehouse Config", description: "Retrieves the global configuration for SQL Warehouses. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/getworkspacewarehouseconfig)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs b/components/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs index 4d76f5bb41c74..c7098db9d4156 100644 --- a/components/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs +++ b/components/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-sql-warehouse-permissions", name: "Get SQL Warehouse Permissions", description: "Retrieves the permissions for a specific SQL Warehouse. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/getpermissions)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs b/components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs index 28d131c05c8f1..21fd9701333a9 100644 --- a/components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs +++ b/components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-get-sql-warehouse", name: "Get SQL Warehouse", description: "Retrieves details for a specific SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouses/get)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/get-vector-search-index/get-vector-search-index.mjs b/components/databricks/actions/get-vector-search-index/get-vector-search-index.mjs new file mode 100644 index 0000000000000..6ead8475541e1 --- /dev/null +++ b/components/databricks/actions/get-vector-search-index/get-vector-search-index.mjs @@ -0,0 +1,40 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-get-vector-search-index", + name: "Get Vector Search Index", + description: "Retrieves details about a specific vector search index. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/getindex)", + version: "0.0.1", + type: "action", + props: { + databricks, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + indexName: { + propDefinition: [ + databricks, + "indexName", + ({ endpointName }) => ({ + endpointName, + }), + ], + }, + }, + + async run({ $ }) { + const response = await this.databricks.getVectorSearchIndex({ + indexName: this.indexName, + $, + }); + + $.export( + "$summary", + `Successfully retrieved vector search index: ${this.indexName}`, + ); + return response; + }, +}; diff --git a/components/databricks/actions/list-endpoints/list-endpoints.mjs b/components/databricks/actions/list-endpoints/list-endpoints.mjs index c0fe92e1672e6..9e692d7ecdae7 100644 --- a/components/databricks/actions/list-endpoints/list-endpoints.mjs +++ b/components/databricks/actions/list-endpoints/list-endpoints.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-list-endpoints", name: "List Endpoints", description: "List all vector search endpoints. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/listendpoints)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { databricks, diff --git a/components/databricks/actions/list-jobs/list-jobs.mjs b/components/databricks/actions/list-jobs/list-jobs.mjs index 9f60a6ea0224b..4781153909c4b 100644 --- a/components/databricks/actions/list-jobs/list-jobs.mjs +++ b/components/databricks/actions/list-jobs/list-jobs.mjs @@ -5,7 +5,7 @@ export default { key: "databricks-list-jobs", name: "List Jobs", description: "List all jobs using automatic pagination. [See the documentation](https://docs.databricks.com/api/workspace/jobs/list)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/list-runs/list-runs.mjs b/components/databricks/actions/list-runs/list-runs.mjs index d2d7fe17cd3f3..e03846d411551 100644 --- a/components/databricks/actions/list-runs/list-runs.mjs +++ b/components/databricks/actions/list-runs/list-runs.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-list-runs", name: "List Runs", description: "Lists all runs available to the user. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#runs-list)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { databricks, diff --git a/components/databricks/actions/list-sql-warehouses/list-sql-warehouses.mjs b/components/databricks/actions/list-sql-warehouses/list-sql-warehouses.mjs index 356622572a9a9..5b63c9c874a82 100644 --- a/components/databricks/actions/list-sql-warehouses/list-sql-warehouses.mjs +++ b/components/databricks/actions/list-sql-warehouses/list-sql-warehouses.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-list-sql-warehouses", name: "List SQL Warehouses", description: "Lists all SQL Warehouses available in the Databricks workspace. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/list)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/list-vector-search-indexes/list-vector-search-indexes.mjs b/components/databricks/actions/list-vector-search-indexes/list-vector-search-indexes.mjs new file mode 100644 index 0000000000000..28e71eb08d0a1 --- /dev/null +++ b/components/databricks/actions/list-vector-search-indexes/list-vector-search-indexes.mjs @@ -0,0 +1,36 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-list-vector-search-indexes", + name: "List Vector Search Indexes", + description: "Lists all vector search indexes for a given endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/listindexes)", + version: "0.0.1", + type: "action", + props: { + databricks, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + }, + + async run({ $ }) { + const { vector_indexes = [] } = await this.databricks.listVectorSearchIndexes({ + params: { + endpoint_name: this.endpointName, + }, + $, + }); + + $.export( + "$summary", + `Successfully retrieved ${vector_indexes.length} index${vector_indexes.length === 1 + ? "" + : "es"}.`, + ); + + return vector_indexes; + }, +}; diff --git a/components/databricks/actions/query-vector-search-index/query-vector-search-index.mjs b/components/databricks/actions/query-vector-search-index/query-vector-search-index.mjs new file mode 100644 index 0000000000000..44f8cfac7685d --- /dev/null +++ b/components/databricks/actions/query-vector-search-index/query-vector-search-index.mjs @@ -0,0 +1,106 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-query-vector-search-index", + name: "Query Vector Search Index", + description: "Query a specific vector search index in Databricks. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/queryindex)", + version: "0.0.1", + type: "action", + props: { + databricks, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + indexName: { + propDefinition: [ + databricks, + "indexName", + ({ endpointName }) => ({ + endpointName, + }), + ], + }, + columns: { + type: "string[]", + label: "Columns", + description: "List of column names to include in the response. Example: `[\"id\"]`", + }, + queryText: { + type: "string", + label: "Query Text", + description: "Free-text query for semantic search.", + optional: true, + }, + queryVector: { + type: "string", + label: "Query Vector", + description: "JSON array of floats representing the embedding vector for the query.", + optional: true, + }, + filtersJson: { + type: "string", + label: "Filters JSON", + description: "JSON string representing query filters. Example: `{ \"id <\": 5 }`", + optional: true, + }, + numResults: { + type: "integer", + label: "Number of Results", + description: "Number of results to return. Defaults to 10.", + optional: true, + default: 10, + }, + includeEmbeddings: { + type: "boolean", + label: "Include Embeddings", + description: "Whether to include the embedding vectors in the results.", + optional: true, + }, + }, + + async run({ $ }) { + const payload = { + columns: this.columns, + num_results: this.numResults, + }; + + if (this.queryText) payload.query_text = this.queryText; + + if (this.queryVector) { + try { + payload.query_vector = JSON.parse(this.queryVector); + if ( + !Array.isArray(payload.query_vector) || + payload.query_vector.length === 0 || + !payload.query_vector.every((n) => typeof n === "number" && Number.isFinite(n)) + ) { + throw new Error("`queryVector` must be a non-empty JSON array of finite numbers."); + } + } catch (err) { + throw new Error(`Invalid queryVector JSON: ${err.message}`); + } + } + + if (this.filtersJson) { + payload.filters_json = this.filtersJson; + } + + if (this.includeEmbeddings !== undefined) { + payload.include_embeddings = this.includeEmbeddings; + } + + const response = await this.databricks.queryVectorSearchIndex({ + indexName: this.indexName, + data: payload, + $, + }); + + const count = response?.result?.data_array?.length || 0; + $.export("$summary", `Retrieved ${count} results from index ${this.indexName}`); + + return response; + }, +}; diff --git a/components/databricks/actions/repair-run/repair-run.mjs b/components/databricks/actions/repair-run/repair-run.mjs index e5f9234fdf800..ef4e4015fb5db 100644 --- a/components/databricks/actions/repair-run/repair-run.mjs +++ b/components/databricks/actions/repair-run/repair-run.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-repair-run", name: "Repair Run", description: "Re-run one or more tasks. [See the documentation](https://docs.databricks.com/api/workspace/jobs/repairrun)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/reset-job/reset-job.mjs b/components/databricks/actions/reset-job/reset-job.mjs index cf6acbc2af856..44aa051ea1d3f 100644 --- a/components/databricks/actions/reset-job/reset-job.mjs +++ b/components/databricks/actions/reset-job/reset-job.mjs @@ -5,7 +5,7 @@ export default { key: "databricks-reset-job", name: "Reset Job", description: "Overwrite all settings for the given job. [See the documentation](https://docs.databricks.com/api/workspace/jobs/reset)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/run-job-now/run-job-now.mjs b/components/databricks/actions/run-job-now/run-job-now.mjs index 4318cb98d9e8a..11c6e52ad930c 100644 --- a/components/databricks/actions/run-job-now/run-job-now.mjs +++ b/components/databricks/actions/run-job-now/run-job-now.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-run-job-now", name: "Run Job Now", description: "Run a job now and return the id of the triggered run. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#runs-list)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { databricks, diff --git a/components/databricks/actions/scan-vector-search-index/scan-vector-search-index.mjs b/components/databricks/actions/scan-vector-search-index/scan-vector-search-index.mjs new file mode 100644 index 0000000000000..c1036d0d10220 --- /dev/null +++ b/components/databricks/actions/scan-vector-search-index/scan-vector-search-index.mjs @@ -0,0 +1,64 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-scan-vector-search-index", + name: "Scan Vector Search Index", + description: + "Scans a vector search index and returns entries after the given primary key. [See documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/scanindex)", + version: "0.0.1", + type: "action", + props: { + databricks, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + indexName: { + propDefinition: [ + databricks, + "indexName", + ({ endpointName }) => ({ + endpointName, + }), + ], + }, + lastPrimaryKey: { + type: "string", + label: "Last Primary Key", + description: + "Primary key of the last entry returned in the previous scan. Leave empty to start from the beginning.", + optional: true, + }, + numResults: { + type: "integer", + label: "Number of Results", + description: "Number of results to return (defaults to 10).", + optional: true, + default: 10, + }, + }, + + async run({ $ }) { + const body = {}; + if (this.lastPrimaryKey !== undefined) { + body.last_primary_key = this.lastPrimaryKey; + } + if (this.numResults !== undefined) { + body.num_results = this.numResults; + } + + const response = await this.databricks.scanVectorSearchIndex({ + indexName: this.indexName, + data: body, + $, + }); + + $.export( + "$summary", + `Scanned index "${this.indexName}" and returned ${response?.data?.length ?? 0} entries.`, + ); + return response; + }, +}; diff --git a/components/databricks/actions/set-job-permissions/set-job-permissions.mjs b/components/databricks/actions/set-job-permissions/set-job-permissions.mjs index adf2897ec8faf..5c0cde44682c1 100644 --- a/components/databricks/actions/set-job-permissions/set-job-permissions.mjs +++ b/components/databricks/actions/set-job-permissions/set-job-permissions.mjs @@ -5,7 +5,7 @@ export default { key: "databricks-set-job-permissions", name: "Set Job Permissions", description: "Set permissions on a job. [See the documentation](https://docs.databricks.com/api/workspace/jobs/setpermissions)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs b/components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs index 6c9d4a7b98e6e..c8e1252417614 100644 --- a/components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs +++ b/components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs @@ -6,7 +6,7 @@ export default { key: "databricks-set-sql-warehouse-config", name: "Set SQL Warehouse Config", description: "Updates the global configuration for SQL Warehouses. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/setworkspacewarehouseconfig)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/set-sql-warehouse-permissions/set-sql-warehouse-permissions.mjs b/components/databricks/actions/set-sql-warehouse-permissions/set-sql-warehouse-permissions.mjs index 202d1677dd5a9..9d62bd131465b 100644 --- a/components/databricks/actions/set-sql-warehouse-permissions/set-sql-warehouse-permissions.mjs +++ b/components/databricks/actions/set-sql-warehouse-permissions/set-sql-warehouse-permissions.mjs @@ -6,7 +6,7 @@ export default { key: "databricks-set-sql-warehouse-permissions", name: "Set SQL Warehouse Permissions", description: "Updates the permissions for a specific SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouses/setpermissions)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/start-sql-warehouse/start-sql-warehouse.mjs b/components/databricks/actions/start-sql-warehouse/start-sql-warehouse.mjs index 669a593323040..5cba5641b2bd3 100644 --- a/components/databricks/actions/start-sql-warehouse/start-sql-warehouse.mjs +++ b/components/databricks/actions/start-sql-warehouse/start-sql-warehouse.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-start-sql-warehouse", name: "Start SQL Warehouse", description: "Starts a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/start)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/stop-sql-warehouse/stop-sql-warehouse.mjs b/components/databricks/actions/stop-sql-warehouse/stop-sql-warehouse.mjs index 0117fca5d801d..8c1b8a932a0a8 100644 --- a/components/databricks/actions/stop-sql-warehouse/stop-sql-warehouse.mjs +++ b/components/databricks/actions/stop-sql-warehouse/stop-sql-warehouse.mjs @@ -4,7 +4,7 @@ export default { key: "databricks-stop-sql-warehouse", name: "Stop SQL Warehouse", description: "Stops a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/stop)", - version: "0.0.3", + version: "0.0.4", type: "action", props: { databricks, diff --git a/components/databricks/actions/sync-vector-search-index/sync-vector-search-index.mjs b/components/databricks/actions/sync-vector-search-index/sync-vector-search-index.mjs new file mode 100644 index 0000000000000..ceb744671c506 --- /dev/null +++ b/components/databricks/actions/sync-vector-search-index/sync-vector-search-index.mjs @@ -0,0 +1,40 @@ +import databricks from "../../databricks.app.mjs"; + +export default { + key: "databricks-sync-vector-search-index", + name: "Sync Vector Search Index", + description: "Synchronize a Delta Sync vector search index in Databricks. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/syncindex)", + version: "0.0.1", + type: "action", + props: { + databricks, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + indexName: { + propDefinition: [ + databricks, + "indexName", + ({ endpointName }) => ({ + endpointName, + }), + ], + }, + }, + async run({ $ }) { + const response = await this.databricks.syncVectorSearchIndex({ + indexName: this.indexName, + $, + }); + + $.export( + "$summary", + `Successfully triggered sync for vector search index: ${this.indexName}`, + ); + + return response; + }, +}; diff --git a/components/databricks/actions/update-job/update-job.mjs b/components/databricks/actions/update-job/update-job.mjs index 6d6afec50bb7f..8cb8f6c81d36d 100644 --- a/components/databricks/actions/update-job/update-job.mjs +++ b/components/databricks/actions/update-job/update-job.mjs @@ -5,7 +5,7 @@ export default { key: "databricks-update-job", name: "Update Job", description: "Update an existing job. Only the fields that are provided will be updated. [See the documentation](https://docs.databricks.com/api/workspace/jobs/update)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { app, diff --git a/components/databricks/actions/upsert-vector-search-index-data/upsert-vector-search-index-data.mjs b/components/databricks/actions/upsert-vector-search-index-data/upsert-vector-search-index-data.mjs new file mode 100644 index 0000000000000..6e4f5cca592e9 --- /dev/null +++ b/components/databricks/actions/upsert-vector-search-index-data/upsert-vector-search-index-data.mjs @@ -0,0 +1,53 @@ +import databricks from "../../databricks.app.mjs"; +import utils from "../../common/utils.mjs"; +import { ConfigurationError } from "@pipedream/platform"; + +export default { + key: "databricks-upsert-vector-search-index-data", + name: "Upsert Vector Search Index Data", + description: "Upserts (inserts/updates) data into an existing vector search index. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchindexes/upsertdatavectorindex)", + version: "0.0.1", + type: "action", + props: { + databricks, + endpointName: { + propDefinition: [ + databricks, + "endpointName", + ], + }, + indexName: { + propDefinition: [ + databricks, + "indexName", + ({ endpointName }) => ({ + endpointName, + }), + ], + }, + rows: { + type: "string", + label: "Rows to Upsert", + description: "Array of rows to upsert. Each row should be a JSON object string. Example: `[{ \"id\": \"1\", \"text\": \"hello world\", \"text_vector\": [0.1, 0.2, 0.3] }]`", + }, + }, + + async run({ $ }) { + const parsedRows = utils.parseObject(this.rows); + + if (!Array.isArray(parsedRows) || !parsedRows.length) { + throw new ConfigurationError("rows must be a non-empty JSON array."); + } + + const response = await this.databricks.upsertVectorSearchIndexData({ + indexName: this.indexName, + data: { + inputs_json: JSON.stringify(parsedRows), + }, + $, + }); + + $.export("$summary", `Successfully upserted ${parsedRows.length} row(s) into index ${this.indexName}`); + return response; + }, +}; diff --git a/components/databricks/databricks.app.mjs b/components/databricks/databricks.app.mjs index d4f941e5c922c..607764fdc69e4 100644 --- a/components/databricks/databricks.app.mjs +++ b/components/databricks/databricks.app.mjs @@ -67,7 +67,7 @@ export default { description: "The name of the vector search endpoint", async options({ prevContext }) { const { - endpoints, next_page_token, + endpoints = [], next_page_token, } = await this.listEndpoints({ params: { page_token: prevContext.page_token, @@ -97,6 +97,26 @@ export default { })) || []; }, }, + indexName: { + type: "string", + label: "Index Name", + description: "The name of the vector search index", + async options({ endpointName }) { + if (!endpointName) { + return []; + } + const { vector_indexes = [] } = await this.listVectorSearchIndexes({ + params: { + endpoint_name: endpointName, + }, + }); + + return vector_indexes.map(({ name }) => ({ + value: name, + label: name, + })); + }, + }, }, methods: { getUrl(path, versionPath = constants.VERSION_PATH.V2_0) { @@ -371,6 +391,99 @@ export default { ...args, }); }, + createVectorSearchIndex(args = {}) { + return this._makeRequest({ + path: "/vector-search/indexes", + method: "POST", + ...args, + }); + }, + + getVectorSearchIndex({ + indexName, ...args + }) { + return this._makeRequest({ + path: `/vector-search/indexes/${indexName}`, + method: "GET", + ...args, + }); + }, + + listVectorSearchIndexes({ + params, ...args + }) { + return this._makeRequest({ + path: "/vector-search/indexes", + method: "GET", + params, + ...args, + }); + }, + + deleteVectorSearchIndex({ + indexName, ...args + }) { + return this._makeRequest({ + path: `/vector-search/indexes/${indexName}`, + method: "DELETE", + ...args, + }); + }, + + queryVectorSearchIndex({ + indexName, ...args + }) { + return this._makeRequest({ + path: `/vector-search/indexes/${indexName}/query`, + method: "POST", + ...args, + }); + }, + + syncVectorSearchIndex({ + indexName, ...args + }) { + return this._makeRequest({ + path: `/vector-search/indexes/${indexName}/sync`, + method: "POST", + ...args, + }); + }, + + deleteVectorSearchData({ + indexName, params, ...args + }) + { + return this._makeRequest({ + path: `/vector-search/indexes/${indexName}/delete-data`, + method: "DELETE", + params, + paramsSerializer: { + indexes: null, + }, + ...args, + }); + }, + + upsertVectorSearchIndexData({ + indexName, ...args + }) { + return this._makeRequest({ + path: `/vector-search/indexes/${indexName}/upsert-data`, + method: "POST", + ...args, + }); + }, + + scanVectorSearchIndex({ + indexName, ...args + }) { + return this._makeRequest({ + path: `/vector-search/indexes/${indexName}/scan`, + method: "POST", + ...args, + }); + }, async paginate({ requestor, requestorArgs = {}, maxRequests = 3, resultsKey = "jobs", diff --git a/components/databricks/package.json b/components/databricks/package.json index c82b72576579b..22ed3bf6d6cb6 100644 --- a/components/databricks/package.json +++ b/components/databricks/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/databricks", - "version": "0.4.0", + "version": "0.5.0", "description": "Pipedream Databricks Components", "main": "databricks.app.mjs", "keywords": [ diff --git a/components/expensify/actions/list-policies/list-policies.ts b/components/expensify/actions/list-policies/list-policies.ts new file mode 100644 index 0000000000000..ea21ce50e4b36 --- /dev/null +++ b/components/expensify/actions/list-policies/list-policies.ts @@ -0,0 +1,36 @@ +import { defineAction } from "@pipedream/types"; +import expensify from "../../app/expensify.app"; + +export default defineAction({ + key: "expensify-list-policies", + name: "List Policies", + description: "Retrieves a list of policies. [See the documentation](https://integrations.expensify.com/Integration-Server/doc/#policy-list-getter)", + version: "0.0.1", + type: "action", + props: { + expensify, + adminOnly: { + type: "boolean", + label: "Admin Only", + description: "Whether or not to only get policies for which the user is an admin", + optional: true, + }, + userEmail: { + type: "string", + label: "User Email", + description: "Specifies the user to gather the policy list for. You must have been granted third-party access by that user/company domain beforehand.", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.expensify.getPolicyList({ + $, + userEmail: this.userEmail, + adminOnly: this.adminOnly, + }); + + $.export("$summary", `Successfully retrieved ${response?.policyList?.length || 0} policies`); + + return response?.policyList || []; + }, +}) diff --git a/components/expensify/package.json b/components/expensify/package.json index bea532e7eb6eb..182dfef645c5c 100644 --- a/components/expensify/package.json +++ b/components/expensify/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/expensify", - "version": "0.2.0", + "version": "0.3.0", "description": "Pipedream Expensify Components", "main": "dist/app/expensify.app.mjs", "keywords": [ diff --git a/components/hubspot/package.json b/components/hubspot/package.json index a3982d87f377c..2801fa5b7c616 100644 --- a/components/hubspot/package.json +++ b/components/hubspot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hubspot", - "version": "1.7.6", + "version": "1.7.7", "description": "Pipedream Hubspot Components", "main": "hubspot.app.mjs", "keywords": [ diff --git a/components/hubspot/sources/common/common.mjs b/components/hubspot/sources/common/common.mjs index 0cb85be397b60..a46586fe3de0c 100644 --- a/components/hubspot/sources/common/common.mjs +++ b/components/hubspot/sources/common/common.mjs @@ -54,7 +54,7 @@ export default { async processEvents(resources, after) { let maxTs = after || 0; for (const result of resources) { - if (await this.isRelevant(result, after)) { + if (!after || await this.isRelevant(result, after)) { this.emitEvent(result); const ts = this.getTs(result); if (ts > maxTs) { @@ -80,8 +80,10 @@ export default { for (const result of results) { const ts = this.getTs(result); - if (!after || ts > after) { - if (await this.isRelevant(result, after, ts)) { + // Adding ts && !after to handle the case where ts is null + // (e.g. when using deletedAt as the ts field for deleted items) + if ((ts && !after) || ts > after) { + if (!after || await this.isRelevant(result, after, ts)) { this.emitEvent(result); } if (ts > maxTs) { @@ -124,7 +126,7 @@ export default { items = results; } for (const item of items) { - if (await this.isRelevant(item, after)) { + if (!after || await this.isRelevant(item, after)) { this.emitEvent(item); const ts = this.getTs(item); if (ts > maxTs) { diff --git a/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs b/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs index dfd57c0b66ad4..106df977b47b1 100644 --- a/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs +++ b/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-delete-blog-article", name: "Deleted Blog Posts", description: "Emit new event for each deleted blog post.", - version: "0.0.33", + version: "0.0.34", dedupe: "unique", type: "source", methods: { diff --git a/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs b/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs index d0981b47579ff..ca1346f20c682 100644 --- a/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs +++ b/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-company-property-change", name: "New Company Property Change", description: "Emit new event when a specified property is provided or updated on a company. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)", - version: "0.0.26", + version: "0.0.27", dedupe: "unique", type: "source", props: { @@ -43,7 +43,7 @@ export default { }; }, isRelevant(company, updatedAfter) { - return !updatedAfter || this.getTs(company) > updatedAfter; + return this.getTs(company) > updatedAfter; }, getParams(after) { const params = { diff --git a/components/hubspot/sources/new-contact-added-to-list/new-contact-added-to-list.mjs b/components/hubspot/sources/new-contact-added-to-list/new-contact-added-to-list.mjs index 719f41c674b9d..bd04257686de7 100644 --- a/components/hubspot/sources/new-contact-added-to-list/new-contact-added-to-list.mjs +++ b/components/hubspot/sources/new-contact-added-to-list/new-contact-added-to-list.mjs @@ -12,7 +12,7 @@ export default { name: "New Contact Added to List", description: "Emit new event when a contact is added to a HubSpot list. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/lists#get-%2Fcrm%2Fv3%2Flists%2F%7Blistid%7D%2Fmemberships%2Fjoin-order)", - version: "0.0.5", + version: "0.0.6", type: "source", dedupe: "unique", props: { diff --git a/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs b/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs index 1f772c7fa9833..ea8253c82a4c3 100644 --- a/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs +++ b/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-contact-property-change", name: "New Contact Property Change", description: "Emit new event when a specified property is provided or updated on a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts)", - version: "0.0.28", + version: "0.0.29", dedupe: "unique", type: "source", props: { @@ -43,7 +43,7 @@ export default { }; }, isRelevant(contact, updatedAfter) { - return !updatedAfter || this.getTs(contact) > updatedAfter; + return this.getTs(contact) > updatedAfter; }, getParams(after) { const params = { diff --git a/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs b/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs index afd2fac5e75b9..f39ab0f698aa8 100644 --- a/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs +++ b/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs @@ -7,7 +7,7 @@ export default { name: "New Custom Object Property Change", description: "Emit new event when a specified property is provided or updated on a custom object.", - version: "0.0.18", + version: "0.0.19", dedupe: "unique", type: "source", props: { @@ -49,7 +49,7 @@ export default { }; }, isRelevant(object, updatedAfter) { - return !updatedAfter || this.getTs(object) > updatedAfter; + return this.getTs(object) > updatedAfter; }, getParams(after) { const params = { diff --git a/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs b/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs index 8a1ae62e89231..861a6f793fb3d 100644 --- a/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs +++ b/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs @@ -11,7 +11,7 @@ export default { key: "hubspot-new-deal-in-stage", name: "New Deal In Stage", description: "Emit new event for each new deal in a stage.", - version: "0.0.39", + version: "0.0.40", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs b/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs index 902a87c91c433..ef146a37090f3 100644 --- a/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs +++ b/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-deal-property-change", name: "New Deal Property Change", description: "Emit new event when a specified property is provided or updated on a deal. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals)", - version: "0.0.27", + version: "0.0.28", dedupe: "unique", type: "source", props: { @@ -41,7 +41,7 @@ export default { }; }, isRelevant(deal, updatedAfter) { - return !updatedAfter || this.getTs(deal) > updatedAfter; + return this.getTs(deal) > updatedAfter; }, getParams(after) { const params = { diff --git a/components/hubspot/sources/new-email-event/new-email-event.mjs b/components/hubspot/sources/new-email-event/new-email-event.mjs index 4123cb5dfc758..d046db22404d4 100644 --- a/components/hubspot/sources/new-email-event/new-email-event.mjs +++ b/components/hubspot/sources/new-email-event/new-email-event.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-email-event", name: "New Email Event", description: "Emit new event for each new Hubspot email event.", - version: "0.0.36", + version: "0.0.37", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs b/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs index 2453b3226a42c..6ab0693e04ef5 100644 --- a/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs +++ b/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-email-subscriptions-timeline", name: "New Email Subscriptions Timeline", description: "Emit new event when a new email timeline subscription is added for the portal.", - version: "0.0.33", + version: "0.0.34", dedupe: "unique", type: "source", methods: { diff --git a/components/hubspot/sources/new-engagement/new-engagement.mjs b/components/hubspot/sources/new-engagement/new-engagement.mjs index 21be9136dff46..a97eddd656a85 100644 --- a/components/hubspot/sources/new-engagement/new-engagement.mjs +++ b/components/hubspot/sources/new-engagement/new-engagement.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-engagement", name: "New Engagement", description: "Emit new event for each new engagement created. This action returns a maximum of 5000 records at a time, make sure you set a correct time range so you don't miss any events", - version: "0.0.38", + version: "0.0.39", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-event/new-event.mjs b/components/hubspot/sources/new-event/new-event.mjs index a587a10f05ca4..8dad64d7269e8 100644 --- a/components/hubspot/sources/new-event/new-event.mjs +++ b/components/hubspot/sources/new-event/new-event.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-event", name: "New Events", description: "Emit new event for each new Hubspot event. Note: Only available for Marketing Hub Enterprise, Sales Hub Enterprise, Service Hub Enterprise, or CMS Hub Enterprise accounts", - version: "0.0.37", + version: "0.0.38", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-form-submission/new-form-submission.mjs b/components/hubspot/sources/new-form-submission/new-form-submission.mjs index 808c8d3186559..5efe190281422 100644 --- a/components/hubspot/sources/new-form-submission/new-form-submission.mjs +++ b/components/hubspot/sources/new-form-submission/new-form-submission.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-form-submission", name: "New Form Submission", description: "Emit new event for each new submission of a form.", - version: "0.0.38", + version: "0.0.39", dedupe: "unique", type: "source", props: { @@ -36,7 +36,7 @@ export default { } for (const result of results) { - if (await this.isRelevant(result, after)) { + if (!after || await this.isRelevant(result, after)) { const form = await this.hubspot.getFormDefinition({ formId: params.formId, }); diff --git a/components/hubspot/sources/new-note/new-note.mjs b/components/hubspot/sources/new-note/new-note.mjs index 719e7553ddc0e..da8c052060f8a 100644 --- a/components/hubspot/sources/new-note/new-note.mjs +++ b/components/hubspot/sources/new-note/new-note.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-note", name: "New Note Created", description: "Emit new event for each new note created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/notes#get-%2Fcrm%2Fv3%2Fobjects%2Fnotes)", - version: "1.0.14", + version: "1.0.15", type: "source", dedupe: "unique", methods: { diff --git a/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs b/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs index 360e1845bf66c..ed606bf531b81 100644 --- a/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs +++ b/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-blog-article", name: "New or Updated Blog Post", description: "Emit new event for each new or updated blog post in Hubspot.", - version: "0.0.20", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs b/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs index 393c668d6bacd..d42a9fbe796a4 100644 --- a/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs +++ b/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs @@ -10,7 +10,7 @@ export default { key: "hubspot-new-or-updated-company", name: "New or Updated Company", description: "Emit new event for each new or updated company in Hubspot.", - version: "0.0.20", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs b/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs index 424dc2779bf72..b464eedb9e790 100644 --- a/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs +++ b/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs @@ -10,7 +10,7 @@ export default { key: "hubspot-new-or-updated-contact", name: "New or Updated Contact", description: "Emit new event for each new or updated contact in Hubspot.", - version: "0.0.21", + version: "0.0.22", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs b/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs index 3f94a2a14ff5a..defa09de96e18 100644 --- a/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs +++ b/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-crm-object", name: "New or Updated CRM Object", description: "Emit new event each time a CRM Object of the specified object type is updated.", - version: "0.0.33", + version: "0.0.34", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs b/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs index 710da770b1b9b..d91e1fda69f60 100644 --- a/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs +++ b/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-custom-object", name: "New or Updated Custom Object", description: "Emit new event each time a Custom Object of the specified schema is updated.", - version: "0.0.22", + version: "0.0.23", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs b/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs index 2626a04fb069e..406cb6697b5db 100644 --- a/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs +++ b/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs @@ -10,7 +10,7 @@ export default { key: "hubspot-new-or-updated-deal", name: "New or Updated Deal", description: "Emit new event for each new or updated deal in Hubspot", - version: "0.0.20", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs b/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs index 36900843e30e0..a9b5628759b68 100644 --- a/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs +++ b/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs @@ -10,7 +10,7 @@ export default { key: "hubspot-new-or-updated-line-item", name: "New or Updated Line Item", description: "Emit new event for each new line item added or updated in Hubspot.", - version: "0.0.20", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs b/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs index b701fdeda52e1..ab18728b293f0 100644 --- a/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs +++ b/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs @@ -10,7 +10,7 @@ export default { key: "hubspot-new-or-updated-product", name: "New or Updated Product", description: "Emit new event for each new or updated product in Hubspot.", - version: "0.0.20", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs b/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs index 12523f93d734b..0bc5ae862339b 100644 --- a/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs +++ b/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs @@ -7,7 +7,7 @@ export default { name: "New Social Media Message", description: "Emit new event when a message is posted from HubSpot to the specified social media channel. Note: Only available for Marketing Hub Enterprise accounts", - version: "0.0.33", + version: "0.0.34", type: "source", dedupe: "unique", props: { diff --git a/components/hubspot/sources/new-task/new-task.mjs b/components/hubspot/sources/new-task/new-task.mjs index 46b646dbd6612..d849687e832b9 100644 --- a/components/hubspot/sources/new-task/new-task.mjs +++ b/components/hubspot/sources/new-task/new-task.mjs @@ -9,7 +9,7 @@ export default { name: "New Task Created", description: "Emit new event for each new task created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/tasks#get-%2Fcrm%2Fv3%2Fobjects%2Ftasks)", - version: "1.0.14", + version: "1.0.15", type: "source", dedupe: "unique", methods: { diff --git a/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs b/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs index b24fb3515ee17..ddb9f2e846635 100644 --- a/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs +++ b/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs @@ -8,7 +8,7 @@ export default { name: "New Ticket Property Change", description: "Emit new event when a specified property is provided or updated on a ticket. [See the documentation](https://developers.hubspot.com/docs/api/crm/tickets)", - version: "0.0.27", + version: "0.0.28", dedupe: "unique", type: "source", props: { @@ -44,7 +44,7 @@ export default { }; }, isRelevant(ticket, updatedAfter) { - return !updatedAfter || this.getTs(ticket) > updatedAfter; + return this.getTs(ticket) > updatedAfter; }, getParams(after) { const params = { diff --git a/components/hubspot/sources/new-ticket/new-ticket.mjs b/components/hubspot/sources/new-ticket/new-ticket.mjs index 2a4e2cfe6b215..18b720d622393 100644 --- a/components/hubspot/sources/new-ticket/new-ticket.mjs +++ b/components/hubspot/sources/new-ticket/new-ticket.mjs @@ -10,7 +10,7 @@ export default { key: "hubspot-new-ticket", name: "New Ticket", description: "Emit new event for each new ticket created.", - version: "0.0.33", + version: "0.0.34", dedupe: "unique", type: "source", props: { diff --git a/components/kobotoolbox/kobotoolbox.app.mjs b/components/kobotoolbox/kobotoolbox.app.mjs new file mode 100644 index 0000000000000..84fb26152ee69 --- /dev/null +++ b/components/kobotoolbox/kobotoolbox.app.mjs @@ -0,0 +1,11 @@ +export default { + type: "app", + app: "kobotoolbox", + propDefinitions: {}, + methods: { + // this.$auth contains connected account data + authKeys() { + console.log(Object.keys(this.$auth)); + }, + }, +}; \ No newline at end of file diff --git a/components/kobotoolbox/package.json b/components/kobotoolbox/package.json new file mode 100644 index 0000000000000..f4d5da6a5cecc --- /dev/null +++ b/components/kobotoolbox/package.json @@ -0,0 +1,15 @@ +{ + "name": "@pipedream/kobotoolbox", + "version": "0.0.1", + "description": "Pipedream KoboToolbox Components", + "main": "kobotoolbox.app.mjs", + "keywords": [ + "pipedream", + "kobotoolbox" + ], + "homepage": "https://pipedream.com/apps/kobotoolbox", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc63aae233b8c..cfc3a254fa106 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7601,6 +7601,9 @@ importers: components/koala_ai: {} + components/kobotoolbox: + specifiers: {} + components/kodagpt: dependencies: '@pipedream/platform':