Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@

The Pipedream TypeScript library provides convenient access to the Pipedream APIs from TypeScript.

## Table of Contents

- [Installation](#installation)
- [Reference](#reference)
- [Migration From V 1 X](#migration-from-v-1-x)
- [Usage](#usage)
- [Request and Response Types](#request-and-response-types)
- [Exception Handling](#exception-handling)
- [Binary Response](#binary-response)
- [Pagination](#pagination)
- [Advanced](#advanced)
- [Additional Headers](#additional-headers)
- [Additional Query String Parameters](#additional-query-string-parameters)
- [Retries](#retries)
- [Timeouts](#timeouts)
- [Aborting Requests](#aborting-requests)
- [Access Raw Response Data](#access-raw-response-data)
- [Runtime Compatibility](#runtime-compatibility)
- [Contributing](#contributing)

## Installation

```sh
Expand Down Expand Up @@ -34,7 +54,7 @@ await client.actions.run({
});
```

## Request And Response Types
## Request and Response Types

The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
following namespace:
Expand Down
33 changes: 1 addition & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/sdk",
"version": "2.2.0",
"version": "2.2.1",
"private": false,
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
"type": "commonjs",
Expand All @@ -10,11 +10,6 @@
"exports": {
".": {
"types": "./dist/cjs/index.d.ts",
"browser": {
"types": "./dist/esm/browser/index.d.mts",
"import": "./dist/esm/browser/index.mjs",
"default": "./dist/esm/browser/index.mjs"
},
"import": {
"types": "./dist/esm/index.d.mts",
"default": "./dist/esm/index.mjs"
Expand All @@ -25,18 +20,6 @@
},
"default": "./dist/cjs/index.js"
},
"./browser": {
"types": "./dist/esm/browser/index.d.mts",
"import": {
"types": "./dist/esm/browser/index.d.mts",
"default": "./dist/esm/browser/index.mjs"
},
"require": {
"types": "./dist/cjs/browser/index.d.ts",
"default": "./dist/cjs/browser/index.js"
},
"default": "./dist/esm/browser/index.mjs"
},
"./serialization": {
"types": "./dist/cjs/serialization/index.d.ts",
"import": {
Expand All @@ -49,18 +32,6 @@
},
"default": "./dist/cjs/serialization/index.js"
},
"./server": {
"types": "./dist/cjs/index.d.ts",
"import": {
"types": "./dist/esm/index.d.mts",
"default": "./dist/esm/index.mjs"
},
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
},
"default": "./dist/cjs/index.js"
},
"./package.json": "./package.json"
},
"files": [
Expand Down Expand Up @@ -93,8 +64,6 @@
"@biomejs/biome": "2.2.5"
},
"browser": {
"./dist/cjs/wrapper/utils/getBaseUrl.js": "./dist/cjs/wrapper/utils/getBaseUrl.browser.js",
"./dist/esm/wrapper/utils/getBaseUrl.mjs": "./dist/esm/wrapper/utils/getBaseUrl.browser.mjs",
"fs": false,
"os": false,
"path": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ export interface UpdateTriggerOpts {
configuredProps?: Pipedream.ConfiguredProps;
/** The name of the trigger */
name?: string;
/** Whether the trigger should emit events during deployment */
emitOnDeploy?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ export interface DeployTriggerOpts {
workflowId?: string;
/** Optional webhook URL to receive trigger events */
webhookUrl?: string;
/** Whether the trigger should emit events during the deploy hook execution. Defaults to true if not specified. */
emitOnDeploy?: boolean;
}
126 changes: 103 additions & 23 deletions src/api/types/ConfigurableProp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,108 @@
import type * as Pipedream from "../index.js";

/**
* A configuration or input field for a component.
* A configuration or input field for a component. This is a discriminated union based on the type field.
*/
export interface ConfigurableProp {
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
name: string;
type: Pipedream.ConfigurablePropType;
/** Value to use as an input label. In cases where `type` is "app", should load the app via `getApp`, etc. and show `app.name` instead. */
label?: string;
/** A description of the prop, shown to the user when configuring the component. */
description?: string;
/** If true, this prop does not need to be specified. */
optional?: boolean;
/** If true, this prop will be ignored. */
disabled?: boolean;
/** If true, should not expose this prop to the user */
hidden?: boolean;
/** If true, call `configureComponent` for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */
remoteOptions?: boolean;
/** If true, calls to `configureComponent` for this prop support receiving a `query` parameter to filter remote options */
useQuery?: boolean;
/** If true, after setting a value for this prop, a call to `reloadComponentProps` is required as the component has dynamic configurable props dependent on this one */
reloadProps?: boolean;
/** If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */
withLabel?: boolean;
export type ConfigurableProp =
| Pipedream.ConfigurableProp.Alert
| Pipedream.ConfigurableProp.Any
| Pipedream.ConfigurableProp.App
| Pipedream.ConfigurableProp.Boolean
| Pipedream.ConfigurableProp.InterfaceTimer
| Pipedream.ConfigurableProp.InterfaceApphook
| Pipedream.ConfigurableProp.IntegerArray
| Pipedream.ConfigurableProp.InterfaceHttp
| Pipedream.ConfigurableProp.ServiceDb
| Pipedream.ConfigurableProp.Sql
| Pipedream.ConfigurableProp.AirtableBaseId
| Pipedream.ConfigurableProp.AirtableTableId
| Pipedream.ConfigurableProp.AirtableViewId
| Pipedream.ConfigurableProp.AirtableFieldId
| Pipedream.ConfigurableProp.DiscordChannel
| Pipedream.ConfigurableProp.DiscordChannelArray
| Pipedream.ConfigurableProp.Integer
| Pipedream.ConfigurableProp.Object
| Pipedream.ConfigurableProp.String
| Pipedream.ConfigurableProp.StringArray;

export namespace ConfigurableProp {
export interface Alert extends Pipedream.ConfigurablePropAlert {
type: "alert";
}

export interface Any extends Pipedream.ConfigurablePropAny {
type: "any";
}

export interface App extends Pipedream.ConfigurablePropApp {
type: "app";
}

export interface Boolean extends Pipedream.ConfigurablePropBoolean {
type: "boolean";
}

export interface InterfaceTimer extends Pipedream.ConfigurablePropTimer {
type: "$.interface.timer";
}

export interface InterfaceApphook extends Pipedream.ConfigurablePropApphook {
type: "$.interface.apphook";
}

export interface IntegerArray extends Pipedream.ConfigurablePropIntegerArray {
type: "integer[]";
}

export interface InterfaceHttp extends Pipedream.ConfigurablePropHttp {
type: "$.interface.http";
}

export interface ServiceDb extends Pipedream.ConfigurablePropDb {
type: "$.service.db";
}

export interface Sql extends Pipedream.ConfigurablePropSql {
type: "sql";
}

export interface AirtableBaseId extends Pipedream.ConfigurablePropAirtableBaseId {
type: "$.airtable.baseId";
}

export interface AirtableTableId extends Pipedream.ConfigurablePropAirtableTableId {
type: "$.airtable.tableId";
}

export interface AirtableViewId extends Pipedream.ConfigurablePropAirtableViewId {
type: "$.airtable.viewId";
}

export interface AirtableFieldId extends Pipedream.ConfigurablePropAirtableFieldId {
type: "$.airtable.fieldId";
}

export interface DiscordChannel extends Pipedream.ConfigurablePropDiscordChannel {
type: "$.discord.channel";
}

export interface DiscordChannelArray extends Pipedream.ConfigurablePropDiscordChannelArray {
type: "$.discord.channel[]";
}

export interface Integer extends Pipedream.ConfigurablePropInteger {
type: "integer";
}

export interface Object extends Pipedream.ConfigurablePropObject {
type: "object";
}

export interface String extends Pipedream.ConfigurablePropString {
type: "string";
}

export interface StringArray extends Pipedream.ConfigurablePropStringArray {
type: "string[]";
}
}
25 changes: 3 additions & 22 deletions src/api/types/ConfigurablePropAirtableBaseId.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
// This file was auto-generated by Fern from our API Definition.

export interface ConfigurablePropAirtableBaseId {
type: "$.airtable.baseId";
import type * as Pipedream from "../index.js";

export interface ConfigurablePropAirtableBaseId extends Pipedream.ConfigurablePropBase {
/** The name of the app prop that provides Airtable authentication */
appProp: string;
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
name: string;
/** Value to use as an input label. In cases where `type` is "app", should load the app via `getApp`, etc. and show `app.name` instead. */
label?: string;
/** A description of the prop, shown to the user when configuring the component. */
description?: string;
/** If true, this prop does not need to be specified. */
optional?: boolean;
/** If true, this prop will be ignored. */
disabled?: boolean;
/** If true, should not expose this prop to the user */
hidden?: boolean;
/** If true, call `configureComponent` for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */
remoteOptions?: boolean;
/** If true, calls to `configureComponent` for this prop support receiving a `query` parameter to filter remote options */
useQuery?: boolean;
/** If true, after setting a value for this prop, a call to `reloadComponentProps` is required as the component has dynamic configurable props dependent on this one */
reloadProps?: boolean;
/** If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */
withLabel?: boolean;
}
25 changes: 3 additions & 22 deletions src/api/types/ConfigurablePropAirtableFieldId.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
// This file was auto-generated by Fern from our API Definition.

export interface ConfigurablePropAirtableFieldId {
type: "$.airtable.fieldId";
import type * as Pipedream from "../index.js";

export interface ConfigurablePropAirtableFieldId extends Pipedream.ConfigurablePropBase {
/** The name of the prop that provides the Airtable table ID */
tableIdProp: string;
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
name: string;
/** Value to use as an input label. In cases where `type` is "app", should load the app via `getApp`, etc. and show `app.name` instead. */
label?: string;
/** A description of the prop, shown to the user when configuring the component. */
description?: string;
/** If true, this prop does not need to be specified. */
optional?: boolean;
/** If true, this prop will be ignored. */
disabled?: boolean;
/** If true, should not expose this prop to the user */
hidden?: boolean;
/** If true, call `configureComponent` for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */
remoteOptions?: boolean;
/** If true, calls to `configureComponent` for this prop support receiving a `query` parameter to filter remote options */
useQuery?: boolean;
/** If true, after setting a value for this prop, a call to `reloadComponentProps` is required as the component has dynamic configurable props dependent on this one */
reloadProps?: boolean;
/** If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */
withLabel?: boolean;
}
25 changes: 3 additions & 22 deletions src/api/types/ConfigurablePropAirtableTableId.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
// This file was auto-generated by Fern from our API Definition.

export interface ConfigurablePropAirtableTableId {
type: "$.airtable.tableId";
import type * as Pipedream from "../index.js";

export interface ConfigurablePropAirtableTableId extends Pipedream.ConfigurablePropBase {
/** The name of the prop that provides the Airtable base ID */
baseIdProp: string;
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
name: string;
/** Value to use as an input label. In cases where `type` is "app", should load the app via `getApp`, etc. and show `app.name` instead. */
label?: string;
/** A description of the prop, shown to the user when configuring the component. */
description?: string;
/** If true, this prop does not need to be specified. */
optional?: boolean;
/** If true, this prop will be ignored. */
disabled?: boolean;
/** If true, should not expose this prop to the user */
hidden?: boolean;
/** If true, call `configureComponent` for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */
remoteOptions?: boolean;
/** If true, calls to `configureComponent` for this prop support receiving a `query` parameter to filter remote options */
useQuery?: boolean;
/** If true, after setting a value for this prop, a call to `reloadComponentProps` is required as the component has dynamic configurable props dependent on this one */
reloadProps?: boolean;
/** If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */
withLabel?: boolean;
}
25 changes: 3 additions & 22 deletions src/api/types/ConfigurablePropAirtableViewId.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
// This file was auto-generated by Fern from our API Definition.

export interface ConfigurablePropAirtableViewId {
type: "$.airtable.viewId";
import type * as Pipedream from "../index.js";

export interface ConfigurablePropAirtableViewId extends Pipedream.ConfigurablePropBase {
/** The name of the prop that provides the Airtable table ID */
tableIdProp: string;
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
name: string;
/** Value to use as an input label. In cases where `type` is "app", should load the app via `getApp`, etc. and show `app.name` instead. */
label?: string;
/** A description of the prop, shown to the user when configuring the component. */
description?: string;
/** If true, this prop does not need to be specified. */
optional?: boolean;
/** If true, this prop will be ignored. */
disabled?: boolean;
/** If true, should not expose this prop to the user */
hidden?: boolean;
/** If true, call `configureComponent` for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */
remoteOptions?: boolean;
/** If true, calls to `configureComponent` for this prop support receiving a `query` parameter to filter remote options */
useQuery?: boolean;
/** If true, after setting a value for this prop, a call to `reloadComponentProps` is required as the component has dynamic configurable props dependent on this one */
reloadProps?: boolean;
/** If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */
withLabel?: boolean;
}
Loading