Skip to content

Commit f7335e5

Browse files
Fixes in configurable props and component listing (#150)
* Add missing `default` field for certain configurable props * Add `componentType` param when listing components using the generic route/path * Temporarily add missing types that Fern is not processing --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Jay Vercellone <jay@pipedream.com>
1 parent c42da26 commit f7335e5

19 files changed

+75
-11
lines changed

.fernignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ src/core/auth/StaticTokenProvider.ts
3636
src/core/auth/TokenProvider.ts
3737

3838
# Custom configuration props files
39+
src/api/types/ConfigurablePropType.ts
3940
src/api/types/ConfiguredProps.ts
41+
src/serialization/types/ConfigurablePropType.ts
4042
src/serialization/types/ConfiguredProps.ts
4143

4244
# Custom Proxy files

MIGRATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ incrementally without breaking your existing codebase. To do this, you can
844844
install the new SDK with an alias:
845845

846846
```bash
847-
npm install @pipedream/sdk-v2@npm:@pipedream/sdk@^2.0.0-rc.15 --save
847+
npm install @pipedream/sdk-v2@npm:@pipedream/sdk@^2.0.0-rc.16 --save
848848
```
849849

850850
Then, in your code, you can import the new SDK with the alias:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/sdk",
3-
"version": "2.0.0-rc.15",
3+
"version": "2.0.0-rc.16",
44
"private": false,
55
"repository": "github:PipedreamHQ/pipedream-sdk-typescript",
66
"type": "commonjs",

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ export class PipedreamClient {
7474
"x-pd-environment": _options?.projectEnvironment,
7575
"X-Fern-Language": "JavaScript",
7676
"X-Fern-SDK-Name": "@pipedream/sdk",
77-
"X-Fern-SDK-Version": "2.0.0-rc.15",
78-
"User-Agent": "@pipedream/sdk/2.0.0-rc.15",
77+
"X-Fern-SDK-Version": "2.0.0-rc.16",
78+
"User-Agent": "@pipedream/sdk/2.0.0-rc.16",
7979
"X-Fern-Runtime": core.RUNTIME.type,
8080
"X-Fern-Runtime-Version": core.RUNTIME.version,
8181
},

src/api/resources/components/client/Client.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import * as environments from "../../../../environments.js";
66
import * as core from "../../../../core/index.js";
77
import * as Pipedream from "../../../index.js";
8-
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js";
98
import * as serializers from "../../../../serialization/index.js";
9+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js";
1010
import * as errors from "../../../../errors/index.js";
1111

1212
export declare namespace Components {
@@ -62,7 +62,7 @@ export class Components {
6262
async (
6363
request: Pipedream.ComponentsListRequest,
6464
): Promise<core.WithRawResponse<Pipedream.GetComponentsResponse>> => {
65-
const { after, before, limit, q, app } = request;
65+
const { after, before, limit, q, app, componentType } = request;
6666
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
6767
if (after != null) {
6868
_queryParams["after"] = after;
@@ -79,6 +79,12 @@ export class Components {
7979
if (app != null) {
8080
_queryParams["app"] = app;
8181
}
82+
if (componentType != null) {
83+
_queryParams["component_type"] = serializers.ComponentType.jsonOrThrow(componentType, {
84+
unrecognizedObjectKeys: "strip",
85+
omitUndefined: true,
86+
});
87+
}
8288
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
8389
this._options?.headers,
8490
mergeOnlyDefinedHeaders({

src/api/resources/components/client/requests/ComponentsListRequest.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* This file was auto-generated by Fern from our API Definition.
33
*/
44

5+
import * as Pipedream from "../../../../index.js";
6+
57
/**
68
* @example
79
* {}
@@ -17,4 +19,6 @@ export interface ComponentsListRequest {
1719
q?: string;
1820
/** The ID or name slug of the app to filter the components */
1921
app?: string;
22+
/** The type of the component to filter the components */
23+
componentType?: Pipedream.ComponentType;
2024
}

src/api/types/ComponentType.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
/**
6+
* The type of component (trigger or action)
7+
*/
8+
export type ComponentType = "trigger" | "action";
9+
export const ComponentType = {
10+
Trigger: "trigger",
11+
Action: "action",
12+
} as const;

src/api/types/ConfigurablePropBoolean.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
export interface ConfigurablePropBoolean {
66
type: "boolean";
7+
/** The default value for this prop */
8+
default?: boolean;
79
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
810
name: string;
911
/** 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. */

src/api/types/ConfigurablePropString.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
export interface ConfigurablePropString {
66
type: "string";
7+
/** The default value for this prop */
8+
default?: string;
79
/** If true, this prop is a secret and should not be displayed in plain text. */
810
secret?: boolean;
911
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */

src/api/types/ConfigurablePropStringArray.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
export interface ConfigurablePropStringArray {
66
type: "string[]";
7+
/** The default value for this prop */
8+
default?: string[];
79
/** If true, this prop is a secret and should not be displayed in plain text. */
810
secret?: boolean;
911
/** When building `configuredProps`, make sure to use this field as the key when setting the prop value */

0 commit comments

Comments
 (0)