diff --git a/docs-v2/.tool-versions b/docs-v2/.tool-versions index c2ca3d3d25e33..fdb1cb75b15d8 100644 --- a/docs-v2/.tool-versions +++ b/docs-v2/.tool-versions @@ -1 +1,2 @@ nodejs 20.9.0 +pnpm 9.14.2 diff --git a/docs-v2/pages/connect/_meta.tsx b/docs-v2/pages/connect/_meta.tsx index 0276d989af55e..41958fea4e0ed 100644 --- a/docs-v2/pages/connect/_meta.tsx +++ b/docs-v2/pages/connect/_meta.tsx @@ -3,7 +3,7 @@ export default { "title": "Overview", }, "use-cases": { - "title": "Use Cases", + "title": "Use cases", }, "quickstart": { "title": "Quickstart", @@ -11,17 +11,20 @@ export default { "workflows": { "title": "Running workflows", }, + "components": { + "title": "Running components", + }, "api": { - "title": "API & SDK Reference", + "title": "API & SDK reference", }, "tokens": { - "title": "Connect Tokens", + "title": "Connect tokens", }, "environments": { "title": "Environments", }, "oauth-clients": { - "title": "OAuth Clients", + "title": "OAuth clients", }, "webhooks": { "title": "Webhooks", @@ -33,7 +36,7 @@ export default { "title": "Troubleshooting", }, "customize-your-app": { - "title": "Customize Your App", + "title": "Customize your app", }, "migrating-from-project-keys-to-oauth": { "display": "hidden", diff --git a/docs-v2/pages/connect/api.mdx b/docs-v2/pages/connect/api.mdx index 0a9db9a222d25..33e17a3f8d040 100644 --- a/docs-v2/pages/connect/api.mdx +++ b/docs-v2/pages/connect/api.mdx @@ -1,11 +1,11 @@ import Callout from '@/components/Callout' import { Tabs } from 'nextra/components' -# Connect API & SDK Reference +# Connect API & SDK reference Pipedream provides a TypeScript SDK and a REST API to interact with the Connect service. You'll find examples using the SDK and the REST API in multiple languages below. -## REST API Base URL +## REST API base URL Pipedream Connect resources are scoped to [projects](/projects), so you'll need to pass [the project's ID](/projects#finding-your-projects-id) as a part of the base URL: @@ -15,7 +15,7 @@ https://api.pipedream.com/v1/connect/{project_id} ## Installing the TypeScript SDK -Pipedream's SDK will work in any browser or server that can run JavaScript. +Pipedream's SDK will work in any browser or server that can run JavaScript. ### npm @@ -43,7 +43,7 @@ or a specific version: See the [REST API Authentication docs](/rest-api/auth). -### TypeScript SDK (Server) +### TypeScript SDK (server) Most of your interactions with the Connect API will happen on the server, to protect API requests and user credentials. You'll use the SDK in [your frontend](#typescript-sdk-browser) to let users connect accounts. Once connected, you'll use the SDK on the server to retrieve credentials, invoke workflows on their behalf, and more. @@ -63,7 +63,7 @@ const pd = createBackendClient({ // The `pd` client provides methods to interact with the Connect API — see below ``` -### TypeScript SDK (Browser) +### TypeScript SDK (browser) You'll primarily use the browser SDK to let your users securely connect apps from your frontend. Here, you @@ -76,7 +76,7 @@ Here's a Next.js example [from our quickstart](/connect/quickstart): import { createFrontendClient } from "@pipedream/sdk/browser" // Example from our Next.js app import { serverConnectTokenCreate } from "./server" - + const { token, expires_at } = await serverConnectTokenCreate({ external_user_id: externalUserId // The end user's ID in your system }); @@ -134,7 +134,7 @@ curl -X POST https://api.pipedream.com/v1/connect/{project_id}/tokens \ ## External users -When you use the Connect API, you'll pass an `external_user_id` parameter when initiating account connections and retrieving credentials. This is your user's ID, in your system — whatever you use to uniquely identify them. +When you use the Connect API, you'll pass an `external_user_id` parameter when initiating account connections and retrieving credentials. This is your user's ID, in your system — whatever you use to uniquely identify them. Pipedream associates this ID with user accounts, so you can retrieve credentials for a specific user, and invoke workflows on their behalf. @@ -165,7 +165,7 @@ See [the Connect tokens docs](/connect/tokens) for more information. ``` POST /{project_id}/tokens -``` +``` ##### Path parameters @@ -199,7 +199,7 @@ Pipedream will send events on successful auth, or any errors, to this URL via we ##### Examples -To create a short-lived token via TypeScript / JavaScript SDK, you'll need to create a Pipedream API client and call the `createConnectToken` method. In our example app, this code is in `app/server.ts`. +To create a short-lived token via TypeScript / JavaScript SDK, you'll need to create a Pipedream API client and call the `createConnectToken` method. In our example app, this code is in `app/server.ts`. In other languages, you'll need to make an HTTP POST request to the `/tokens` endpoint to create a token, then return the token to your frontend. Click into other tabs to see examples in additional languages. @@ -208,8 +208,8 @@ In other languages, you'll need to make an HTTP POST request to the `/tokens` en ```typescript import { createBackendClient, - type ConnectAPIResponse, - type ConnectTokenCreateOpts, + type ConnectAPIResponse, + type ConnectTokenCreateOpts, type ConnectTokenResponse, } from "@pipedream/sdk/server"; @@ -343,7 +343,7 @@ const accounts = await pd.getAccounts({ include_credentials: true, // optional, set to true to include credentials }); -// Parse and return the data you need. These may contain credentials, +// Parse and return the data you need. These may contain credentials, // which you should never return to the client ``` @@ -366,7 +366,7 @@ const accounts = await pd.getAccounts({ include_credentials: true, // optional, set to true to include credentials }); -// Parse and return the data you need. These may contain credentials, +// Parse and return the data you need. These may contain credentials, // which you should never return to the client ``` @@ -392,7 +392,7 @@ curl -X GET \ -d "include_credentials=true" # optional, include credentials -# Parse and return the data you need. These may contain credentials, +# Parse and return the data you need. These may contain credentials, # which you should never return to the client ``` @@ -407,7 +407,7 @@ curl -X GET \ "count": 5, "start_cursor": "YXBuX0JtaEJKSm0", "end_cursor": "YXBuX1YxaE1lTE0", - }, + }, "data": { "accounts": [ { @@ -489,7 +489,7 @@ curl -X GET \ "count": 1, "start_cursor": "YXBuX0JtaEJKSm0", "end_cursor": "YXBuX1YxaE1lTE0", - }, + }, "data": { "accounts":[ { @@ -585,7 +585,7 @@ const account = await pd.getAccountById(accountId, { include_credentials: true, // optional, set to true to include credentials }); -// Parse and return the data you need. These may contain credentials, +// Parse and return the data you need. These may contain credentials, // which you should never return to the client ``` @@ -610,7 +610,7 @@ const account = await pd.getAccountById(accountId, { include_credentials: true, // optional, set to true to include credentials }); -// Parse and return the data you need. These may contain credentials, +// Parse and return the data you need. These may contain credentials, // which you should never return to the client ``` @@ -635,7 +635,7 @@ curl -X GET \ -d "external_user_id=user-abc-123" \ # optional, filter by external user ID -d "include_credentials=true" # optional, include credentials -# Parse and return the data you need. These may contain credentials, +# Parse and return the data you need. These may contain credentials, # which you should never return to the client ``` @@ -667,7 +667,7 @@ curl -X GET \ } ``` -##### Example Response (with `include_credentials=true`) +##### Example response (with `include_credentials=true`) ```json { @@ -951,27 +951,197 @@ curl -X DELETE "https://api.pipedream.com/v1/connect/{project_id}/users/{externa Pipedream returns a `204 No Content` response on successful account deletion -### Projects -#### Retrieve project info +### Components -Retrieve the configuration for a specific project +#### List components + +List all the components in the Pipedream registry. ``` -GET /{project_id}/info +GET /{component_type} ``` ##### Path parameters -`project_id` **string** +`component_type` **string** -[The project's ID](/projects#finding-your-projects-id) +Either `triggers`, `actions`, or `components`. + +##### Query parameters + +`app` **string** (_optional_) + +The ID or name slug the app you'd like to retrieve. For example, Slack's unique +app ID is `app_OkrhR1`, and its name slug is `slack`. + +You can find the app's ID in the response from the [List +apps](/rest-api#list-apps) endpoint, and the name slug under the +**Authentication** section of any [app page](https://pipedream.com/apps). + +--- + +`q` **string** (_optional_) + +A search query to filter the components by key (see the [component structure +table](/components/api#component-structure)). + +##### Examples + + + + +```typescript +import { + createBackendClient, +} from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Retrieve components containing the word "issue" in their name, belonging to +// the Gitlab app +const { data: components } = await pd.getComponents({ + app: "gitlab", + q: "issue", +}); + +// Parse and return the data you need +``` + + + +```javascript +import { createBackendClient } from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Retrieve components containing the word "issue" in their name, belonging to +// the Gitlab app +const { data: components } = await pd.getComponents({ + app: "gitlab", + q: "issue", +}); + +// Parse and return the data you need +``` + + + +```bash +# First, obtain an OAuth access token +curl -X POST https://api.pipedream.com/v1/oauth/token \ + -H "Content-Type: application/json" \ + -d '{ + "grant_type": "client_credentials", + "client_id": "{oauth_client_id}", + "client_secret": "{oauth_client_secret}" + }' + +# The response will include an access_token. Use it in the Authorization header below. +# This request will fetch the first 3 components for the Gitlab app that contain +# the word "issue" in their name +curl -X GET "https://api.pipedream.com/v1/connect/{your_project_id}/components?app=gitlab&limit=3&q=issue" \ + -H "Authorization: Bearer {access_token}" +``` + + + + +##### Example response +```json +{ + "page_info": { + "total_count": 5, + "count": 3, + "start_cursor": "c2NfM3ZpanpRcg", + "end_cursor": "c2NfQjVpTkJBcA" + }, + "data": [ + { + "name": "New Issue (Instant)", + "version": "0.1.2", + "key": "gitlab-new-issue" + }, + { + "name": "Update Issue", + "version": "0.0.2", + "key": "gitlab-update-issue" + }, + { + "name": "Search Issues", + "version": "0.0.3", + "key": "gitlab-search-issues" + } + ] +} +``` + + +#### Retrieve a component + +Retrieve a specific component from the Pipedream registry. + +``` +GET /{component_type}/{component_key} +``` + +##### Path parameters + +`component_type` **string** + +Either `triggers`, `actions`, or `components`. + +--- + +`component_key` **string** + +The key that identifies the component (see the [component structure +table](/components/api#component-structure)). ##### Examples + ```typescript +import { + createBackendClient, +} from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Retrieve the "New Issue (Instant)" component for the Gitlab app +const { data: component } = await pd.getComponent({ + key: "gitlab-new-issue", +}); + +// Parse and return the data you need +``` + + + +```javascript import { createBackendClient } from "@pipedream/sdk/server"; const pd = createBackendClient({ @@ -983,11 +1153,155 @@ const pd = createBackendClient({ projectId: "{your_project_id}" }); -const info = await pd.getProjectInfo({ - project_id: "{your_project_id}", +// Retrieve the "New Issue (Instant)" component for the Gitlab app +const { data: component } = await pd.getComponent({ + key: "gitlab-new-issue", +}); + +// Parse and return the data you need +``` + + + +```bash +# First, obtain an OAuth access token +curl -X POST https://api.pipedream.com/v1/oauth/token \ + -H "Content-Type: application/json" \ + -d '{ + "grant_type": "client_credentials", + "client_id": "{oauth_client_id}", + "client_secret": "{oauth_client_secret}" + }' + +# The response will include an access_token. Use it in the Authorization header below. +# This request will fetch the "New Issue (Instant)" component for the Gitlab app. +curl -X GET "https://api.pipedream.com/v1/connect/{your_project_id}/components/gitlab-new-issue" \ + -H "Authorization: Bearer {access_token}" +``` + + + +##### Example response + +```json +{ + "data": { + "name": "New Issue (Instant)", + "version": "0.1.2", + "key": "gitlab-new-issue", + "configurable_props": [ + { + "name": "gitlab", + "type": "app", + "app": "gitlab" + }, + { + "name": "db", + "type": "$.service.db" + }, + { + "name": "http", + "type": "$.interface.http", + "customResponse": true + }, + { + "name": "projectId", + "type": "integer", + "label": "Project ID", + "description": "The project ID, as displayed in the main project page", + "remoteOptions": true + } + ] + } +} +``` + + + + +#### Configure a component + +Configure the a component's prop, based on the current component's +configuration. This endpoint will use the component's configuration to retrieve +the list of options that can be used to configure the prop indicated in the +request. + +```text +GET /{component_type}/configure +``` + +##### Path parameters + +`component_type` **string** + +Either `triggers`, `actions`, or `components`. + +##### Body parameters + +`configured_props` **object** + +The props that have already been configured for the component. This is a +JSON-serializable object with the prop names as keys and the configured values +as values. + +--- + +`external_user_id` **string** + +[The external user ID](/connect/api/#external-users) in your system that you +want to retrieve accounts for. + +--- + +`id` **string** + +The key that identifies the component (see the [component structure +table](/components/api#component-structure)). + +--- + +`prop_name` **string** + +The name of the component's prop to configure. + +##### Examples + + + + +```typescript +import { + createBackendClient, +} from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Retrieve the configuration options for the "projectId" prop of the "List +// Commits" component for the Gitlab app. +const { options } = await pd.configureComponent({ + componentId: { + key: "gitlab-list-commits", + }, + configuredProps: { + gitlab: { + authProvisionId: "apn_kVh9AoD", + }, + }, + externalUserId: "jverce", + propName: "projectId", }); + +// Parse and return the data you need ``` + ```javascript import { createBackendClient } from "@pipedream/sdk/server"; @@ -1001,11 +1315,25 @@ const pd = createBackendClient({ projectId: "{your_project_id}" }); -const info = await pd.getProjectInfo({ - project_id: "{your_project_id}", +// Retrieve the configuration options for the "projectId" prop of the "List +// Commits" component for the Gitlab app. +const { options } = await pd.configureComponent({ + componentId: { + key: "gitlab-list-commits", + }, + configuredProps: { + gitlab: { + authProvisionId: "apn_kVh9AoD", + }, + }, + externalUserId: "jverce", + propName: "projectId", }); + +// Parse and return the data you need ``` + ```bash # First, obtain an OAuth access token @@ -1018,9 +1346,684 @@ curl -X POST https://api.pipedream.com/v1/oauth/token \ }' # The response will include an access_token. Use it in the Authorization header below. +# This request will fetch the configuration options for the "projectId" prop of +# the "List Commits" component for the Gitlab app. + +echo '{ + "external_user_id": "jverce", + "id": "gitlab-list-commits", + "prop_name": "projectId", + "configured_props": { + "gitlab": { + "authProvisionId": "apn_kVh9AoD" + } + } +}' > data.json -curl -X POST https://api.pipedream.com/v1/connect/{project_id}/info \ +curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/components/configure" \ -H "Authorization: Bearer {access_token}" \ + -H "Content-Type: application/json" \ + -d @data.json ``` + + +##### Example response + +```json +{ + "observations": [], + "context": null, + "options": [ + { + "label": "jverce/foo-massive-10231-1", + "value": 45672541 + }, + { + "label": "jverce/foo-massive-10231", + "value": 45672514 + }, + { + "label": "jverce/foo-massive-14999-2", + "value": 45672407 + }, + { + "label": "jverce/foo-massive-14999-1", + "value": 45672382 + }, + { + "label": "jverce/foo-massive-14999", + "value": 45672215 + }, + { + "label": "jverce/gitlab-development-kit", + "value": 21220953 + }, + { + "label": "jverce/gitlab", + "value": 21208123 + } + ], + "errors": [], + "timings": { + "api_to_sidekiq": 1734043172355.1042, + "sidekiq_received": 1734043172357.867, + "sidekiq_to_lambda": 1734043172363.6812, + "sidekiq_done": 1734043173461.6406, + "lambda_configure_prop_called": 1734043172462, + "lambda_done": 1734043173455 + }, + "stringOptions": null +} +``` + +#### Reload a component's props (i.e. configure dynamic props) + +Reload the component's props after configuring a dynamic prop, based on the +current component's configuration. This endpoint will use the component's +configuration to retrieve a new list of props depending on the value of the +props that were configured so far. See the [Dynamic +Props](/connect/components#dynamic-props-optional) section for more information. + +```text +GET /{component_type}/props +``` + +##### Path parameters + +`component_type` **string** + +Either `triggers`, `actions`, or `components`. + +##### Body parameters + +`configured_props` **object** + +The props that have already been configured for the component. This is a +JSON-serializable object with the prop names as keys and the configured values +as values. + +--- + +`external_user_id` **string** + +[The external user ID](/connect/api/#external-users) in your system that you +want to retrieve accounts for. + +--- + +`id` **string** + +The key that identifies the component (see the [component structure +table](/components/api#component-structure)). + +--- + +`dynamic_props_id` **string** (_optional_) + +The ID of the last prop reconfiguration (or none when reconfiguring the props +for the first time). + +##### Examples + + + + +```typescript +import { + createBackendClient, +} from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Retrieve the configuration options for the "Add Single Row" component for +// the Google Sheets app. Note that the `sheetId` prop is a dynamic prop. +const { dynamicProps } = await pd.reloadComponentProps({ + componentId: { + key: "google_sheets-add-single-row", + }, + configuredProps: { + googleSheets: { + authProvisionId: "apn_V1hMoE7", + }, + sheetId: "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg", + }, + externalUserId: "jay", +}); + +const { + configurableProps, // The new set of props + id: dynamicPropsId, // The ID of the last prop reconfiguration +} = dynamicProps; + +// Parse and return the data you need +``` + + + +```javascript +import { createBackendClient } from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Retrieve the configuration options for the "Add Single Row" component for +// the Google Sheets app. Note that the `sheetId` prop is a dynamic prop. +const { dynamicProps } = await pd.reloadComponentProps({ + componentId: { + key: "google_sheets-add-single-row", + }, + configuredProps: { + googleSheets: { + authProvisionId: "apn_V1hMoE7", + }, + sheetId: "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg", + }, + externalUserId: "jay", +}); + +const { + configurableProps, // The new set of props + id: dynamicPropsId, // The ID of the last prop reconfiguration +} = dynamicProps; + +// Parse and return the data you need +``` + + + +```bash +# First, obtain an OAuth access token +curl -X POST https://api.pipedream.com/v1/oauth/token \ + -H "Content-Type: application/json" \ + -d '{ + "grant_type": "client_credentials", + "client_id": "{oauth_client_id}", + "client_secret": "{oauth_client_secret}" + }' + +# The response will include an access_token. Use it in the Authorization header below. +# This request will fetch the new set of props for the "Add Single Row" component +# for the Google Sheets app. Note that the `sheetId` prop is a dynamic prop. + +echo '{ + "external_user_id": "jay", + "id": "google_sheets-add-single-row", + "configured_props": { + "googleSheets": { + "authProvisionId": "apn_V1hMoE7" + }, + "sheetId": "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg" + } +}' > data.json + +curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/components/props" \ + -H "Authorization: Bearer {access_token}" \ + -H "Content-Type: application/json" \ + -d @data.json +``` + + + + +##### Example response + +```json +{ + "observations": [], + "errors": [], + "dynamicProps": { + "id": "dyp_6xUyVgQ", + "configurableProps": [ + { + "name": "googleSheets", + "type": "app", + "app": "google_sheets" + }, + { + "name": "drive", + "type": "string", + "label": "Drive", + "description": "Defaults to `My Drive`. To select a [Shared Drive](https://support.google.com/a/users/answer/9310351) instead, select it from this list.", + "optional": true, + "default": "My Drive", + "remoteOptions": true + }, + { + "name": "sheetId", + "type": "string", + "label": "Spreadsheet", + "description": "The Spreadsheet ID", + "useQuery": true, + "remoteOptions": true, + "reloadProps": true + }, + { + "name": "worksheetId", + "type": "string[]", + "label": "Worksheet(s)", + "description": "Select a worksheet or enter a custom expression. When referencing a spreadsheet dynamically, you must provide a custom expression for the worksheet.", + "remoteOptions": true, + "reloadProps": true + }, + { + "name": "hasHeaders", + "type": "boolean", + "label": "Does the first row of the sheet have headers?", + "description": "If the first row of your document has headers, we'll retrieve them to make it easy to enter the value for each column. Note: When using a dynamic reference for the worksheet ID (e.g. `{{steps.foo.$return_value}}`), this setting is ignored.", + "reloadProps": true + }, + { + "name": "myColumnData", + "type": "string[]", + "label": "Values", + "description": "Provide a value for each cell of the row. Google Sheets accepts strings, numbers and boolean values for each cell. To set a cell to an empty value, pass an empty string." + } + ] + } +} +``` + +#### Invoke an action + +Invoke an action component for a Pipedream Connect user in a project. + +```text +POST /actions/run +``` + +##### Body parameters + +`id` **string** + +The key that identifies the action component (see the [component structure +table](/components/api#component-structure)). + +--- + +`configured_props` **object** + +The props that have already been configured for the component. This is a +JSON-serializable object with the prop names as keys and the configured values +as values. + +--- + +`external_user_id` **string** + +[The external user ID](/connect/api/#external-users) in your system on behalf of +which you want to execute the action. + +--- + +`dynamic_props_id` **string** (_optional_) + +The ID of the last prop reconfiguration (if applicable). + +##### Examples + + + + +```typescript +import { + createBackendClient, +} from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Run the "List Commits" action for the Gitlab app +const { + exports, // The named exports produced by the action + os, // The observations produced by the action + ret, // The value returned by the action +} = await pd.runAction({ + actionId: { + key: "gitlab-list-commits", + }, + configuredProps: { + gitlab: { + authProvisionId: "apn_kVh9AoD", + }, + projectId: 45672541, + refName: "main" + }, + externalUserId: "jverce", +}); + +// Parse and return the data you need +``` + + + +```javascript +import { createBackendClient } from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Run the "List Commits" action for the Gitlab app +const { + exports, // The named exports produced by the action + os, // The observations produced by the action + ret, // The value returned by the action +} = await pd.runAction({ + actionId: { + key: "gitlab-list-commits", + }, + configuredProps: { + gitlab: { + authProvisionId: "apn_kVh9AoD", + }, + projectId: 45672541, + refName: "main" + }, + externalUserId: "jverce", +}); + +// Parse and return the data you need +``` + + + +```bash +# First, obtain an OAuth access token +curl -X POST https://api.pipedream.com/v1/oauth/token \ + -H "Content-Type: application/json" \ + -d '{ + "grant_type": "client_credentials", + "client_id": "{oauth_client_id}", + "client_secret": "{oauth_client_secret}" + }' + +# The response will include an access_token. Use it in the Authorization header below. +# This request will run the "List Commits" action for the Gitlab app. + +echo '{ + "external_user_id": "jverce", + "id": "gitlab-list-commits", + "configured_props": { + "gitlab": { + "authProvisionId": "apn_kVh9AoD" + }, + "projectId": 45672541, + "refName": "main" + } +}' > data.json + +curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/actions/run" \ + -H "Authorization: Bearer {access_token}" \ + -H "Content-Type: application/json" \ + -d @data.json +``` + + + + +##### Example response + +```json +{ + "exports": { + "$summary": "Retrieved 1 commit" + }, + "os": [], + "ret": [ + { + "id": "387262aea5d4a6920ac76c1e202bc9fd0841fea5", + "short_id": "387262ae", + "created_at": "2023-05-03T03:03:25.000+00:00", + "parent_ids": [], + "title": "Initial commit", + "message": "Initial commit", + "author_name": "Jay Vercellone", + "author_email": "nope@pipedream.com", + "authored_date": "2023-05-03T03:03:25.000+00:00", + "committer_name": "Jay Vercellone", + "committer_email": "nope@pipedream.com", + "committed_date": "2023-05-03T03:03:25.000+00:00", + "trailers": {}, + "extended_trailers": {}, + "web_url": "https://gitlab.com/jverce/foo-massive-10231-1/-/commit/387262aea5d4a6920ac76c1e202bc9fd0841fea5" + } + ] +} +``` + +#### Deploy a trigger + +Deploy a trigger component for a Pipedream Connect user in a project. + +```text +POST /triggers/deploy +``` + +##### Body parameters + +`id` **string** + +The key that identifies the action component (see the [component structure +table](/components/api#component-structure)). + +--- + +`configured_props` **object** + +The props that have already been configured for the component. This is a +JSON-serializable object with the prop names as keys and the configured values +as values. + +--- + +`external_user_id` **string** + +[The external user ID](/connect/api/#external-users) in your system on behalf of +which you want to execute the action. + +--- + +`webhook_url` **string** + +The URL to which the trigger will send events. + +--- + +`dynamic_props_id` **string** (_optional_) + +The ID of the last prop reconfiguration (if applicable). + +##### Examples + + + + +```typescript +import { + createBackendClient, +} from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Deploy the "New Issue (Instant)" trigger for the Gitlab app +const { data: deployedTrigger } = await pd.runAction({ + triggerId: { + key: "gitlab-new-issue", + }, + configuredProps: { + gitlab: { + authProvisionId: "apn_kVh9AoD", + }, + projectId: 45672541, + }, + externalUserId: "jverce", + webhookUrl: "https://events.example.com/gitlab-new-issue", +}); + +const { + id: triggerId, // The unique ID of the deployed trigger + name: triggerName, // The name of the deployed trigger + owner_id: userId, // The unique ID in Pipedream of your user +} = deployedTrigger; + +// Parse and return the data you need +``` + + + +```javascript +import { createBackendClient } from "@pipedream/sdk/server"; + +const pd = createBackendClient({ + environment: "development", // change to production if running for a test production account, or in production + credentials: { + clientId: "{oauth_client_id}", + clientSecret: "{oauth_client_secret}", + }, + projectId: "{your_project_id}" +}); + +// Deploy the "New Issue (Instant)" trigger for the Gitlab app +const { data: deployedTrigger } = await pd.runAction({ + triggerId: { + key: "gitlab-new-issue", + }, + configuredProps: { + gitlab: { + authProvisionId: "apn_kVh9AoD", + }, + projectId: 45672541, + }, + externalUserId: "jverce", + webhookUrl: "https://events.example.com/gitlab-new-issue", +}); + +const { + id: triggerId, // The unique ID of the deployed trigger + name: triggerName, // The name of the deployed trigger + owner_id: userId, // The unique ID in Pipedream of your user +} = deployedTrigger; + +// Parse and return the data you need +``` + + + +```bash +# First, obtain an OAuth access token +curl -X POST https://api.pipedream.com/v1/oauth/token \ + -H "Content-Type: application/json" \ + -d '{ + "grant_type": "client_credentials", + "client_id": "{oauth_client_id}", + "client_secret": "{oauth_client_secret}" + }' + +# The response will include an access_token. Use it in the Authorization header below. +# This request will deploy the "New Issue (Instant)" trigger for the Gitlab app. + +echo '{ + "external_user_id": "jverce", + "id": "gitlab-new-issue", + "configured_props": { + "gitlab": { + "authProvisionId": "apn_kVh9AoD" + }, + "projectId": 45672541, + }, + "webhook_url": "https://events.example.com/gitlab-new-issue" +}' > data.json + +curl -X POST "https://api.pipedream.com/v1/connect/{your_project_id}/triggers/deploy" \ + -H "Authorization: Bearer {access_token}" \ + -H "Content-Type: application/json" \ + -d @data.json +``` + + + + +##### Example response + +```json +{ + "data": { + "id": "dc_dAuGmW7", + "owner_id": "exu_oedidz", + "component_id": "sc_3vijzQr", + "configurable_props": [ + { + "name": "gitlab", + "type": "app", + "app": "gitlab" + }, + { + "name": "db", + "type": "$.service.db" + }, + { + "name": "http", + "type": "$.interface.http", + "customResponse": true + }, + { + "name": "projectId", + "type": "integer", + "label": "Project ID", + "description": "The project ID, as displayed in the main project page", + "remoteOptions": true + } + ], + "configured_props": { + "gitlab": { + "authProvisionId": "apn_kVh9AoD" + }, + "db": { + "type": "$.service.db" + }, + "http": { + "endpoint_url": "https://39643dc2c8ff98a019f3fdc9078d6db9.m.pipedream.net" + }, + "projectId": 45672541 + }, + "active": true, + "created_at": 1734028283, + "updated_at": 1734028283, + "name": "My first project - exu_oedidz", + "name_slug": "my-first-project---exu-oedidz-2" + } +} +``` diff --git a/docs-v2/pages/connect/components.mdx b/docs-v2/pages/connect/components.mdx new file mode 100644 index 0000000000000..c8d6c19b91042 --- /dev/null +++ b/docs-v2/pages/connect/components.mdx @@ -0,0 +1,513 @@ +import { Steps, Tabs } from 'nextra/components' +import ArcadeEmbed from '@/components/ArcadeEmbed' +import Callout from '@/components/Callout' +import Image from 'next/image' + +# Running components for your end users + +Pipedream Connect provides you with the ability to pre-configure, deploy and +invoke [components](/components) **on behalf of [your end +users](/connect/api#external-users)**. + +## What are components? + +In the context of Pipedream Connect, components are self-contained executable +units of code. They are usually provided with some arbitrary input and produce a +result that's exported as output. These components are developed by the +Pipedream community and their source code is available in our [public Github +repository](https://github.com/PipedreamHQ/pipedream/tree/master/components). + +To learn more about components in detail, please visit our [Components +guide](/components). + +## How to run components for your end users + + + +### Retrieving a component's definition + +The first thing to do in order to run a component for your end users is to know +about the component itself. To start with, you need to know the component's +unique key. Using that key, you can retrieve the component's structure from the +Pipedream API. See the [component +structure](/components/api#component-structure) section in our docs for more +details. + +As an example, the following API call will return the structure of the **List +Commits** component for Gitlab: + +```text +GET /v1/connect/components/gitlab-list-commits +``` + +The response will contain the component's structure, including its +(human-understandable) name, version, and most importantly, the configuration +options that the component accepts (also known as [props](/components/api#props) +or "properties"). Here's an example of the response for the component in the +example above: + +```json +{ + "data": { + "name": "List Commits", + "version": "0.0.3", + "key": "gitlab-list-commits", + "configurable_props": [ + { + "name": "gitlab", + "type": "app", + "app": "gitlab" + }, + { + "name": "projectId", + "type": "integer", + "label": "Project ID", + "description": "The project ID, as displayed in the main project page", + "remoteOptions": true + }, + { + "name": "refName", + "type": "string", + "label": "Branch Name", + "description": "The name of the branch", + "remoteOptions": true, + "optional": true + }, + { + "name": "max", + "type": "integer", + "label": "Max Results", + "description": "Max number of results to return. Default value is `100`", + "optional": true, + "default": 100 + } + ] + } +} +``` + +Using this information, you can now drive the configuration of the component for +your end users, as described in the next section. + +### Configuration + +Component execution on behalf of your end users requires a few preliminary +steps, focused on getting the right input parameters (aka +[props](/workflows/using-props)) to the component. + +Configuring each prop for a component usually involves an API call to our +backend to retrieve the possible values, unless the values that a prop can take +are static/free-form. The endpoint is accessible at: + +```text +POST /v1/connect/components/configure +``` + +Typically, the options for a prop are linked to a specific user's account. Each +of these props implements an `options` method that retrieves the necessary +options from the third-party API, formats them, and sends them back in the +response for the end user to select. + +The payload for the configuration API call must contain the following fields: + +1. `external_user_id`: the ID of your user on your end +2. `id`: the component's unique ID (aka **key**) +3. `prop_name`: the name of the prop you want to configure +4. `configured_props`: an object containing the props that have already been + configured. The initial configuration call must contain the ID of the account + (aka `authProvisionId`) that your user has connected to the target app (see + [this section](workflows#configure-accounts-to-use-your-end-users-auth) for + more details on how to create these accounts) + +We'll use the [**List Commits** component for +Gitlab](https://github.com/PipedreamHQ/pipedream/blob/master/components/gitlab/actions/list-commits/list-commits.mjs#L4) +as an example, to illustrate a call that retrieves the options for the +`projectId` prop of that component. The payload sent to the configuration API +would look like this: + +```json +{ + "external_user_id": "demo-34c13d13-a31e-4a3d-8b63-0ac954671095", + "id": "gitlab-list-commits", + "prop_name": "projectId", + "configured_props": { + "gitlab": { + "authProvisionId": "apn_oOhaBlD" + } + } +} +``` + +The response will contain the possible values (and their human-readable labels +when applicable) for the prop, as well as any possible errors that might have +occurred. The response for the request above would look like this: + +```json +{ + "observations": [], + "context": null, + "options": [ + { + "label": "jverce/foo-massive-10231-1", + "value": 45672541 + }, + { + "label": "jverce/foo-massive-10231", + "value": 45672514 + }, + { + "label": "jverce/foo-massive-14999-2", + "value": 45672407 + }, + { + "label": "jverce/foo-massive-14999-1", + "value": 45672382 + }, + { + "label": "jverce/foo-massive-14999", + "value": 45672215 + }, + { + "label": "jverce/gitlab-development-kit", + "value": 21220953 + }, + { + "label": "jverce/gitlab", + "value": 21208123 + } + ], + "errors": [], + "timings": { + "api_to_sidekiq": 1734043172355.1042, + "sidekiq_received": 1734043172357.867, + "sidekiq_to_lambda": 1734043172363.6812, + "sidekiq_done": 1734043173461.6406, + "lambda_configure_prop_called": 1734043172462, + "lambda_done": 1734043173455 + }, + "stringOptions": null +} +``` + + + +Fields inside `configured_props` are written in camel case since they refer to +the names of props as they appear in the component's code, they are not +attributes that the API itself consumes. + + + +You configure props one-by-one, making a call to the component configuration API +for each new prop. Subsequent prop configuration calls will be identical to the +one above: + +1. Add the prop you currently want to configure as the `prop_name` +2. Include the names and values of all previously-configured props in the + `configured_props` object. Keep this object in your app's local state, add a + prop once you or the end user selects a value, and pass it to the + `configured_props` API param. + +For example, to retrieve the configuration options for the `refName` prop: + +```json +{ + "async_handle": "IyvFeE5oNpYd", + "external_user_id": "demo-34c13d13-a31e-4a3d-8b63-0ac954671095", + "id": "gitlab-list-commits", + "prop_name": "refName", + "configured_props": { + "gitlab": { + "authProvisionId": "apn_oOhaBlD" + }, + "projectId": 21208123 + } +} +``` + +#### Dynamic props (optional) + +The set of props that a component can accept might not be static, and can change +depending on the values of prior props. Props that behave this way are called +[dynamic props](/components/api#dynamic-props), and they need to be configured +in a different way. Props that are dynamic will have a `reloadProps` attribute +set to `true` in the component's code. + +After configuring a dynamic prop, the set of subsequent props must be recomputed +(or reloaded), which is possible using the following API call: + +```text +POST /v1/connect/components/props +``` + +The payload is similar to the one used for the configuration API, but it +excludes the `prop_name` field since the goal of this call is to reload and +retrieve the new set of props, not to configure a specific one. + +Using the **Add Single Row** component for Google Sheets as an example, the +request payload would look like this: + +```json +{ + "async_handle": "PL41Yf3PuX61", + "external_user_id": "demo-25092fa8-86c0-4d46-86c9-9dc9bde3b964", + "id": "google_sheets-add-single-row", + "configured_props": { + "googleSheets": { + "authProvisionId": "apn_V1hMoE7" + }, + "sheetId": "1BfWjFF2dTW_YDiLISj5N9nKCUErShgugPS434liyytg" + } +} +``` + +In this case, the `sheetId` prop is dynamic, and so after configuring it, the +set of props must be reloaded. The response will contain the new set of props +and their definition, similar to when the [component information was first +retrieved](#retrieving-a-components-definition). The response will also contain +an ID that can be used to reference the new set of props in subsequent +configuration calls. If this is ID is not provided, the set of props will be +based on the definition of the component that was retrieved initially. + +To illustrate, the response for the request above would look like this: + +```json +{ + "observations": [], + "errors": [], + "dynamicProps": { + "id": "dyp_6xUyVgQ", + "configurableProps": [ + { + "name": "googleSheets", + "type": "app", + "app": "google_sheets" + }, + { + "name": "drive", + "type": "string", + "label": "Drive", + "description": "Defaults to `My Drive`. To select a [Shared Drive](https://support.google.com/a/users/answer/9310351) instead, select it from this list.", + "optional": true, + "default": "My Drive", + "remoteOptions": true + }, + { + "name": "sheetId", + "type": "string", + "label": "Spreadsheet", + "description": "The Spreadsheet ID", + "useQuery": true, + "remoteOptions": true, + "reloadProps": true + }, + { + "name": "worksheetId", + "type": "string[]", + "label": "Worksheet(s)", + "description": "Select a worksheet or enter a custom expression. When referencing a spreadsheet dynamically, you must provide a custom expression for the worksheet.", + "remoteOptions": true, + "reloadProps": true + }, + { + "name": "hasHeaders", + "type": "boolean", + "label": "Does the first row of the sheet have headers?", + "description": "If the first row of your document has headers, we'll retrieve them to make it easy to enter the value for each column. Note: When using a dynamic reference for the worksheet ID (e.g. `{{steps.foo.$return_value}}`), this setting is ignored.", + "reloadProps": true + }, + { + "name": "myColumnData", + "type": "string[]", + "label": "Values", + "description": "Provide a value for each cell of the row. Google Sheets accepts strings, numbers and boolean values for each cell. To set a cell to an empty value, pass an empty string." + } + ] + } +} +``` + +### Execution + +Once all the props have been configured, the component can be invoked. Pipedream +supports two types of components: [actions](/components#actions) and +[sources](/components#sources) (aka triggers). + +Actions are components that perform a task by taking an input either during +[configuration](#configuration) and/or during invocation (usually both), and +produce a result. Sources are very similar, but the difference is that they are +not invoked directly by Pipedream users, but rather by events that happen on a +third-party service. For example, the "New File" source for Google Drive will be +triggered every time a new file is created in a specific folder in Google Drive. + +All this means is that actions can be invoked manually on demand, while sources +are instead deployed and run automatically when the event they are listening for +occurs. + +#### Invoking an action + +At the end of the configuration process for an action, you'll end up with a +payload that you can use to invoke the action. The payload is similar to the one +used for configuring a prop, with the exception of the `prop_name` attribute +(because we're not configuring any props at this point): + +```json +{ + "async_handle": "xFfBakdTGTkI", + "external_user_id": "demo-20a1b80e-23a5-4d4d-a8ef-c91cdbd0dad9", + "id": "gitlab-list-commits", + "configured_props": { + "gitlab": { + "authProvisionId": "apn_JjhWOl0" + }, + "projectId": 45672541, + "refName": "main" + } +} +``` + +To run the action with this configuration, simply send it as the request payload +to the following endpoint: + +```text +POST /v1/connect/actions/run +``` + +The output of executing the action will be a JSON object containing the +following fields: + +1. `exports`: all the named exports produced by the action, like when calling + [`$.export` in a Node.js](/code/nodejs#using-export) component. +2. `os`: a list of observations produced by the action (e.g. logs, errors, etc). +3. `ret`: the return value of the action, if any. + +The following (abbreviated) example shows the output of running the action +above: + +```json +{ + "exports": { + "$summary": "Retrieved 1 commit" + }, + "os": [], + "ret": [ + { + "id": "387262aea5d4a6920ac76c1e202bc9fd0841fea5", + "short_id": "387262ae", + "created_at": "2023-05-03T03:03:25.000+00:00", + "parent_ids": [], + "title": "Initial commit", + "message": "Initial commit", + "author_name": "Jay Vercellone", + "author_email": "nope@pipedream.com", + "authored_date": "2023-05-03T03:03:25.000+00:00", + "committer_name": "Jay Vercellone", + "committer_email": "nope@pipedream.com", + "committed_date": "2023-05-03T03:03:25.000+00:00", + "trailers": {}, + "extended_trailers": {}, + "web_url": "https://gitlab.com/jverce/foo-massive-10231-1/-/commit/387262aea5d4a6920ac76c1e202bc9fd0841fea5" + } + ] +} +``` + +#### Deploying a source + +Because sources are exercised by events that happen on a third-party service, +their semantics are different from actions. Once a source is configured, it must +be deployed in order to start listening for events. You might be asking where do +those events go, and you'd be right to ask. That's the reason why when deploying +a source you must provide a URL where the source will send these events, similar +to how a webhook works. + +Deploying a source is done by sending a payload similar to the one used for +running an action, with the addition of the webhook URL mentioned above. Using +the **New Issue (Instant)** source for Gitlab as an example, the payload would +look something like this: + +```json +{ + "external_user_id": "jverce", + "id": "gitlab-new-issue", + "prop_name": "http", + "configured_props": { + "gitlab": { + "authProvisionId": "apn_kVh9AoD" + }, + "projectId": 45672541 + }, + "webhook_url": "https://events.example.com/gitlab-new-issue" +} +``` + +The endpoint to deploy a source is: + +```text +POST /v1/connect/triggers/deploy +``` + +If the source deployment succeeds, the response will contain the information +regarding the state of the source, including all the component's props metadata, +as well as their values. It will also contain its name, creation date, owner, +and most importantly its unique ID, which can be used to manage the source in +the future (e.g. delete it). The response for the request above would look like +this: + +```json +{ + "data": { + "id": "dc_dAuGmW7", + "owner_id": "exu_oedidz", + "component_id": "sc_3vijzQr", + "configurable_props": [ + { + "name": "gitlab", + "type": "app", + "app": "gitlab" + }, + { + "name": "db", + "type": "$.service.db" + }, + { + "name": "http", + "type": "$.interface.http", + "customResponse": true + }, + { + "name": "projectId", + "type": "integer", + "label": "Project ID", + "description": "The project ID, as displayed in the main project page", + "remoteOptions": true + } + ], + "configured_props": { + "gitlab": { + "authProvisionId": "apn_kVh9AoD" + }, + "db": { + "type": "$.service.db" + }, + "http": { + "endpoint_url": "https://39643dc2c8ff98a019f3fdc9078d6db9.m.pipedream.net" + }, + "projectId": 45672541 + }, + "active": true, + "created_at": 1734028283, + "updated_at": 1734028283, + "name": "My first project - exu_oedidz", + "name_slug": "my-first-project---exu-oedidz-2" + } +} +``` + +In the example above, the source ID is `dc_dAuGmW7`, which can be used to delete +the source in the future: + +```text +DELETE /v1/connect/deployed-triggers/dc_dAuGmW7?external_user_id=jverce +``` + + diff --git a/docs-v2/pages/connect/use-cases.mdx b/docs-v2/pages/connect/use-cases.mdx index 5d1867920331b..593ef2017d7db 100644 --- a/docs-v2/pages/connect/use-cases.mdx +++ b/docs-v2/pages/connect/use-cases.mdx @@ -1,10 +1,10 @@ -# Pipedream Connect Use Cases +# Pipedream Connect use cases Developers use Pipedream Connect to build customer-facing API integrations into their products. It lets you build [in-app messaging](#in-app-messaging), [CRM syncs](#crm-syncs), [AI-driven products](#ai-products), and much more, all in a few minutes. ## Core value to app developers -In 20 years of building software, we've seen a common theme. No matter the product, your customers end up needing to connect your app to third-party APIs. +In 20 years of building software, we've seen a common theme. No matter the product, your customers end up needing to connect your app to third-party APIs. You might build real-time notifications with messaging apps, export customer data to databases or spreadsheets, ingest data from CRMs, or connect to any of the thousands of APIs and SaaS services your customers are using. These features are often tied to large contracts and Enterprise customers. @@ -38,4 +38,4 @@ Sync data between your app and Google Sheets, Airtable, or any spreadsheet. Pipe ### And much more -Building an app with Pipedream and want to be profiled here (anonymously or otherwise)? Email connect@pipedream.com to let us know! \ No newline at end of file +Building an app with Pipedream and want to be profiled here (anonymously or otherwise)? Email connect@pipedream.com to let us know! diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 75bb5d23e1aa5..568a421e95a0e 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,23 +1,40 @@ # Changelog -## [1.1.1] - 2024-12-011 +## [1.1.2] - 2024-12-12 ### Changed -- Remove deprecated asynchoronous response handling code. +- Fixed the docstring referring to the `componentConfigure` and + `reloadComponentProps` methods of the components API -## [1.1.0] - 2024-12-010 +## [1.1.1] - 2024-12-11 ### Changed -- Naming and docs improvements +- Remove deprecated asynchronous response handling code. + +## [1.1.0] - 2024-12-10 + +### Added + +- Documented the public methods and types for the components API + +### Changed + +- Renamed the methods involved with the components API (e.g. + `componentConfigure` -> `configureComponent`) +- Renamed the types used for passing options and accessing responses from the + components API endpoints (e.g. `ComponentRequestResponse` -> + `GetComponentResponse`) +- Marked the renamed methods and types as deprecated ## [1.0.12] - 2024-12-06 ### Added -- Allow passing `before`, `after` pagination cursors for apps, accounts, components endpoints +- Allow passing `before`, `after` pagination cursors for apps, accounts, + components endpoints ## [1.0.11] - 2024-12-06 @@ -48,8 +65,8 @@ ### Changed -- The backend client now correctly uses asynchronous messaging to handle long running - operations. +- The backend client now correctly uses asynchronous messaging to handle long + running operations. - Updated the backend command line tool to respect the `ENVIRONMENT` env variable if set. @@ -58,8 +75,8 @@ ### Changed - Use client Connect tokens to make api calls directly from the client. -- Deprecated the `environments` property on `createFrontendClient` since it is now - stored in the token +- Deprecated the `environments` property on `createFrontendClient` since it is + now stored in the token ## [1.0.5] - 2024-11-18 @@ -67,7 +84,7 @@ - The backend client used to default to `production` if the environment was not specified. Now `environment` is a required argument for `createBackendClient` -and must be one of `production` or `development`. +and must be one of `production` or `development`. ## [1.0.4] - 2024-11-15 diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 43fd7c74c3430..673664e4bdcac 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/sdk", - "version": "1.1.1", + "version": "1.1.2", "description": "Pipedream SDK", "main": "dist/server/server/index.js", "module": "dist/server/server/index.js", diff --git a/packages/sdk/src/shared/index.ts b/packages/sdk/src/shared/index.ts index 3ade24b3ad51f..0064ae687a6a9 100644 --- a/packages/sdk/src/shared/index.ts +++ b/packages/sdk/src/shared/index.ts @@ -904,8 +904,10 @@ export abstract class BaseClient { * }, * propName: "channel", * configuredProps: { - * authProvisionId: "apn_z8hD1b4", - * } + * slack: { + * authProvisionId: "apn_z8hD1b4", + * }, + * }, * }); * console.log(options); */ @@ -956,8 +958,10 @@ export abstract class BaseClient { * key: "slack-send-message", * }, * configuredProps: { - * authProvisionId: "apn_z8hD1b4", - * } + * slack: { + * authProvisionId: "apn_z8hD1b4", + * }, + * }, * }); * * const { configurableProps, id: dynamicPropsId } = dynamicProps; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f44944dee1767..52e9dfc84fcac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24505,22 +24505,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731) supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}