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
2 changes: 2 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ src/core/auth/StaticTokenProvider.ts
src/core/auth/TokenProvider.ts

# Custom configuration props files
src/api/types/ConfigurablePropType.ts
src/api/types/ConfiguredProps.ts
src/serialization/types/ConfigurablePropType.ts
src/serialization/types/ConfiguredProps.ts

# Custom Proxy files
Expand Down
2 changes: 1 addition & 1 deletion MIGRATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ incrementally without breaking your existing codebase. To do this, you can
install the new SDK with an alias:

```bash
npm install @pipedream/sdk-v2@npm:@pipedream/sdk@^2.0.0-rc.15 --save
npm install @pipedream/sdk-v2@npm:@pipedream/sdk@^2.0.0-rc.16 --save
```

Then, in your code, you can import the new SDK with the alias:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/sdk",
"version": "2.0.0-rc.15",
"version": "2.0.0-rc.16",
"private": false,
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
"type": "commonjs",
Expand Down
4 changes: 2 additions & 2 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export class PipedreamClient {
"x-pd-environment": _options?.projectEnvironment,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@pipedream/sdk",
"X-Fern-SDK-Version": "2.0.0-rc.15",
"User-Agent": "@pipedream/sdk/2.0.0-rc.15",
"X-Fern-SDK-Version": "2.0.0-rc.16",
"User-Agent": "@pipedream/sdk/2.0.0-rc.16",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
10 changes: 8 additions & 2 deletions src/api/resources/components/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import * as environments from "../../../../environments.js";
import * as core from "../../../../core/index.js";
import * as Pipedream from "../../../index.js";
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js";
import * as serializers from "../../../../serialization/index.js";
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js";
import * as errors from "../../../../errors/index.js";

export declare namespace Components {
Expand Down Expand Up @@ -62,7 +62,7 @@ export class Components {
async (
request: Pipedream.ComponentsListRequest,
): Promise<core.WithRawResponse<Pipedream.GetComponentsResponse>> => {
const { after, before, limit, q, app } = request;
const { after, before, limit, q, app, componentType } = request;
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
if (after != null) {
_queryParams["after"] = after;
Expand All @@ -79,6 +79,12 @@ export class Components {
if (app != null) {
_queryParams["app"] = app;
}
if (componentType != null) {
_queryParams["component_type"] = serializers.ComponentType.jsonOrThrow(componentType, {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
});
}
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as Pipedream from "../../../../index.js";

/**
* @example
* {}
Expand All @@ -17,4 +19,6 @@ export interface ComponentsListRequest {
q?: string;
/** The ID or name slug of the app to filter the components */
app?: string;
/** The type of the component to filter the components */
componentType?: Pipedream.ComponentType;
}
12 changes: 12 additions & 0 deletions src/api/types/ComponentType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

/**
* The type of component (trigger or action)
*/
export type ComponentType = "trigger" | "action";
export const ComponentType = {
Trigger: "trigger",
Action: "action",
} as const;
2 changes: 2 additions & 0 deletions src/api/types/ConfigurablePropBoolean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

export interface ConfigurablePropBoolean {
type: "boolean";
/** The default value for this prop */
default?: boolean;
/** 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. */
Expand Down
2 changes: 2 additions & 0 deletions src/api/types/ConfigurablePropString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

export interface ConfigurablePropString {
type: "string";
/** The default value for this prop */
default?: string;
/** If true, this prop is a secret and should not be displayed in plain text. */
secret?: boolean;
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
Expand Down
2 changes: 2 additions & 0 deletions src/api/types/ConfigurablePropStringArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

export interface ConfigurablePropStringArray {
type: "string[]";
/** The default value for this prop */
default?: string[];
/** If true, this prop is a secret and should not be displayed in plain text. */
secret?: boolean;
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
Expand Down
8 changes: 7 additions & 1 deletion src/api/types/ConfigurablePropType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type ConfigurablePropType =
| "$.airtable.tableId"
| "$.airtable.viewId"
| "$.discord.channel"
| "$.discord.channel[]"
| "$.interface.apphook"
| "$.interface.http"
| "$.interface.timer"
Expand All @@ -20,15 +21,18 @@ export type ConfigurablePropType =
| "dir"
| "http_request"
| "integer"
| "integer[]"
| "object"
| "sql"
| "string";
| "string"
| "string[]";
export const ConfigurablePropType = {
AirtableBaseId: "$.airtable.baseId",
AirtableFieldId: "$.airtable.fieldId",
AirtableTableId: "$.airtable.tableId",
AirtableViewId: "$.airtable.viewId",
DiscordChannel: "$.discord.channel",
DiscordChannelArray: "$.discord.channel[]",
InterfaceApphook: "$.interface.apphook",
InterfaceHttp: "$.interface.http",
InterfaceTimer: "$.interface.timer",
Expand All @@ -41,7 +45,9 @@ export const ConfigurablePropType = {
Dir: "dir",
HttpRequest: "http_request",
Integer: "integer",
IntegerArray: "integer[]",
Object: "object",
Sql: "sql",
String: "string",
StringArray: "string[]",
} as const;
1 change: 1 addition & 0 deletions src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from "./BackendClientOpts.js";
export * from "./ClientOpts.js";
export * from "./Component.js";
export * from "./ComponentStash.js";
export * from "./ComponentType.js";
export * from "./ConfigurableProp.js";
export * from "./ConfigurablePropAirtableBaseId.js";
export * from "./ConfigurablePropAirtableFieldId.js";
Expand Down
14 changes: 14 additions & 0 deletions src/serialization/types/ComponentType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as serializers from "../index.js";
import * as Pipedream from "../../api/index.js";
import * as core from "../../core/index.js";

export const ComponentType: core.serialization.Schema<serializers.ComponentType.Raw, Pipedream.ComponentType> =
core.serialization.enum_(["trigger", "action"]);

export declare namespace ComponentType {
export type Raw = "trigger" | "action";
}
2 changes: 2 additions & 0 deletions src/serialization/types/ConfigurablePropBoolean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const ConfigurablePropBoolean: core.serialization.ObjectSchema<
Pipedream.ConfigurablePropBoolean
> = core.serialization.object({
type: core.serialization.stringLiteral("boolean"),
default: core.serialization.boolean().optional(),
name: core.serialization.string(),
label: core.serialization.string().optional(),
description: core.serialization.string().optional(),
Expand All @@ -26,6 +27,7 @@ export const ConfigurablePropBoolean: core.serialization.ObjectSchema<
export declare namespace ConfigurablePropBoolean {
export interface Raw {
type: "boolean";
default?: boolean | null;
name: string;
label?: string | null;
description?: string | null;
Expand Down
2 changes: 2 additions & 0 deletions src/serialization/types/ConfigurablePropString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const ConfigurablePropString: core.serialization.ObjectSchema<
Pipedream.ConfigurablePropString
> = core.serialization.object({
type: core.serialization.stringLiteral("string"),
default: core.serialization.string().optional(),
secret: core.serialization.boolean().optional(),
name: core.serialization.string(),
label: core.serialization.string().optional(),
Expand All @@ -27,6 +28,7 @@ export const ConfigurablePropString: core.serialization.ObjectSchema<
export declare namespace ConfigurablePropString {
export interface Raw {
type: "string";
default?: string | null;
secret?: boolean | null;
name: string;
label?: string | null;
Expand Down
2 changes: 2 additions & 0 deletions src/serialization/types/ConfigurablePropStringArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const ConfigurablePropStringArray: core.serialization.ObjectSchema<
Pipedream.ConfigurablePropStringArray
> = core.serialization.object({
type: core.serialization.stringLiteral("string[]"),
default: core.serialization.list(core.serialization.string()).optional(),
secret: core.serialization.boolean().optional(),
name: core.serialization.string(),
label: core.serialization.string().optional(),
Expand All @@ -27,6 +28,7 @@ export const ConfigurablePropStringArray: core.serialization.ObjectSchema<
export declare namespace ConfigurablePropStringArray {
export interface Raw {
type: "string[]";
default?: string[] | null;
secret?: boolean | null;
name: string;
label?: string | null;
Expand Down
8 changes: 7 additions & 1 deletion src/serialization/types/ConfigurablePropType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const ConfigurablePropType: core.serialization.Schema<
"$.airtable.tableId",
"$.airtable.viewId",
"$.discord.channel",
"$.discord.channel[]",
"$.interface.apphook",
"$.interface.http",
"$.interface.timer",
Expand All @@ -27,9 +28,11 @@ export const ConfigurablePropType: core.serialization.Schema<
"dir",
"http_request",
"integer",
"integer[]",
"object",
"sql",
"string",
"string[]",
]);

export declare namespace ConfigurablePropType {
Expand All @@ -39,6 +42,7 @@ export declare namespace ConfigurablePropType {
| "$.airtable.tableId"
| "$.airtable.viewId"
| "$.discord.channel"
| "$.discord.channel[]"
| "$.interface.apphook"
| "$.interface.http"
| "$.interface.timer"
Expand All @@ -51,7 +55,9 @@ export declare namespace ConfigurablePropType {
| "dir"
| "http_request"
| "integer"
| "integer[]"
| "object"
| "sql"
| "string";
| "string"
| "string[]";
}
1 change: 1 addition & 0 deletions src/serialization/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from "./BackendClientOpts.js";
export * from "./ClientOpts.js";
export * from "./Component.js";
export * from "./ComponentStash.js";
export * from "./ComponentType.js";
export * from "./TimerInterval.js";
export * from "./TimerCron.js";
export * from "./ConfigurablePropType.js";
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2460,9 +2460,9 @@ npm-run-path@^4.0.1:
path-key "^3.0.0"

nwsapi@^2.2.2:
version "2.2.21"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.21.tgz#8df7797079350adda208910d8c33fc4c2d7520c3"
integrity sha512-o6nIY3qwiSXl7/LuOU0Dmuctd34Yay0yeuZRLFmDPrrdHpXKFndPj3hM+YEPVHYC5fx2otBx4Ilc/gyYSAUaIA==
version "2.2.22"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.22.tgz#109f9530cda6c156d6a713cdf5939e9f0de98b9d"
integrity sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==

once@^1.3.0:
version "1.4.0"
Expand Down